-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
69 lines (53 loc) · 1.25 KB
/
mainwindow.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 MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QAbstractButton>
#include <QCheckBox>
#include <QObject>
#include <QString>
#include <QShortcut>
#include <iostream>
#include <vector>
#include <config_parser.h>
#include <kled.h>
#include <pinger.h>
#include <QColor>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
//Methods
MainWindow (Config *io_config = nullptr, QWidget *parent = nullptr);
~MainWindow();
int my_no_machines;
//Events
signals:
void emit_todo(std::vector<unsigned long>&, bool&);
//Event handlers
private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_buttonBox_apply();
private:
//Methods
void modify_cb();
void update_led();
void send_todo();
//Variables
Config *myo_config;
Pinger *myo_pinger;
Ui::MainWindow *ui;
QList <QCheckBox *> mys_checkboxes;
QList <KLed *> mys_leds;
//Constants
const std::string id_cb = "checkBox_";
const long id_cb_len = id_cb.length();
protected:
//#ifndef QT_NO_CONTEXTMENU
// void contextMenuEvent(QContextMenuEvent *event) override;
//#endif // QT_NO_CONTEXTMENU
};
#endif // MAINWINDOW_H