-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscribblearea.h
65 lines (44 loc) · 1.22 KB
/
scribblearea.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
57
58
59
60
61
62
63
64
65
#ifndef SCRIBBLEAREA_H
#define SCRIBBLEAREA_H
#include <QGraphicsView>
#include <vector>
#include <opencv2/core.hpp>
using namespace cv;
Vec3f getRgbOfLabel(int label);
class Tool;
#include <tool.h>
class ScribbleArea : public QGraphicsView
{
Q_OBJECT
public:
ScribbleArea(QWidget *parent = 0);
int **scribbles;
int **scribbles_orig;
int currLabel;
bool readOnly;
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event);
void setLabel(int x, int y, int label);
void setLabel(int x, int y, int label, int brushSize);
void setIcgLabel(int x, int y, int label, int brushSize, Mat >);
void removeLastLabel();
Tool *tool;
QSize sizeHint() const;
bool scribbling;
QImage back;
int brushSize;
QPoint lastClick;
public slots:
void setCurrLabel(int l);
void loadImageDialog();
void loadImage(QString fileName);
void loadScribbles(QString fileName);
void loadScribblesDialog();
void saveScribblesDialog();
void setImage(QImage im);
void clearScribbles();
void dumpImageWithScribbles();
};
#endif // SCRIBBLEAREA_H