-
Notifications
You must be signed in to change notification settings - Fork 2
/
resultswindow.h
69 lines (60 loc) · 1.61 KB
/
resultswindow.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
#ifndef RESULTSWINDOW_H
#define RESULTSWINDOW_H
//Qt headers
#include <QWidget>
#include <QLabel>
#include <QTableView>
#include <QGridLayout>
#include <QFormLayout>
#include <QHeaderView>
#include <QGroupBox>
#include <QPushButton>
#include <QFileDialog>
#include <QDir>
//STL headers
#include <memory>
//Custom headers
#include "matrixmodel.h"
#include "matrixproduct.h"
namespace qmatrixproduct {
/**
* @brief Window that opens after pressing "Multiply..." button
*/
class ResultsWindow : public QWidget
{
Q_OBJECT
public:
/**
* @brief ResultsWindow constructor
* @param model MatrixModel object pointer
* @param time Time spent on multiplication
* @param mp MatrixProduct object pointer w/ all statistics
* @param parent Parent
*/
explicit ResultsWindow(MatrixModel *model,
const QString &time,
qmatrixproduct::MatrixProduct *mp,
int algorithmIndex,
QWidget *parent = 0);
public slots:
/**
* @brief Slot connected with "Export..." button
*/
void onExportButtonClicked();
private:
void setupUi();
/**
* @brief Create a right-aligned label
* @param text Label text
* @return Pointer to the created label
*/
QLabel* createLabel(const QString &text);
std::unique_ptr<MatrixModel> m_matrixModel;
QString m_time;
std::unique_ptr<qmatrixproduct::MatrixProduct> m_matrixProduct;
int m_algorithmIndex;
QTableView *m_tableView;
QPushButton *m_exportButton;
};
} // namespace qmatrixproduct
#endif // RESULTSWINDOW_H