ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
kperfwidget.h
Go to the documentation of this file.
1
#ifndef KPERFWIDGET_H
2
#define KPERFWIDGET_H
3
4
#include <QWidget>
5
#include <QCheckBox>
6
#include <QComboBox>
7
#include <QSignalMapper>
8
#include "
kbperf.h
"
9
#include "
kbprofile.h
"
10
#include "
colorbutton.h
"
11
12
namespace
Ui {
13
class
KPerfWidget
;
14
}
15
16
class
KPerfWidget
:
public
QWidget
17
{
18
Q_OBJECT
19
20
public
:
21
explicit
KPerfWidget
(
QWidget
*parent = 0);
22
~KPerfWidget
();
23
24
void
setPerf
(
KbPerf
* newPerf,
KbProfile
* newProfile);
25
26
static
const
int
I_COUNT
=
KbPerf::I_COUNT
;
27
static
const
int
HW_I_COUNT
=
KbPerf::HW_I_COUNT
;
28
typedef
KbPerf::indicator
indicator
;
29
typedef
KbPerf::i_hw
i_hw
;
30
31
private
:
32
Ui::KPerfWidget
*
ui
;
33
34
KbPerf
*
perf
;
35
KbProfile
*
profile
;
36
37
// Hardware indicator dropdowns
38
enum
HwMode
{
39
NORMAL
,
40
ALWAYS_ON
,
41
ALWAYS_OFF
,
42
RGB
,
43
BOTH
44
};
45
HwMode
raw2Mode
(
bool
sw_enable,
i_hw
hw_enable);
46
52
void
mode2Raw
(
HwMode
mode,
bool
& sw_enable,
i_hw
& hw_enable);
53
54
struct
IndicatorUi
{
55
QCheckBox*
enable
;
56
QComboBox*
hwEnable
;
57
ColorButton
*
color1
, *
color2
, *
color3
;
58
};
59
IndicatorUi
indicators
[
I_COUNT
];
60
QList<QWidget*>
k95Widgets
;
61
62
QSignalMapper
updateMapper
;
63
64
private
slots:
65
void
uiUpdated
(
int
index);
66
void
on_intensityBox_valueChanged
(
int
arg1);
67
void
on_copyButton_clicked
();
68
};
69
70
#endif // KPERFWIDGET_H
KbPerf::HW_I_COUNT
static const int HW_I_COUNT
Definition:
kbperf.h:107
KPerfWidget::HW_I_COUNT
static const int HW_I_COUNT
Definition:
kperfwidget.h:27
KbPerf::indicator
indicator
Definition:
kbperf.h:88
KPerfWidget::on_intensityBox_valueChanged
void on_intensityBox_valueChanged(int arg1)
Definition:
kperfwidget.cpp:215
colorbutton.h
KPerfWidget::RGB
Definition:
kperfwidget.h:42
KPerfWidget::indicators
IndicatorUi indicators[I_COUNT]
Definition:
kperfwidget.h:59
KPerfWidget::ui
Ui::KPerfWidget * ui
Definition:
kperfwidget.h:32
KPerfWidget::I_COUNT
static const int I_COUNT
Definition:
kperfwidget.h:26
KPerfWidget::BOTH
Definition:
kperfwidget.h:43
QWidget
ColorButton
Definition:
colorbutton.h:6
KPerfWidget::profile
KbProfile * profile
Definition:
kperfwidget.h:35
kbperf.h
KPerfWidget::indicator
KbPerf::indicator indicator
Definition:
kperfwidget.h:28
KPerfWidget::IndicatorUi::enable
QCheckBox * enable
Definition:
kperfwidget.h:55
KPerfWidget::on_copyButton_clicked
void on_copyButton_clicked()
Definition:
kperfwidget.cpp:221
KPerfWidget::NORMAL
Definition:
kperfwidget.h:39
KPerfWidget::IndicatorUi::hwEnable
QComboBox * hwEnable
Definition:
kperfwidget.h:56
Ui::KPerfWidget
Definition:
ui_kperfwidget.h:704
KPerfWidget::KPerfWidget
KPerfWidget(QWidget *parent=0)
KPerfWidget::KPerfWidget sets up the UI for Keyboard Performace panel.
Definition:
kperfwidget.cpp:10
KPerfWidget::raw2Mode
HwMode raw2Mode(bool sw_enable, i_hw hw_enable)
KPerfWidget::raw2Mode return hardware mode depending on setiings in sw_enable and hw_enable...
Definition:
kperfwidget.cpp:72
KPerfWidget
Definition:
kperfwidget.h:16
KPerfWidget::uiUpdated
void uiUpdated(int index)
Definition:
kperfwidget.cpp:187
KPerfWidget::IndicatorUi::color3
ColorButton * color3
Definition:
kperfwidget.h:57
KPerfWidget::ALWAYS_OFF
Definition:
kperfwidget.h:41
KbPerf
Definition:
kbperf.h:15
KbProfile
Definition:
kbprofile.h:11
KPerfWidget::updateMapper
QSignalMapper updateMapper
Definition:
kperfwidget.h:62
KPerfWidget::i_hw
KbPerf::i_hw i_hw
Definition:
kperfwidget.h:29
KPerfWidget::mode2Raw
void mode2Raw(HwMode mode, bool &sw_enable, i_hw &hw_enable)
KPerfWidget::mode2Raw Set values of sw_enable and hw_enable to hte value corresponding to input var m...
Definition:
kperfwidget.cpp:100
KPerfWidget::HwMode
HwMode
Definition:
kperfwidget.h:38
KPerfWidget::IndicatorUi::color2
ColorButton * color2
Definition:
kperfwidget.h:57
KPerfWidget::perf
KbPerf * perf
Definition:
kperfwidget.h:34
kbprofile.h
KPerfWidget::IndicatorUi::color1
ColorButton * color1
Definition:
kperfwidget.h:57
KbPerf::i_hw
i_hw
Definition:
kbperf.h:101
KPerfWidget::setPerf
void setPerf(KbPerf *newPerf, KbProfile *newProfile)
Definition:
kperfwidget.cpp:125
KPerfWidget::k95Widgets
QList< QWidget * > k95Widgets
Definition:
kperfwidget.h:60
KPerfWidget::ALWAYS_ON
Definition:
kperfwidget.h:40
KbPerf::I_COUNT
static const int I_COUNT
Definition:
kbperf.h:107
KPerfWidget::~KPerfWidget
~KPerfWidget()
KPerfWidget::~KPerfWidget nothing unusual - just delete the ui object.
Definition:
kperfwidget.cpp:61
KPerfWidget::IndicatorUi
Definition:
kperfwidget.h:54
src
ckb
kperfwidget.h
Generated on Sat Jan 20 2018 16:59:28 for ckb-next by
1.8.6