-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheditWidget.h
92 lines (80 loc) · 1.98 KB
/
editWidget.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
83
84
85
86
87
88
89
90
91
92
class EditWidget;
#ifndef EDITWIDGET_H
#define EDITWIDGET_H
#include "respecta.h"
#include "States.h"
#include "globals.h"
#include "stateWidget.h"
#include "transWidget.h"
#include "subtaskWidget.h"
#include <QDialog>
QT_BEGIN_NAMESPACE
class QCheckBox;
class QDialogButtonBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QGridLayout;
class QVBoxLayout;
class QStackedWidget;
QT_END_NAMESPACE
/**
* Class containing edit widgets.
*/
class EditWidget : public QStackedWidget//QTabWidget
{
Q_OBJECT
public:
/**
* Constructor creating all edit widgets (stateWidget, subtaskWidget and transWidget).
*/
EditWidget(RESpecTa *parent, Model * mod);
signals:
/**
* Signal to the main window reporting error.
* @param msgString Error to display
*/
void reportError(QString msgString);
private slots:
/**
* Slot setting the subtaskWidget visible.
*/
void EditTasks();
/**
* Calls refresh function to all widgets.
*/
void refreshAllWidgets();
/**
* Passes the selected item to the corresponding edit widget.
* @param item Item to pass
*/
void itemSelected(QGraphicsItem * item);
/**
* Refreshes given widget.
* @param index Index of the tab to be refreshed.
*/
void refreshWidget(int index);
/**
* By this slot the inside widgets communicate errors to the main window.
*/
void forwardError(QString msgString){emit reportError(msgString);}
/**
* Signals the edit widgets to cancel the Edit option(usually because a deletion occured on the scene).
*/
void SignalDeleted();
private:
/**
* Widget, which allows to edit and create transitions.
*/
TransWidget * transWidget;
/**
* Widget, which allows to edit and create states.
*/
StateWidget * stateWidget;
/**
* Widget, which allows to edit, delete and create states.
*/
SubtaskWidget * subtaskWidget;
};
#endif // EDITWIDGET_H