Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wire.h
Go to the documentation of this file.
1 /***************************************************************************
2  wire.h
3  --------
4  begin : Wed Sep 3 2003
5  copyright : (C) 2003 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 WIRE_H
19 #define WIRE_H
20 
21 #include "viewpainter.h"
22 #include "element.h"
23 #include "components/component.h" // because of struct Port
24 #include "wirelabel.h"
25 
26 #include <QPainter>
27 #include <QString>
28 #include <Q3PtrList>
29 
30 
31 class Wire : public Conductor {
32 public:
33  Wire(int _x1=0, int _y1=0, int _x2=0, int _y2=0, Node *n1=0, Node *n2=0);
34  ~Wire();
35 
36  void paint(ViewPainter*);
37  void paintScheme(QPainter*);
38  void setCenter(int, int, bool relative=false);
39  void getCenter(int&, int&);
40  bool getSelected(int, int);
41  void setName(const QString&, const QString&, int delta_=0, int x_=0, int y_=0);
42 
44 
45  void rotate();
46  QString save();
47  bool load(const QString&);
48  bool isHorizontal();
49 };
50 
51 #endif
Defines drawing elements for schematics.
Definition: node.h:30
Definition: wire.h:31
label for Node and Wire classes
Definition: element.h:161
void paint(ViewPainter *)
Definition: wire.cpp:108
void paintScheme(QPainter *)
Definition: wire.cpp:98
bool getSelected(int, int)
Definition: wire.cpp:89
Wire(int _x1=0, int _y1=0, int _x2=0, int _y2=0, Node *n1=0, Node *n2=0)
Definition: wire.cpp:21
bool isHorizontal()
Definition: wire.cpp:123
QString save()
Definition: wire.cpp:151
void getCenter(int &, int &)
Definition: wire.cpp:81
void setCenter(int, int, bool relative=false)
Definition: wire.cpp:67
~Wire()
Definition: wire.cpp:37
bool load(const QString &)
Definition: wire.cpp:167
void rotate()
Definition: wire.cpp:42
Node * Port1
Definition: wire.h:43
Node * Port2
Definition: wire.h:43
void setName(const QString &, const QString &, int delta_=0, int x_=0, int y_=0)
Definition: wire.cpp:129