-
-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathwire.h
50 lines (40 loc) · 1.68 KB
/
wire.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/***************************************************************************
wire.h
--------
begin : Wed Sep 3 2003
copyright : (C) 2003 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef WIRE_H
#define WIRE_H
#include "conductor.h"
#include "wirelabel.h"
class Schematic;
class QPainter;
class QString;
class Wire : public Conductor {
public:
Wire(int _x1=0, int _y1=0, int _x2=0, int _y2=0, Node *n1=0, Node *n2=0);
~Wire();
void paint(QPainter* painter) const;
void paintScheme(QPainter*) override;
void paintScheme(Schematic*) override;
void setCenter(int, int, bool relative=false);
void getCenter(int&, int&);
bool getSelected(int, int);
void setName(const QString&, const QString&, int delta_=0, int x_=0, int y_=0);
Node *Port1, *Port2;
void rotate();
QString save();
bool load(const QString&);
bool isHorizontal();
};
#endif