forked from askubis/RESpecTa
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtransWidget.h
More file actions
114 lines (97 loc) · 2.53 KB
/
transWidget.h
File metadata and controls
114 lines (97 loc) · 2.53 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
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
103
104
105
106
107
108
109
110
111
112
113
114
class TransWidget;
#ifndef TRANSWIDGET_H
#define TRANSWIDGET_H
#include "respecta.h"
#include "States.h"
#include "globals.h"
#include <QDialog>
QT_BEGIN_NAMESPACE
class QCheckBox;
class QDialogButtonBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QComboBox;
class QGridLayout;
class QVBoxLayout;
QT_END_NAMESPACE
/**
* a Widget, which allows to edit and create Transitions.
*/
class TransWidget : public QWidget
{
Q_OBJECT
public:
TransWidget(QWidget *parent,Model * newmod );
/**
* Refreshes data, especially the subtasks list.
*/
void refreshData();
/**
* Loads data of a Transition to edit.
*/
void TransSelected(Transition *);
/**
* Disables OK button (used when condition.size()==0).
*/
void setOKButtonDisabled(){OKButton->setDisabled(true);edited=NULL;}
private:
/**
* Model of the project.
*/
Model * mod;
/**
* Lineedit allowing to enter/edit condition of the transition.
*/
QLineEdit *conditionLineEdit;
/**
* Button which signals that the user accepts changes made in the Transition.
*/
QPushButton *OKButton;
/**
* Button which signals, that the user wants to add this transition to the project.
*/
//QPushButton *InsertButton;
/**
* Transition, which is currently being edited.
*/
Transition * edited;
/**
* Combobox allowing to choose a state in a subtask, which will be the start of subtsk execution.
*/
QComboBox *stateCombo;
/**
* Combobox allowing to choose a subtask, which will be executed from the state chosen in stateCombo.
*/
QComboBox *subtaskCombo;
QComboBox * sourceNameCombo;
QComboBox * destNameCombo;
signals:
/**
* Signals,that a transition will be inserted, gibving it's attributes.
*/
//void insertTransition(std::pair<QString,QString>);
/**
* Reports to the parent widget, that an error has occured.
*/
void reportError(QString);
private slots:
/**
* Refreshes State list in StateCombo after a change in subtaskCombo.
*/
void subtaskChanged(QString);
/**
* Enables/Disables ok/insert buttons when a change has been made in the condition.
*/
void lengthChanged(QString newString);
/**
* Changes the edited transition.
*/
void AcceptTrans();
/**
* Signals with the insertTransition Signal, that the user wants to insert a transition into the project.
*/
//void InsertTrans();
};
#endif // TRANSWIDGET_H