-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelement.h
More file actions
35 lines (27 loc) · 686 Bytes
/
element.h
File metadata and controls
35 lines (27 loc) · 686 Bytes
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
#ifndef ELEMENT_H
#define ELEMENT_H
#include <QGraphicsObject>
#include <QAbstractGraphicsShapeItem>
#include <QGraphicsItem>
class Graph;
class Element : public QGraphicsObject
{
Q_OBJECT
public:
explicit Element(Graph* graph, QGraphicsItem *parent = 0);
virtual ~Element();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
virtual QRectF boundingRect() const;
void highlight();
void unhighlight();
bool isHighlighted();
bool isUnhighlighted();
signals:
public slots:
protected:
Graph* _graph;
QAbstractGraphicsShapeItem* _inner;
static const QPen DEFAULT_PEN;
static const QPen HIGHLIGHT_PEN;
};
#endif // ELEMENT_H