-
-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathwirelabel.h
56 lines (42 loc) · 1.83 KB
/
wirelabel.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
51
52
53
54
55
56
/***************************************************************************
wirelabel.h
-------------
begin : Sun Feb 29 2004
copyright : (C) 2004 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 WIRELABEL_H
#define WIRELABEL_H
#include "conductor.h"
#include <QString>
class QPainter;
class WireLabel : public Element {
public:
WireLabel(const QString& _Name=0, int _cx=0, int _cy=0,
int _x1=0, int _y1=0, int _Type=isNodeLabel);
~WireLabel();
void paintScheme(QPainter *p);
void setCenter(int x, int y, bool relative=false);
bool getSelected(int, int);
void setName(const QString& Name_);
void setHighlighted (bool newval) { isHighlighted = newval; };
Conductor *pOwner; // Wire or Node where label belongs to
QString Name, initValue;
void paint(QPainter* painter) const;
void rotate();
QString save();
bool load(const QString& s);
bool isHorizontal();
void getLabelBounding(int& _xmin, int& _ymin, int& _xmax, int& _ymax);
private:
bool isHighlighted;
};
#endif