ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <src/ckb/kbprofile.h>
Public Types | |
typedef QList< KbMode * > | ModeList |
Public Member Functions | |
KbProfile (Kb *parent, const KeyMap &keyMap, const KbProfile &other) | |
KbProfile (Kb *parent, const KeyMap &keyMap, const QString &guid="", const QString &modified="") | |
KbProfile (Kb *parent, const KeyMap &keyMap, CkbSettings &settings, const QString &guid) | |
void | save (CkbSettings &settings) |
bool | needsSave () const |
void | setNeedsSave () |
QString | name () const |
void | name (const QString &newName) |
UsbId & | id () |
void | id (const UsbId &newId) |
void | newId () |
const KeyMap & | keyMap () const |
void | keyMap (const KeyMap &newKeyMap) |
const ModeList & | modes () const |
void | modes (const QList< KbMode * > &newModes) |
void | append (KbMode *newMode) |
void | insert (int index, KbMode *newMode) |
void | removeAll (KbMode *mode) |
void | move (int from, int to) |
int | modeCount () const |
int | indexOf (KbMode *mode) const |
KbMode * | find (const QUuid &id) |
KbMode * | currentMode () const |
void | currentMode (KbMode *newCurrentMode) |
Private Member Functions | |
void | setNeedsUpdate () |
Private Attributes | |
KbMode * | _currentMode |
QString | _name |
UsbId | _id |
KeyMap | _keyMap |
ModeList | _modes |
bool | _needsSave |
Definition at line 11 of file kbprofile.h.
typedef QList<KbMode*> KbProfile::ModeList |
Definition at line 41 of file kbprofile.h.
Definition at line 4 of file kbprofile.cpp.
References _currentMode, _modes, and modes().
|
explicit |
Definition at line 15 of file kbprofile.cpp.
References _id, and UsbId::guid.
|
explicit |
Definition at line 22 of file kbprofile.cpp.
References _currentMode, _id, _keyMap, _modes, _name, CkbSettings::contains(), current, UsbId::guid, UsbId::hwModified, UsbId::hwModifiedString(), KbMode::id(), UsbId::modified, UsbId::modifiedString(), and CkbSettings::value().
|
inline |
Definition at line 44 of file kbprofile.h.
References _modes, and setNeedsUpdate().
Referenced by Kb::hwSave(), KbWidget::on_modesList_itemClicked(), KbProfileDialog::profileList_reordered(), Kb::readNotify(), and Kb::setCurrentProfile().
|
inline |
Definition at line 54 of file kbprofile.h.
References _currentMode.
Referenced by KeyAction::keyEvent(), KbBindWidget::on_copyButton_clicked(), KPerfWidget::on_copyButton_clicked(), MPerfWidget::on_copyButton_clicked(), Kb::setCurrentMode(), and Kb::setCurrentProfile().
|
inline |
|
inline |
Definition at line 51 of file kbprofile.h.
References _modes, UsbId::guid, id(), and KbMode::id().
Referenced by KbWidget::modesList_reordered(), and KbWidget::on_modesList_currentItemChanged().
|
inline |
Definition at line 30 of file kbprofile.h.
References _id.
Referenced by find(), Kb::find(), Kb::hwSave(), KbProfileDialog::on_profileList_customContextMenuRequested(), KbProfileDialog::on_profileList_itemChanged(), KbProfileDialog::on_profileList_itemClicked(), Kb::readNotify(), KbProfileDialog::repopulate(), Kb::save(), and Kb::writeProfileHeader().
|
inline |
Definition at line 31 of file kbprofile.h.
References _id, _needsSave, and newId().
|
inline |
Definition at line 50 of file kbprofile.h.
References _modes.
Referenced by Kb::frameUpdate(), KeyAction::keyEvent(), KbWidget::modeChanged(), KbWidget::on_modesList_customContextMenuRequested(), and Kb::readNotify().
|
inline |
Definition at line 45 of file kbprofile.h.
References _modes, and setNeedsUpdate().
Referenced by KbWidget::on_modesList_customContextMenuRequested().
|
inline |
Definition at line 37 of file kbprofile.h.
References _keyMap.
Referenced by KPerfWidget::setPerf(), and Kb::updateLayout().
void KbProfile::keyMap | ( | const KeyMap & | newKeyMap | ) |
Definition at line 85 of file kbprofile.cpp.
References _keyMap, _modes, KbMode::keyMap(), and setNeedsUpdate().
|
inline |
Definition at line 49 of file kbprofile.h.
References _modes.
Referenced by Kb::hwSave(), KeyAction::keyEvent(), KbWidget::on_modesList_customContextMenuRequested(), Kb::readNotify(), save(), and Kb::setCurrentProfile().
|
inline |
Definition at line 42 of file kbprofile.h.
References _modes.
Referenced by Kb::hwSave(), KbProfile(), KeyAction::keyEvent(), KbWidget::modesList_reordered(), KbBindWidget::on_copyButton_clicked(), KPerfWidget::on_copyButton_clicked(), MPerfWidget::on_copyButton_clicked(), KbWidget::on_modesList_customContextMenuRequested(), KbWidget::profileChanged(), Kb::readNotify(), RebindWidget::setBind(), Kb::setCurrentMode(), Kb::setCurrentProfile(), and Kb::updateLayout().
|
inline |
Definition at line 43 of file kbprofile.h.
References _modes, and setNeedsUpdate().
|
inline |
Definition at line 47 of file kbprofile.h.
References _modes, and setNeedsUpdate().
Referenced by Kb::readNotify().
|
inline |
Definition at line 28 of file kbprofile.h.
References _name.
Referenced by KbProfileDialog::on_profileList_itemChanged(), Kb::readNotify(), KbProfileDialog::repopulate(), save(), KbWidget::updateProfileList(), and Kb::writeProfileHeader().
|
inline |
bool KbProfile::needsSave | ( | ) | const |
Definition at line 68 of file kbprofile.cpp.
References _modes, _needsSave, and KbMode::needsSave().
Referenced by Kb::needsSave().
void KbProfile::newId | ( | ) |
Definition at line 78 of file kbprofile.cpp.
References _id, _modes, _needsSave, and KbMode::newId().
Referenced by id(), and KbProfileDialog::on_profileList_customContextMenuRequested().
|
inline |
Definition at line 46 of file kbprofile.h.
References _modes, and setNeedsUpdate().
Referenced by KbWidget::on_modesList_customContextMenuRequested(), and KbProfileDialog::on_profileList_customContextMenuRequested().
void KbProfile::save | ( | CkbSettings & | settings | ) |
Definition at line 48 of file kbprofile.cpp.
References _currentMode, _id, _modes, _needsSave, UsbId::guidString(), UsbId::hwModifiedString(), KbMode::id(), modeCount(), UsbId::modifiedString(), name(), UsbId::newModified(), KbMode::save(), and CkbSettings::setValue().
Referenced by Kb::save().
|
inline |
Definition at line 25 of file kbprofile.h.
References _needsSave.
Referenced by Kb::hwSave(), Kb::readNotify(), and setNeedsUpdate().
|
inlineprivate |
Definition at line 66 of file kbprofile.h.
References _modes, setNeedsSave(), and KbMode::setNeedsUpdate().
Referenced by append(), insert(), keyMap(), modes(), move(), and removeAll().
|
private |
Definition at line 58 of file kbprofile.h.
Referenced by currentMode(), KbProfile(), and save().
|
private |
Definition at line 60 of file kbprofile.h.
Referenced by id(), KbProfile(), newId(), and save().
|
private |
Definition at line 61 of file kbprofile.h.
Referenced by KbProfile(), and keyMap().
|
private |
Definition at line 62 of file kbprofile.h.
Referenced by append(), find(), indexOf(), insert(), KbProfile(), keyMap(), modeCount(), modes(), move(), needsSave(), newId(), removeAll(), save(), and setNeedsUpdate().
|
private |
Definition at line 59 of file kbprofile.h.
Referenced by KbProfile(), and name().
|
private |
Definition at line 63 of file kbprofile.h.
Referenced by currentMode(), id(), name(), needsSave(), newId(), save(), and setNeedsSave().