| 1 |
|
| 2 |
|
| 3 |
#pragma once |
| 4 |
|
| 5 |
#include <Configuration.h> |
| 6 |
#include <QCheckBox> |
| 7 |
#include <QComboBox> |
| 8 |
#include <QMainWindow> |
| 9 |
#include <QString> |
| 10 |
#include <QTableWidget> |
| 11 |
#include <yaml-cpp/yaml.h> |
| 12 |
|
| 13 |
QT_BEGIN_NAMESPACE |
| 14 |
namespace Ui { class MainWindow; } |
| 15 |
QT_END_NAMESPACE |
| 16 |
|
| 17 |
class MainWindow : public QMainWindow |
| 18 |
{ |
| 19 |
Q_OBJECT |
| 20 |
|
| 21 |
public: |
| 22 |
MainWindow(QWidget *parent = nullptr); |
| 23 |
~MainWindow(); |
| 24 |
|
| 25 |
signals: |
| 26 |
void updateValue(const QString& key); |
| 27 |
|
| 28 |
private slots: |
| 29 |
void on_actionSave_triggered(void); |
| 30 |
|
| 31 |
void on_actionLoad_triggered(void); |
| 32 |
|
| 33 |
void on_saveButton_clicked(void); |
| 34 |
|
| 35 |
private: |
| 36 |
void pullSettings(void); |
| 37 |
void pushSettings(void); |
| 38 |
|
| 39 |
void generateUi(void); |
| 40 |
void askForReboot(void); |
| 41 |
|
| 42 |
void readSettings(const QString& fileName); |
| 43 |
void writeSettings(const QString& fileName); |
| 44 |
|
| 45 |
Configuration::Parameters m_parameters; |
| 46 |
YAML::Node m_categories; |
| 47 |
|
| 48 |
Ui::MainWindow *ui; |
| 49 |
|
| 50 |
QComboBox *createComboBox(const QString &key); |
| 51 |
QCheckBox *createCheckBox(const QString &key); |
| 52 |
|
| 53 |
QTableWidget *createRawTable(); |
| 54 |
}; |