-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmarkersettings.h
81 lines (58 loc) · 1.69 KB
/
markersettings.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef MARKERSETTINGS_H
#define MARKERSETTINGS_H
#include <QMainWindow>
#include "global.h"
namespace Ui {
class MarkerSettings;
}
class MarkerSettings : public QMainWindow
{
Q_OBJECT
public:
static MarkerSettings* instance(QWidget *parent = nullptr);
~MarkerSettings();
void fillMarkerData(int label, QColor color, QString name, float radius, bool visible);
void setMarkerVisibility(int label, bool visible);
int getMarkerLabel();
QString getMarkerName();
QColor getMarkerColor();
void updateMarkerColorOnForm(QColor color);
void updateMarkerNameOnForm(QString name);
void createConnections();
void destroyConnections();
void increaseBrush();
void decreaseBrush();
private slots:
void ChangeMarkerName();
void ChangeMarkerColor(iftColor *color = nullptr);
void ChangeMarkerLabel();
void EraseMarkerClicked();
void StartFreeFromAnnotationClicked();
void StartBoxAnnotationClicked();
void changeBrush(double value);
void changeSphericity();
void OkButtonClicked();
void changeMarkerVisibility(int state);
signals:
void StartAnnotation(int);
void HaltAnnotation();
void UpdateBrush(float);
void eraseMarker();
void UpdateMarkerName(int,QString);
void UpdateMarkerColor(int, QColor);
void updateMarkerVisibility(int, bool);
private:
Ui::MarkerSettings *ui;
explicit MarkerSettings(QWidget *parent = 0);
static MarkerSettings *_instance;
QGraphicsEllipseItem *brushGraphicsItem = nullptr;
void showEvent(QShowEvent *event) override;
/*
* Variables
*/
int label;
float radius;
QString name;
QColor color;
};
#endif // MARKERSETTINGS_H