-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwintestplot.h
executable file
·110 lines (88 loc) · 2.63 KB
/
wintestplot.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
#ifndef WINTESTPLOT_H
#define WINTESTPLOT_H
#include <QDialog>
#include "qcustomplot.h"
#include "utilities.h"
#include "data.h"
namespace Ui {
class WinTestPlot;
}
class WinTestPlot : public QDialog
{
Q_OBJECT
public:
explicit WinTestPlot(QWidget *parent = 0);
/**
* @brief Set the data of avgData based on the @param result
* @param result: data to store
* @param testo: QString used for test description
* @param type: used to know the test_type
* @return true if the loading was successfull, false otherwise.
*/
bool setData(const QVector<sched_result_t> result,QString testo,type_test_t type);
/**
* @brief Set the interface based on data loaded with the setData function.
* This function must be called only if the setData function returned true.
* @return true if the setup was successfull, false otherwise.
*/
bool setGuiAfterData();
/**
* @brief Set interface based on the data stored in @STATS_FILE_NAME
* @param test
* @return true if the setup was successfull, false otherwise.
*/
bool prepareForShowing(const test_settings_t& test);
~WinTestPlot();
private slots:
/**
* @brief Reset plot and interface and close the window
*/
void on_pushButton_clicked();
private:
/** Main interface */
Ui::WinTestPlot *ui;
/** String for the lables' window*/
QString scheduler,n_read,n_write,rw_type;
QString compare_string;
/** Plot (Error) text*/
QCPItemText *testo;
/** Main plot data*/
QVector<double> avgData;
/**
* @brief load Data from STATS_FILE_NAME
* @param test
* @return true if the loading was successfull, false otherwise.
*/
bool loadData(const test_settings_t& test);
/**
* @brief Setup of the plot with the @param data
* @param customPlot
* @param data
*/
void setupPlotAfterTest(QCustomPlot *customPlot,const QVector<double> data);
/**
* @brief Frontend for the interface's setup and plot's setup.
* @param avgData used for the plot
* @return true if the setup was successfull, false otherwise.
*/
bool setupAllPlotsAfterTest(const QVector<double> avgData);
/**
* @brief Setup labels window
* @param test
*/
void setupLables(const test_settings_t& test);
/**
* @brief Save the default labels window
*/
void saveDefaultLabel();
/**
* @brief Load the default labels window
*/
void loadDefaultLabel();
/**
* @brief Handle the close event of the window
* @param event
*/
void closeEvent(QCloseEvent *event);
};
#endif // WINTESTPLOT_H