forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Edge.h
54 lines (39 loc) · 901 Bytes
/
Edge.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
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#ifndef EDGE_H
#define EDGE_H
// Tell GCC to ignore implicitly declared copy methods as long as
// Qt is not compliant.
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <QtWidgets/QGraphicsTextItem>
#include <QtGui/QPainter>
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
#include "Node.h"
namespace Monitor {
class Edge : public QGraphicsItem
{
public:
Edge (Node* ancestor, Node *child, bool pubSub, QGraphicsItem * parent = 0);
void adjust();
protected:
QRectF boundingRect() const;
// override
void paint(QPainter *painter,const QStyleOptionGraphicsItem *,QWidget *);
private:
// connection info
Node* parent_;
Node* child_;
// is this a pub/sub connection
bool pubSub_;
};
};
#endif /* NODE_H */