-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphicsview.h
More file actions
42 lines (32 loc) · 962 Bytes
/
graphicsview.h
File metadata and controls
42 lines (32 loc) · 962 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
36
37
38
39
40
41
42
#ifndef GRAPHICSVIEW_H
#define GRAPHICSVIEW_H
#include <QtGui>
#include <maxmodel/model.h>
#include "entry.h"
#include "link.h"
#include "blockinstance.h"
class GraphicsView : public QGraphicsView
{
Q_OBJECT
public:
GraphicsView(QGraphicsScene *scene, QWidget *parent = 0);
signals:
public slots:
void openScript(const model_t *model, const model_script_t *script);
void closeScript();
void addLinkable(const model_linkable_t *linkable);
void updateBacking();
protected:
void drawForeground(QPainter *painter, const QRectF &rect);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
private:
Entry::Handle *getEntryHandle(Entry *entry);
Link::Handle *getLinkHandle(Link *link);
const model_t *model;
const model_script_t *script;
Entry::Handle *dragio, *targetio;
QList<Link *> links;
};
#endif // GRAPHICSVIEW_H