-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.h
43 lines (38 loc) · 933 Bytes
/
scene.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
#ifndef SCENE_H
#define SCENE_H
#include "QGraphicsScene"
#include "images.h"
class scene : public QGraphicsScene
{
Q_OBJECT
public:
scene(QObject *parent = 0);
~scene();
void setMainImage(images *);
images* getMainImage();
cv::Mat getSelected();
void exportcurrent();
QList<int> getProfile();
public slots:
void setScale(double);
private:
images* mainimage;
QPoint start;
int tool;
double handlew,handleh,penwidth;
bool selecting,translate;
QGraphicsRectItem *rect;
QGraphicsEllipseItem *ellipse;
QGraphicsLineItem *line;
QList<QGraphicsRectItem *> handles;
void mousePressEvent(QGraphicsSceneMouseEvent *);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
void mouseMoveEvent(QGraphicsSceneMouseEvent *);
void prepareItem(QPoint);
void prepareMove(QPoint);
void drawRect(QPoint,QPoint);
void drawEllipse(QPoint,QPoint);
void drawLine(QPoint,QPoint);
void drawMarker(QPoint);
};
#endif // SCENE_H