-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddeditpropertydialog.h
57 lines (46 loc) · 1.55 KB
/
addeditpropertydialog.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
#ifndef ADDEDITPROPERTYDIALOG_H
#define ADDEDITPROPERTYDIALOG_H
#include "propertiesdock.h"
#include <QDialog>
namespace Ui {
class AddEditPropertyDialog;
}
/**
* @brief The AddEditPropertyDialog class defines the dialog used to add or edit a property
*/
class AddEditPropertyDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief AddEditPropertyDialog Constructor
* @param add Whether this should be an add (or else an edit) window
* @param propertiesDock The properties dock
* @param parent The parent of this widget
* @param propertyName The current name of the property (in case of edit)
* @param propertyText The current text of the property (in case of edit)
*/
AddEditPropertyDialog(bool add, PropertiesDock *propertiesDock, QWidget *parent = 0, QString propertyName = "", QString propertyText = "");
~AddEditPropertyDialog();
/**
* @brief getPropertyName Gets the string filled in as the property name
* @return The property name string
*/
QString getPropertyName();
/**
* @brief getPropertyText Gets the string filled in as the property text
* @return The preoperty text string
*/
QString getPropertyText();
public slots:
/**
* @brief parseAndAccept checks whether the fields are non-empty and the property is valid before accepting
* (parsing has not yet been implemented)
*/
void parseAndAccept();
private:
Ui::AddEditPropertyDialog *ui;
PropertiesDock *propertiesDock;
QString windowTitle;
};
#endif // ADDEDITPROPERTYDIALOG_H