ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <src/ckb/keymap.h>
Public Types | |
enum | Model { NO_MODEL = -1, K63, K65, K68, K70, K95, K95P, STRAFE, M65, SABRE, SCIMITAR, HARPOON, GLAIVE, _MODEL_MAX } |
enum | Layout { NO_LAYOUT = -1, DK, EU, EU_DVORAK, GB, GB_DVORAK, US, US_DVORAK, FR, DE, IT, JP, NO, PL, PT_BR, MX, ES, SE, _LAYOUT_MAX } |
Public Member Functions | |
bool | isISO () const |
bool | isJP () const |
bool | isPTBR () const |
bool | isKeyboard () const |
bool | isMouse () const |
KeyMap () | |
KeyMap (Model _keyModel, Layout _keyLayout) | |
QString | strLayout () const |
QString | strModel () const |
Model | model () const |
Layout | layout () const |
QString | name () const |
uint | count () const |
uint | width () const |
uint | height () const |
Key | key (const QString &name) const |
Key | operator[] (const QString &name) const |
bool | contains (const QString &name) const |
const QHash< QString, Key > & | map () const |
operator const QHash< QString, Key > & () const | |
QStringList | keys () const |
QList< Key > | positions () const |
QString | toStorage (const QString &name) |
QString | fromStorage (const QString &storage) |
QStringList | byPosition () const |
Static Public Member Functions | |
static QStringList | layoutNames () |
static bool | isISO (Layout layout) |
static bool | isJP (Layout layout) |
static bool | isPTBR (Layout layout) |
static Layout | locale () |
static bool | isKeyboard (Model model) |
static bool | isMouse (Model model) |
static KeyMap | fromName (const QString &name) |
static Layout | getLayout (const QString &name) |
static QString | getLayout (Layout layout) |
static Model | getModel (const QString &name) |
static QString | getModel (Model model) |
static QString | friendlyName (const QString &key, Layout layout=US) |
Static Private Member Functions | |
static int | modelWidth (Model model) |
static int | modelHeight (Model model) |
Private Attributes | |
QHash< QString, Key > | _keys |
short | keyWidth |
short | keyHeight |
Model | keyModel:8 |
Layout | keyLayout:8 |
enum KeyMap::Layout |
Enumerator | |
---|---|
NO_LAYOUT | |
DK | |
EU | |
EU_DVORAK | |
GB | |
GB_DVORAK | |
US | |
US_DVORAK | |
FR | |
DE | |
IT | |
JP | |
NO | |
PL | |
PT_BR | |
MX | |
ES | |
SE | |
_LAYOUT_MAX |
Definition at line 70 of file keymap.h.
enum KeyMap::Model |
Enumerator | |
---|---|
NO_MODEL | |
K63 | |
K65 | |
K68 | |
K70 | |
K95 | |
K95P | |
STRAFE | |
M65 | |
SABRE | |
SCIMITAR | |
HARPOON | |
GLAIVE | |
_MODEL_MAX |
Definition at line 51 of file keymap.h.
KeyMap::KeyMap | ( | ) |
Definition at line 897 of file keymap.cpp.
Referenced by friendlyName(), and fromName().
Definition at line 891 of file keymap.cpp.
QStringList KeyMap::byPosition | ( | ) | const |
Definition at line 902 of file keymap.cpp.
References Key::x, x, Key::y, and y.
Referenced by RebindWidget::setBind().
|
inline |
Definition at line 143 of file keymap.h.
References _keys.
Referenced by friendlyName(), and KbAnimWidget::on_keyButton_clicked().
|
inline |
Definition at line 134 of file keymap.h.
References _keys.
Referenced by KeyWidget::map(), KbBindWidget::on_copyButton_clicked(), and KbBindWidget::on_resetButton_clicked().
Definition at line 925 of file keymap.cpp.
References contains(), HARPOON, K95, KeyMap(), M65, map(), SCIMITAR, and STRAFE.
Referenced by KeyAction::friendlyName(), and RebindWidget::RebindWidget().
|
static |
Definition at line 835 of file keymap.cpp.
References getLayout(), getModel(), and KeyMap().
Referenced by KbBind::load(), and KbLight::load().
|
inline |
Definition at line 151 of file keymap.h.
Referenced by KbAnim::KbAnim(), KbBind::load(), and KbLight::load().
|
static |
Definition at line 677 of file keymap.cpp.
References DE, DK, ES, EU, EU_DVORAK, FR, GB, GB_DVORAK, IT, JP, MX, NO, NO_LAYOUT, PL, PT_BR, SE, US, and US_DVORAK.
Referenced by fromName(), SettingsWidget::on_layoutBox_activated(), SettingsWidget::SettingsWidget(), and strLayout().
|
static |
Definition at line 716 of file keymap.cpp.
References DE, DK, ES, EU, EU_DVORAK, FR, GB, GB_DVORAK, IT, JP, MX, NO, PL, PT_BR, SE, US, and US_DVORAK.
|
static |
Definition at line 775 of file keymap.cpp.
References GLAIVE, HARPOON, K63, K65, K68, K70, K95, K95P, M65, NO_MODEL, SABRE, SCIMITAR, and STRAFE.
Referenced by fromName(), Kb::Kb(), and strModel().
|
static |
Definition at line 804 of file keymap.cpp.
References GLAIVE, HARPOON, K63, K65, K68, K70, K95, K95P, M65, SABRE, SCIMITAR, and STRAFE.
|
inline |
Definition at line 138 of file keymap.h.
References keyHeight.
Referenced by KeyWidget::drawInfo(), and KeyWidget::map().
|
inlinestatic |
Definition at line 94 of file keymap.h.
References PL, US, and US_DVORAK.
Referenced by KbBind::isISO(), and RebindWidget::setBind().
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
Definition at line 109 of file keymap.h.
References isMouse(), and NO_MODEL.
Referenced by KbBind::isKeyboard().
|
inline |
Definition at line 110 of file keymap.h.
References isKeyboard(), and keyModel.
Referenced by Kb::isKeyboard(), and isKeyboard().
|
inlinestatic |
Definition at line 111 of file keymap.h.
References GLAIVE, HARPOON, M65, SABRE, and SCIMITAR.
Referenced by KbBind::isMouse(), KeyWidget::map(), KbLightWidget::newSelection(), and KeyWidget::paintEvent().
|
inline |
Definition at line 112 of file keymap.h.
References isMouse(), and keyModel.
Referenced by isKeyboard(), Kb::isMouse(), isMouse(), and KeyWidget::paintEvent().
|
inlinestatic |
|
inline |
|
inline |
Definition at line 141 of file keymap.h.
References _keys.
Referenced by AnimScript::begin(), AnimScript::keypress(), KbBind::noAction(), operator[](), KbBind::setAction(), and toStorage().
|
inline |
Definition at line 147 of file keymap.h.
References _keys.
Referenced by KeyWidget::mouseReleaseEvent(), KbBindWidget::on_copyButton_clicked(), KbBindWidget::on_resetButton_clicked(), KeyWidget::setAnimation(), KeyWidget::setSelection(), and KbBindWidget::updateBind().
|
inline |
Definition at line 130 of file keymap.h.
References keyLayout.
Referenced by KeyAction::friendlyName(), KeyWidget::paintEvent(), and RebindWidget::setBind().
|
static |
Definition at line 757 of file keymap.cpp.
Referenced by LayoutDialog::LayoutDialog(), and SettingsWidget::SettingsWidget().
|
static |
Definition at line 641 of file keymap.cpp.
References DE, DK, ES, FR, GB, IT, JP, MX, NO, PL, PT_BR, SE, and US.
Referenced by SettingsWidget::SettingsWidget().
|
inline |
Definition at line 145 of file keymap.h.
References _keys.
Referenced by friendlyName().
|
inline |
Definition at line 129 of file keymap.h.
References keyModel.
Referenced by KeyWidget::mouseMoveEvent(), KeyWidget::paintEvent(), and KPerfWidget::setPerf().
|
staticprivate |
Definition at line 869 of file keymap.cpp.
References GLAIVE, HARPOON, K63, K65, K68, K70, K95, K95_HEIGHT, K95P, K95P_HEIGHT, M65, M65_HEIGHT, SABRE, SCIMITAR, and STRAFE.
|
staticprivate |
Definition at line 842 of file keymap.cpp.
References GLAIVE, HARPOON, K63, K63_WIDTH, K65, K65_WIDTH, K68, K68_WIDTH, K70, K70_WIDTH, K95, K95_WIDTH, K95P, K95P_WIDTH, KSTRAFE_WIDTH, M65, M65_WIDTH, SABRE, SCIMITAR, and STRAFE.
|
inline |
Definition at line 131 of file keymap.h.
References strLayout(), and strModel().
Referenced by KbBind::save(), KbLight::save(), and toStorage().
|
inline |
|
inline |
|
inline |
Definition at line 148 of file keymap.h.
References _keys.
Referenced by ColorMap::init(), and KeyWidget::selectAll().
|
inline |
Definition at line 122 of file keymap.h.
References getLayout(), and keyLayout.
Referenced by name().
|
inline |
Definition at line 126 of file keymap.h.
References getModel(), and keyModel.
Referenced by name().
|
inline |
Definition at line 150 of file keymap.h.
References key(), name(), and Key::storageName().
|
inline |
Definition at line 136 of file keymap.h.
References keyWidth.
Referenced by KeyWidget::drawInfo(), and KeyWidget::map().
|
private |
Definition at line 163 of file keymap.h.
Referenced by contains(), count(), key(), keys(), map(), operator const QHash< QString, Key > &(), and positions().
|
private |
|
private |
Definition at line 165 of file keymap.h.
Referenced by isKeyboard(), isMouse(), model(), and strModel().