forked from kakaZzzz/dpc_linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathradilightwidget.h
76 lines (50 loc) · 1.69 KB
/
radilightwidget.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
#ifndef RADILIGHTWIDGET_H
#define RADILIGHTWIDGET_H
#include <QWidget>
#include <QListWidgetItem>
#include "qkeyboardctrl.h"
#include "devicecomm.h"
#include "devicedb.h"
namespace Ui {
class RadiLightWidget;
}
class RadiLightWidget : public QWidget
{
Q_OBJECT
public:
explicit RadiLightWidget(QWidget *parent = 0, DeviceComm *dev_comm = NULL, DeviceDB *dev_db = NULL);
~RadiLightWidget();
protected:
// init control ui
void initUI();
QKeyboardCtrl* m_keyboard_ctrl;
DeviceComm* m_dev_comm;
DeviceDB* m_dev_db;
int m_current_mode;
int m_current_profile;
private slots:
void on_listWidget_light_clicked(const QModelIndex &index);
void on_horizontalSlider_brightness_valueChanged(int value);
void on_horizontalSlider_speed_valueChanged(int value);
void on_button_custom_clicked();
void on_checkBox_custom_clicked();
void on_checkBox_select_all_clicked();
void on_checkBox_top_side_led_clicked();
void on_checkBox_left_side_led_clicked();
void on_checkBox_right_side_led_clicked();
void on_checkBox_bottom_side_led_clicked();
void on_checkBox_wasd_clicked();
void on_checkBox_arrows_clicked();
void on_checkBox_number_clicked();
void on_checkBox_functions_clicked();
void on_button_reset_all_leds_clicked();
private:
Ui::RadiLightWidget *ui;
// get light mode by list index
int getLightModeByIndex(int index);
// get list index by light mode
int getIndexByLightMode(int mode);
// set backlight mode
void setBackLightMode(int light_mode);
};
#endif // RADILIGHTWIDGET_H