-
Notifications
You must be signed in to change notification settings - Fork 5
/
frmstartup.h
145 lines (119 loc) · 4.06 KB
/
frmstartup.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#ifndef FRMSTARTUP_H
#define FRMSTARTUP_H
// Qt containers
#include <QVector>
#include <QMap>
#include <QMultiMap>
// To set up the run selection tables in the startup window
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QStandardItemModel>
#include <QStandardItem>
// Parent widget for the TkCommissioner tabs
#include "QConnectedTabWidget.h"
// UI file
#include "ui_frmstartup.h"
/** \Class Startup
*
* \brief Class to retrieve a list of partitions and runs and enable
* various actions to perform on them
*
* This class presents the user with an interface to perform various
* actions on a run. The user can
*
* - run the standard commissioning analysis on a run
* - display results from a given run
* - upload analysis results to the configuration database
*
*/
class Startup : public QConnectedTabWidget, private Ui::Startup {
Q_OBJECT
private:
QStandardItemModel *partitionModel;
QStandardItemModel *runModel;
QString currentPartitionName;
QVector<QString> tmpfiles;
/**
* generic base method to add an item with a description to a
* QStandardItemModel. Used by addPartition and addRun
*/
void addItem(QStandardItemModel *model, const QString &first, const QString& second, bool isRunItem = false, bool analyzed = false, bool itemBad = false);
/**
* function which takes a partition name as argument and populates
* the runView with all commissioning runs from this partition.
*/
void populateRuns(const QString &partitionName);
/**
* function to populate the partitionView. This function will be
* called when the interface is brought up.
*/
void populatePartitions();
/**
* delete files (trees, etc.) created for the commissioning analysis
*/
void deleteTmpFiles();
public:
/**
* default constructor
*/
Startup(QWidget *parent = 0);
/**
* destructor
*/
~Startup();
public Q_SLOTS:
/**
* Function to be executed when quit button is pressed. Currently
* only closes the interface, can also be used for clean up if
* needed
*/
void on_btnQuit_clicked();
/**
* Function to be executed when "View Results" button is pressed.
* Currently only passes run and partition to #TreeBuilder and
* #TreeViewer to display results.
*/
void on_btnViewResults_clicked();
/**
* Updates the list of partitions in partitionView
*/
void on_btnUpdatePartitions_clicked();
/**
* Updates the list of runs in runView
*/
void on_btnUpdateRuns_clicked();
/**
* Updates comment field in the DB of the selected run to indicate them as bad
*/
void on_btnMarkBad_clicked();
/**
* show a state as selected in the QComboBox
*/
void on_btnState_clicked();
/**
* Analyze the selected run
*/
void on_btnAnalyze_clicked();
/**
* Prepare for global running
*/
void on_btnPrepareGlobal_clicked();
/**
* Perform timing O2O
*/
void on_btnTimingO2O_clicked();
/**
* slot that will be called if the active run number in the runView
* TableView. Checks whether this run has already been analyzed and
* if so, will enable button to view results.
*/
void runChanged(QModelIndex current, QModelIndex previous);
/**
* slot that will be called if the active partition in the
* partitionView TableView. Will in turn call the
* Startup::populateRuns(const QString &partitionName) slot to
* update run numbers in the runView.
*/
void partitionChanged(QModelIndex current, QModelIndex previous);
};
#endif