forked from twiniars/RESpecTa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TransDialog.h
82 lines (70 loc) · 1.52 KB
/
TransDialog.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
class TransDialog;
#ifndef TRANSDIALOG_H
#define TRANSDIALOG_H
#include "globals.h"
#include <QtGui>
#include "baseState.h"
#include "Model.h"
QT_BEGIN_NAMESPACE
class QDialog;
QT_END_NAMESPACE
/**
* DialogBox allowing to change order of transitions for a state.
*/
class TransDialog:public QDialog
{
Q_OBJECT
public:
TransDialog(QWidget * parent, Model * mod);
~TransDialog(){}
/**
* Opens the dialogbox for a state loading it's transitions from the model.
*/
void openForAState(BaseState * tmp);
signals:
void TransitionSelected(Transition * tr);
/**
* reports to parent widget, that an error has occured.
*/
void reportError(QString);
private slots:
void TransSelected(QModelIndex);
/**
* Moves the selected transition one position up.
*/
void UpPressed();
/**
* Moves the selected transition one position down.
*/
void DownPressed();
/**
* Close the dialogbox.
*/
void OKPressed();
/**
* Highlights all lists on the same index.
*/
void RowChanged(int);
private:
/**
* State, for which the dialog is opened.
*/
BaseState * state;
/**
* Model of the project.
*/
Model * mod;
/**
* List of conditions of the transitions.
*/
QListWidget * transCondList;
/**
* List of targets of the transitions.
*/
QListWidget * transTargList;
/**
* List of subtasks of the transitions.
*/
QListWidget * transSubList;
};
#endif // TRANSDIALOG_H