-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpropertywidget.h
102 lines (82 loc) · 2.32 KB
/
propertywidget.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef PROPERTYWIDGET_H
#define PROPERTYWIDGET_H
#include "propertiesdock.h"
#include "processsystem.h"
#include "propertywidget.h"
#include <QLabel>
#include <QHBoxLayout>
#include <QWidget>
#include <QPushButton>
#include <QProcess>
#include <QStackedWidget>
class PropertiesDock;
/**
* @brief The PropertyWidget class defines a widget for a single property in the properties dock
*/
class PropertyWidget : public QWidget
{
Q_OBJECT
public:
/**
* @brief PropertyWidget Constructor
* @param name The name of the property
* @param text The text of the property
* @param parent The parent of this widget
*/
PropertyWidget(Property *property, ProcessSystem *processSystem, FileSystem *fileSystem, PropertiesDock *parent);
/**
* @brief getPropertyName Gets the property of this widget
* @return The property
*/
Property *getProperty();
/**
* @brief setPropertyName Set the name of the property of this widget
* @param name The new name of the property
*/
void setPropertyName(QString name);
/**
* @brief setPropertyText Set the text of the property of this widget
* @param text The new text of the property
*/
void setPropertyText(QString text);
/**
* @brief saveProperty Saves this property
*/
void saveProperty();
public slots:
/**
* @brief actionVerify Allows the user to verify this property
*/
void actionVerify();
/**
* @brief actionVerifyResult Applies the result of the verification
*/
void actionVerifyResult(int processid);
/**
* @brief actionAbortVerification Allows the user to abort the verification
*/
void actionAbortVerification();
/**
* @brief actionEdit Allows the user to edit this property
*/
void actionEdit();
/**
* @brief actionDelete Allows the user to delete this property
*/
void actionDelete();
protected:
void paintEvent(QPaintEvent *pe);
private:
ProcessSystem *processSystem;
FileSystem *fileSystem;
PropertiesDock *parent;
Property *property;
QHBoxLayout *propertyLayout;
QLabel *propertyNameLabel;
QStackedWidget *verificationWidgets;
QPushButton *editButton;
QPushButton *deleteButton;
int verificationProcessId;
void setToDefault();
};
#endif // PROPERTYWIDGET_H