-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogCreateVariable.h
More file actions
69 lines (48 loc) · 1.31 KB
/
DialogCreateVariable.h
File metadata and controls
69 lines (48 loc) · 1.31 KB
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
#ifndef DIALOG_CREATE_VARIABLE
#define DIALOG_CREATE_VARIABLE
#include <QDialog>
#include <QModelIndex>
#include "VariableSequenceModel.h"
#include "SpinBoxDelegate.h"
class LSystem;
namespace Ui {
class DialogCreateVariable;
}
class DialogCreateVariable : public QDialog {
Q_OBJECT
signals:
void done();
void cancel();
public:
enum Mode {
EDIT,
CREATE
};
explicit DialogCreateVariable(LSystem* lSystem, QWidget *parent = 0);
~DialogCreateVariable();
void setVariable(Variable* variable);
Variable* getVariable();
void setMode(Mode mode);
Mode getMode() const;
private slots:
void on_btnAddToProduction_clicked();
void on_btnRemoveFromProduction_clicked();
void on_btnAddProduction_clicked();
void on_btnRemoveProduction_clicked();
void on_productionsView_clicked(const QModelIndex &index);
void on_btnBoxOkCancel_accepted();
void on_btnBoxOkCancel_rejected();
void on_txtProductionName_textEdited(const QString &arg1);
void on_txtVarName_textEdited(const QString &arg1);
private:
Ui::DialogCreateVariable* _ui;
LSystem* _lSystem;
Variable* _variable;
QString _originalName;
VariableSequenceModel* _variableModel;
SpinBoxDelegate* _itemDelegate;
VariableSequenceModel* _currentProductionModel;
QModelIndex _currentProductionIndex;
Mode _currentMode;
};
#endif // DIALOG_CREATE_VARIABLE