ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <src/ckb/kbwidget.h>
Public Slots | |
void | showFirstTab () |
void | showLastTab () |
void | showFwUpdate () |
Public Member Functions | |
KbWidget (QWidget *parent, Kb *_device) | |
~KbWidget () | |
QString | name () const |
void | updateFwButton () |
Data Fields | |
Kb * | device |
bool | hasShownNewFW |
Private Slots | |
void | updateProfileList () |
void | profileChanged () |
void | on_profileBox_activated (int index) |
QIcon | modeIcon (int i) |
void | addNewModeItem () |
void | modeChanged (bool spontaneous=true) |
void | on_modesList_currentItemChanged (QListWidgetItem *current, QListWidgetItem *previous) |
void | modesList_reordered () |
void | on_modesList_itemChanged (QListWidgetItem *item) |
void | on_modesList_itemClicked (QListWidgetItem *item) |
void | on_modesList_customContextMenuRequested (const QPoint &pos) |
KbWidget::on_modesList_customContextMenuRequested. More... | |
void | devUpdate () |
void | modeUpdate () |
void | on_hwSaveButton_clicked () |
void | on_tabWidget_currentChanged (int index) |
void | on_fwUpdButton_clicked () |
Private Attributes | |
Ui::KbWidget * | ui |
quint64 | lastAutoSave |
KbMode * | currentMode |
Static Private Attributes | |
static const int | GUID = Qt::UserRole |
static const int | NEW_FLAG = Qt::UserRole + 1 |
Definition at line 15 of file kbwidget.h.
Definition at line 15 of file kbwidget.cpp.
References device, devUpdate(), Kb::features, Ui_KbWidget::fwUpdButton, Ui_KbWidget::fwUpdLabel, Ui_KbWidget::fwUpdLayout, Kb::isKeyboard(), Kb::isMouse(), Ui_KbWidget::kPerfTab, Ui_KbWidget::lightTab, Ui_KbWidget::lightWidget, modeChanged(), Ui_KbWidget::modesList, modesList_reordered(), Kb::monochrome, Ui_KbWidget::mPerfTab, Ui_KbWidget::pollLabel, Ui_KbWidget::pollLabel2, profileChanged(), KbLightWidget::setMonochrome(), Ui_KbWidget::setupUi(), Ui_KbWidget::tabWidget, ui, and updateProfileList().
KbWidget::~KbWidget | ( | ) |
Definition at line 60 of file kbwidget.cpp.
References ui.
|
privateslot |
Definition at line 136 of file kbwidget.cpp.
References Ui_KbWidget::modesList, NEW_FLAG, and ui.
Referenced by on_modesList_itemClicked(), and profileChanged().
|
privateslot |
Definition at line 300 of file kbwidget.cpp.
References device, Kb::firmware, Ui_KbWidget::fwLabel, Ui_KbWidget::pollLabel, Kb::pollrate, Ui_KbWidget::serialLabel, ui, and Kb::usbSerial.
Referenced by KbWidget().
|
privateslot |
Definition at line 148 of file kbwidget.cpp.
References Ui_KbWidget::bindWidget, Kb::currentBind(), Kb::currentLight(), currentMode, Kb::currentMode(), Kb::currentPerf(), Kb::currentProfile(), device, KbProfile::indexOf(), Ui_KbWidget::kPerfWidget, Ui_KbWidget::lightWidget, Ui_KbWidget::modesList, modeUpdate(), Ui_KbWidget::mPerfWidget, KbBindWidget::setBind(), KbLightWidget::setLight(), KPerfWidget::setPerf(), MPerfWidget::setPerf(), and ui.
Referenced by KbWidget(), and on_modesList_customContextMenuRequested().
|
privateslot |
Definition at line 127 of file kbwidget.cpp.
References Kb::currentProfile(), device, Kb::hwModeCount, and Kb::hwProfile().
Referenced by modesList_reordered(), and profileChanged().
|
privateslot |
Definition at line 177 of file kbwidget.cpp.
References Kb::currentProfile(), device, KbProfile::find(), GUID, modeIcon(), KbProfile::modes(), Ui_KbWidget::modesList, NEW_FLAG, and ui.
Referenced by KbWidget().
|
privateslot |
Definition at line 307 of file kbwidget.cpp.
Referenced by modeChanged().
|
inline |
Definition at line 25 of file kbwidget.h.
References device, and Kb::usbModel.
Referenced by MainWindow::addDevice().
|
privateslot |
Definition at line 339 of file kbwidget.cpp.
References device, FwUpgradeDialog::exec(), Kb::features, Kb::firmware, Ui_KbWidget::fwUpdButton, KbFirmware::hasDownloaded(), ui, updateFwButton(), and KbFirmware::versionForBoard().
Referenced by showFwUpdate().
|
privateslot |
Definition at line 310 of file kbwidget.cpp.
References device, Kb::hwSave(), profileChanged(), Kb::save(), and updateProfileList().
|
privateslot |
Definition at line 168 of file kbwidget.cpp.
References Kb::currentProfile(), device, KbProfile::find(), GUID, and Kb::setCurrentMode().
|
privateslot |
pos | Opens on right click in the profiles list a context sensitive menue at position pos. |
When clicking on a command it is located and executed.
Definition at line 236 of file kbwidget.cpp.
References currentMode, Kb::currentProfile(), device, UsbId::guid, GUID, Kb::hwModeCount, KbMode::id(), KbProfile::indexOf(), KbProfile::insert(), modeChanged(), KbProfile::modeCount(), KbProfile::modes(), Ui_KbWidget::modesList, KbMode::newId(), Kb::newMode(), profileChanged(), KbProfile::removeAll(), Kb::setCurrentMode(), and ui.
|
privateslot |
Definition at line 199 of file kbwidget.cpp.
References currentMode, UsbId::guid, GUID, KbMode::id(), and KbMode::name().
|
privateslot |
Definition at line 207 of file kbwidget.cpp.
References addNewModeItem(), KbProfile::append(), Kb::currentProfile(), device, UsbId::guid, GUID, KbMode::id(), Ui_KbWidget::modesList, NEW_FLAG, Kb::newMode(), Kb::setCurrentMode(), and ui.
|
privateslot |
Definition at line 113 of file kbwidget.cpp.
References device, Kb::profiles(), Kb::setCurrentProfile(), and updateProfileList().
|
privateslot |
Definition at line 317 of file kbwidget.cpp.
References device, Ui_KbWidget::tabWidget, ui, and updateFwButton().
|
privateslot |
Definition at line 91 of file kbwidget.cpp.
References addNewModeItem(), current, currentMode, Kb::currentProfile(), device, UsbId::guid, GUID, KbMode::id(), modeIcon(), KbProfile::modes(), Ui_KbWidget::modesList, KbMode::name(), and ui.
Referenced by KbWidget(), on_hwSaveButton_clicked(), and on_modesList_customContextMenuRequested().
|
slot |
|
inlineslot |
Definition at line 38 of file kbwidget.h.
References on_fwUpdButton_clicked().
Referenced by MainWindow::showFwUpdateNotification().
|
slot |
Definition at line 68 of file kbwidget.cpp.
References Ui_KbWidget::tabWidget, and ui.
Referenced by MainWindow::showFwUpdateNotification().
void KbWidget::updateFwButton | ( | ) |
Definition at line 326 of file kbwidget.cpp.
References device, Kb::features, Kb::firmware, Ui_KbWidget::fwUpdButton, KbFirmware::hasDownloaded(), ui, and KbFirmware::versionForBoard().
Referenced by MainWindow::checkFwUpdates(), on_fwUpdButton_clicked(), and on_tabWidget_currentChanged().
|
privateslot |
Definition at line 73 of file kbwidget.cpp.
References Kb::currentProfile(), device, Kb::hwProfile(), KbProfile::name(), Ui_KbWidget::profileBox, Kb::profiles(), and ui.
Referenced by KbWidget(), on_hwSaveButton_clicked(), and on_profileBox_activated().
|
private |
Definition at line 44 of file kbwidget.h.
Referenced by modeChanged(), on_modesList_customContextMenuRequested(), on_modesList_itemChanged(), and profileChanged().
Kb* KbWidget::device |
Definition at line 24 of file kbwidget.h.
Referenced by MainWindow::addDevice(), MainWindow::checkFwUpdates(), devUpdate(), KbWidget(), modeChanged(), modeIcon(), modesList_reordered(), name(), on_fwUpdButton_clicked(), on_hwSaveButton_clicked(), on_modesList_currentItemChanged(), on_modesList_customContextMenuRequested(), on_modesList_itemClicked(), on_profileBox_activated(), on_tabWidget_currentChanged(), profileChanged(), MainWindow::removeDevice(), MainWindow::showFwUpdateNotification(), updateFwButton(), and updateProfileList().
|
staticprivate |
Definition at line 46 of file kbwidget.h.
Referenced by modesList_reordered(), on_modesList_currentItemChanged(), on_modesList_customContextMenuRequested(), on_modesList_itemChanged(), on_modesList_itemClicked(), and profileChanged().
bool KbWidget::hasShownNewFW |
Definition at line 28 of file kbwidget.h.
Referenced by MainWindow::checkFwUpdates().
|
private |
Definition at line 42 of file kbwidget.h.
|
staticprivate |
Definition at line 47 of file kbwidget.h.
Referenced by addNewModeItem(), modesList_reordered(), and on_modesList_itemClicked().
|
private |
Definition at line 41 of file kbwidget.h.
Referenced by addNewModeItem(), devUpdate(), KbWidget(), modeChanged(), modesList_reordered(), on_fwUpdButton_clicked(), on_modesList_customContextMenuRequested(), on_modesList_itemClicked(), on_tabWidget_currentChanged(), profileChanged(), showFirstTab(), showLastTab(), updateFwButton(), updateProfileList(), and ~KbWidget().