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
kbwidget.h
Go to the documentation of this file.
1
#ifndef KBWIDGET_H
2
#define KBWIDGET_H
3
4
#include <QFile>
5
#include <QListWidgetItem>
6
#include <QWidget>
7
#include "
kb.h
"
8
9
// Central widget for displaying/controlling a device
10
11
namespace
Ui {
12
class
KbWidget
;
13
}
14
15
class
KbWidget
:
public
QWidget
16
{
17
Q_OBJECT
18
19
public
:
20
explicit
KbWidget
(
QWidget
*parent,
Kb
* _device);
21
~KbWidget
();
22
23
// Device handle
24
Kb
*
device
;
25
inline
QString
name
()
const
{
return
device
->
usbModel
; }
26
27
// Has the "there is a firmware upgrade for this device..." screen already been shown?
28
bool
hasShownNewFW
;
29
// Update the "Check for updates" label with the current status
30
void
updateFwButton
();
31
32
public
slots:
33
// Show a tab
34
void
showFirstTab
();
35
void
showLastTab
();
36
37
// Display firmware update dialog
38
inline
void
showFwUpdate
() {
on_fwUpdButton_clicked
(); }
39
40
private
:
41
Ui::KbWidget
*
ui
;
42
quint64
lastAutoSave
;
43
44
KbMode
*
currentMode
;
45
46
const
static
int
GUID
= Qt::UserRole;
47
const
static
int
NEW_FLAG
= Qt::UserRole + 1;
48
49
private
slots:
50
void
updateProfileList
();
51
void
profileChanged
();
52
void
on_profileBox_activated
(
int
index);
53
54
QIcon
modeIcon
(
int
i);
55
void
addNewModeItem
();
56
57
void
modeChanged
(
bool
spontaneous =
true
);
58
void
on_modesList_currentItemChanged
(QListWidgetItem *
current
, QListWidgetItem *previous);
59
void
modesList_reordered
();
60
void
on_modesList_itemChanged
(QListWidgetItem *item);
61
void
on_modesList_itemClicked
(QListWidgetItem *item);
62
void
on_modesList_customContextMenuRequested
(
const
QPoint &pos);
63
64
void
devUpdate
();
65
void
modeUpdate
();
66
void
on_hwSaveButton_clicked
();
67
void
on_tabWidget_currentChanged
(
int
index);
68
void
on_fwUpdButton_clicked
();
69
};
70
71
#endif // KBWIDGET_H
KbWidget
Definition:
kbwidget.h:15
current
rgb * current
Definition:
main.c:46
KbWidget::modeUpdate
void modeUpdate()
Definition:
kbwidget.cpp:307
KbWidget::GUID
static const int GUID
Definition:
kbwidget.h:46
KbWidget::updateFwButton
void updateFwButton()
Definition:
kbwidget.cpp:326
Ui::KbWidget
Definition:
ui_kbwidget.h:291
QWidget
KbWidget::lastAutoSave
quint64 lastAutoSave
Definition:
kbwidget.h:42
KbWidget::currentMode
KbMode * currentMode
Definition:
kbwidget.h:44
KbWidget::on_modesList_itemClicked
void on_modesList_itemClicked(QListWidgetItem *item)
Definition:
kbwidget.cpp:207
KbWidget::on_tabWidget_currentChanged
void on_tabWidget_currentChanged(int index)
Definition:
kbwidget.cpp:317
KbWidget::on_hwSaveButton_clicked
void on_hwSaveButton_clicked()
Definition:
kbwidget.cpp:310
KbWidget::KbWidget
KbWidget(QWidget *parent, Kb *_device)
Definition:
kbwidget.cpp:15
KbWidget::name
QString name() const
Definition:
kbwidget.h:25
KbWidget::modeChanged
void modeChanged(bool spontaneous=true)
Definition:
kbwidget.cpp:148
KbWidget::hasShownNewFW
bool hasShownNewFW
Definition:
kbwidget.h:28
KbMode
Definition:
kbmode.h:36
kb.h
KbWidget::showFwUpdate
void showFwUpdate()
Definition:
kbwidget.h:38
KbWidget::showLastTab
void showLastTab()
Definition:
kbwidget.cpp:68
Kb
Definition:
kb.h:11
KbWidget::on_profileBox_activated
void on_profileBox_activated(int index)
Definition:
kbwidget.cpp:113
KbWidget::NEW_FLAG
static const int NEW_FLAG
Definition:
kbwidget.h:47
Kb::usbModel
QString usbModel
Definition:
kb.h:16
KbWidget::showFirstTab
void showFirstTab()
Definition:
kbwidget.cpp:64
KbWidget::modesList_reordered
void modesList_reordered()
Definition:
kbwidget.cpp:177
KbWidget::ui
Ui::KbWidget * ui
Definition:
kbwidget.h:41
KbWidget::~KbWidget
~KbWidget()
Definition:
kbwidget.cpp:60
KbWidget::devUpdate
void devUpdate()
Definition:
kbwidget.cpp:300
KbWidget::device
Kb * device
Definition:
kbwidget.h:24
KbWidget::profileChanged
void profileChanged()
Definition:
kbwidget.cpp:91
KbWidget::on_fwUpdButton_clicked
void on_fwUpdButton_clicked()
Definition:
kbwidget.cpp:339
KbWidget::on_modesList_itemChanged
void on_modesList_itemChanged(QListWidgetItem *item)
Definition:
kbwidget.cpp:199
KbWidget::addNewModeItem
void addNewModeItem()
Definition:
kbwidget.cpp:136
KbWidget::on_modesList_customContextMenuRequested
void on_modesList_customContextMenuRequested(const QPoint &pos)
KbWidget::on_modesList_customContextMenuRequested.
Definition:
kbwidget.cpp:236
KbWidget::modeIcon
QIcon modeIcon(int i)
Definition:
kbwidget.cpp:127
KbWidget::on_modesList_currentItemChanged
void on_modesList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
Definition:
kbwidget.cpp:168
KbWidget::updateProfileList
void updateProfileList()
Definition:
kbwidget.cpp:73
src
ckb
kbwidget.h
Generated on Sat Jan 20 2018 16:59:28 for ckb-next by
1.8.6