-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpropertiesdock.h
71 lines (57 loc) · 1.82 KB
/
propertiesdock.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
#ifndef PROPERTIESDOCK_H
#define PROPERTIESDOCK_H
#include "propertywidget.h"
#include "processsystem.h"
#include <QDockWidget>
#include <QVBoxLayout>
class PropertyWidget;
/**
* @brief The PropertiesDock class defines the dock that contains the properties
*/
class PropertiesDock : public QDockWidget
{
Q_OBJECT
public:
const Qt::DockWidgetArea defaultArea = Qt::RightDockWidgetArea;
/**
* @brief PropertiesDock Constructor
* @param parent The parent of this widget
*/
PropertiesDock(ProcessSystem *processSystem, FileSystem *fileSystem, QWidget *parent);
/**
* @brief setToNoProperties Empties the dock
*/
void setToNoProperties();
/**
* @brief addProperty Adds a property to the dock
* @param propertyName The name of the property
* @param propertyText The body of the property
*/
void addProperty(Property *property);
/**
* @brief deleteProperty Removes a property from the dock
* @param propertyWidget The property widget to remove
*/
void deleteProperty(PropertyWidget *propertyWidget);
/**
* @brief propertyNameExists Checks whether there already exists a property with the name propertyName
* @param propertyName The property name to check for
* @return Whether there already exists a property with the name propertyName
*/
bool propertyNameExists(QString propertyName);
/**
* @brief saveAllProperties Saves all properties in this dock
*/
void saveAllProperties();
/**
* @brief verifyAllProperties Verifies all properties in this dock
*/
void verifyAllProperties();
private:
ProcessSystem *processSystem;
FileSystem *fileSystem;
QWidget *innerDockWidget;
QVBoxLayout *propertiesLayout;
std::list<PropertyWidget*> propertyWidgets;
};
#endif // PROPERTIESDOCK_H