Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wirelabel.h
Go to the documentation of this file.
1 /***************************************************************************
2  wirelabel.h
3  -------------
4  begin : Sun Feb 29 2004
5  copyright : (C) 2004 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef WIRELABEL_H
19 #define WIRELABEL_H
20 
21 #include "element.h"
22 #include "viewpainter.h"
23 
24 #include <QPainter>
25 #include <QString>
26 #include <Q3PtrList>
27 
28 class Wire;
29 class Node;
30 
31 
32 class WireLabel : public Element {
33 public:
34  WireLabel(const QString& _Name=0, int _cx=0, int _cy=0,
35  int _x1=0, int _y1=0, int _Type=isNodeLabel);
36  ~WireLabel();
37 
38  void paintScheme(QPainter *p);
39  void setCenter(int x, int y, bool relative=false);
40  bool getSelected(int, int);
41  void setName(const QString& Name_);
42  void setHighlighted (bool newval) { isHighlighted = newval; };
43 
44 
45  Conductor *pOwner; // Wire or Node where label belongs to
46  QString Name, initValue;
47 
48  void paint(ViewPainter*);
49  void rotate();
50  QString save();
51  bool load(const QString& s);
52  bool isHorizontal();
53 
54 private:
56 
57 };
58 
59 #endif
bool load(const QString &s)
Defines drawing elements for schematics.
bool getSelected(int, int)
Definition: wirelabel.cpp:97
bool isHighlighted
Definition: wirelabel.h:55
Definition: node.h:30
Definition: wire.h:31
label for Node and Wire classes
Definition: element.h:161
#define isNodeLabel
Definition: element.h:126
void rotate()
bool isHorizontal()
void setName(const QString &Name_)
Definition: wirelabel.cpp:196
void setHighlighted(bool newval)
Definition: wirelabel.h:42
void paint(ViewPainter *)
Definition: wirelabel.cpp:109
void paintScheme(QPainter *p)
Definition: wirelabel.cpp:47
void setCenter(int x, int y, bool relative=false)
Definition: wirelabel.cpp:67
Superclass of all schematic drawing elements.
Definition: element.h:142
WireLabel(const QString &_Name=0, int _cx=0, int _cy=0, int _x1=0, int _y1=0, int _Type=isNodeLabel)
Definition: wirelabel.cpp:27
QString save()
Definition: wirelabel.cpp:214
QString Name
Definition: wirelabel.h:46
Conductor * pOwner
Definition: wirelabel.h:42
QString initValue
Definition: wirelabel.h:46