-
Notifications
You must be signed in to change notification settings - Fork 18
/
ImageSpirit.h
48 lines (34 loc) · 985 Bytes
/
ImageSpirit.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
#ifndef IMAGESPIRIT_H
#define IMAGESPIRIT_H
#include <QtGui/QMainWindow>
#include "ui_ImageSpirit.h"
#include "ActionData.h"
// Corresponding of different objects and colors
class ObjColorList{
public:
ObjColorList(QWidget *parent);
QListWidget *_list; // Object list before and after interaction
//void SetObjColorList(CStr &objName, vecI &objIdx);
void setObjColorList(CMat &objLabel1u);
void Initial(CStr &settingFileName);
void show(bool isShow = true);
static inline int Color2Int(Vec3b &color){return color[2] * 1000000 + color[1] * 1000 + color[0];}
vecI _objIdx; //_objIdxB,
vector<QColor> _objColors;
vecS _objNames;
vecI _objColorIdx;
};
class ImageSpirit : public QMainWindow
{
Q_OBJECT
friend class PaintWidget;
public:
ImageSpirit(QWidget *parent = 0, Qt::WFlags flags = 0);
~ImageSpirit();
private:
Ui::ImageSpiritClass ui;
PaintWidget *paintWidget;
QLabel _statusPnt, _statusMsg;
ObjColorList _objColorList;
};
#endif // IMAGESPIRIT_H