diff options
author | daniel-Jones <daniel@danieljon.es> | 2016-06-02 18:10:52 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2016-06-02 18:10:52 +0930 |
commit | ef885e1a2855bf8de3d44f07451d3c421f0ab5c0 (patch) | |
tree | c19498b4a5ebe62b6fea7c20b58c62c1adef6108 /qt/RGBController/controllerwindow.h | |
parent | 1c1b7c93833d7115c0f807f07c69dd3ef37a9ef8 (diff) | |
download | RGB-Controller-ef885e1a2855bf8de3d44f07451d3c421f0ab5c0.tar.gz RGB-Controller-ef885e1a2855bf8de3d44f07451d3c421f0ab5c0.zip |
Added feedback for missing presets.txt file, added message box funcrion for user alerts and other misc things
Diffstat (limited to 'qt/RGBController/controllerwindow.h')
-rwxr-xr-x | qt/RGBController/controllerwindow.h | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/qt/RGBController/controllerwindow.h b/qt/RGBController/controllerwindow.h index 350a599..d8c2403 100755 --- a/qt/RGBController/controllerwindow.h +++ b/qt/RGBController/controllerwindow.h @@ -8,6 +8,7 @@ #include <QFile> #include <QSerialPortInfo> #include <QTextStream> +#include <QMessageBox> #include "serial_communication.h" #include "ui_controllerwindow.h" @@ -23,53 +24,54 @@ class controllerWindow : public QMainWindow explicit controllerWindow(QWidget *parent = 0); ~controllerWindow(); - /* public functions */ - void info_log(QString text); - void populate_serial_list(); - void load_presets(); - void serial_rgb_change(int r, int g, int b); - /*public variables */ - /* these three ints will hold the current value (0 - 255) of each slider */ - int r, g, b; - /* this list will contain all the presets loaded from file */ - QStringList presets; - /* this string will hold our selected serial port */ - QString port; - /* this int will contain the current preset index selected */ - int preset_index; + /* public functions */ + void info_log(QString text); + void populate_serial_list(); + void load_presets(); + void serial_rgb_change(int r, int g, int b); + void show_msgbox(QString message); + /*public variables */ + /* these three ints will hold the current value (0 - 255) of each slider */ + int r, g, b; + /* this list will contain all the presets loaded from file */ + QStringList presets; + /* this string will hold our selected serial port */ + QString port; + /* this int will contain the current preset index selected */ + int preset_index; -private slots: - /* these slots are used to trigger button clicks and drop down items selections etc */ - void on_connect_button_clicked(); + private slots: + /* these slots are used to trigger button clicks and drop down items selections etc */ + void on_connect_button_clicked(); - void on_disconnect_button_clicked(); + void on_disconnect_button_clicked(); - void on_refresh_port_button_clicked(); + void on_refresh_port_button_clicked(); - void on_reload_preset_button_clicked(); + void on_reload_preset_button_clicked(); - void on_r_slider_valueChanged(int value); + void on_r_slider_valueChanged(int value); - void on_g_slider_valueChanged(int value); + void on_g_slider_valueChanged(int value); - void on_b_slider_valueChanged(int value); + void on_b_slider_valueChanged(int value); - void on_red_button_clicked(); + void on_red_button_clicked(); - void on_green_button_clicked(); + void on_green_button_clicked(); - void on_blue_button_clicked(); + void on_blue_button_clicked(); - void on_off_button_clicked(); + void on_off_button_clicked(); - void on_set_preset_button_clicked(); + void on_set_preset_button_clicked(); - void on_presets_dropdown_currentIndexChanged(int index); + void on_presets_dropdown_currentIndexChanged(int index); -private: + private: Ui::controllerWindow *ui; - /* serial communication object */ - serial_communication portf; + /* serial communication object */ + serial_communication portf; }; #endif // CONTROLLERWINDOW_H |