-
Notifications
You must be signed in to change notification settings - Fork 1
/
mpredialog.h
72 lines (64 loc) · 1.72 KB
/
mpredialog.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
/*!
* \file mpredialog.h
* \author Simon Coakley
* \date 2012
* \copyright Copyright (c) 2012 University of Sheffield
* \brief Header file for mpre dialog
*/
#ifndef MPREDIALOG_H_
#define MPREDIALOG_H_
#include <QDialog>
#include <QDialogButtonBox>
#include <QComboBox>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QCheckBox>
#include <QGroupBox>
#include "./mpre.h"
#include "./memorymodel.h"
#include "./condition.h"
#include "./ui_conditiondialog.h"
#include "./machine.h"
class QDialogButtonBox;
class MpreDialog : public QDialog, public Ui::ConditionDialog {
Q_OBJECT
public:
MpreDialog(Machine * agent, QString * messageType = 0, QWidget *parent = 0);
void setCondition(Condition c);
Condition getCondition();
signals:
void setVariableComboBox(int i);
void setOpComboBox(int i);
private slots:
void enableCondition(bool);
void checkedLhsAgentVariable(bool);
void checkedLhsMessageVariable(bool);
void checkedLhsValue(bool);
void checkedRhsAgentVariable(bool);
void checkedRhsMessageVariable(bool);
void checkedRhsValue(bool);
void valueClicked();
void timeClicked();
void nestedClicked();
void editLhsClicked();
void editRhsClicked();
void disableTimePhaseVariable(bool);
void disableTimePhaseValue(bool);
void levelUpClicked();
private:
void setCurrentCondition(Condition * c);
void getCurrentCondition();
QDialogButtonBox *buttonBox;
QComboBox *variable;
QComboBox * op;
QSpinBox * value;
QCheckBox * myEnabled;
QGroupBox *lhsGroup;
QGroupBox *opGroup;
QGroupBox *rhsGroup;
Condition condition;
Condition * c;
Machine * agent;
QStringList operators;
};
#endif // MPREDIALOG_H_