ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RebindWidget Class Reference

#include <src/ckb/rebindwidget.h>

+ Inheritance diagram for RebindWidget:
+ Collaboration diagram for RebindWidget:

Public Member Functions

 RebindWidget (QWidget *parent)
 
 ~RebindWidget ()
 
void setBind (KbBind *newBind, KbProfile *newProfile)
 
void setSelection (const QStringList &newSelection, bool applyPrevious=false)
 

Private Slots

void applyChanges (const QStringList &keys, bool doUnbind)
 
void on_applyButton_clicked ()
 
void on_cancelButton_clicked ()
 
void on_resetButton_clicked ()
 
void on_unbindButton_clicked ()
 
void on_typingBox_currentIndexChanged (int index)
 
void on_modBox_currentIndexChanged (int index)
 
void on_fnBox_currentIndexChanged (int index)
 
void on_numBox_currentIndexChanged (int index)
 
void on_mediaBox_currentIndexChanged (int index)
 
void on_mbBox_currentIndexChanged (int index)
 
void on_mb2Box_currentIndexChanged (int index)
 
void on_wheelBox_currentIndexChanged (int index)
 
void on_dpiBox_currentIndexChanged (int index)
 
void on_modeBox_currentIndexChanged (int index)
 
void on_lightBox_currentIndexChanged (int index)
 
void on_lockBox_currentIndexChanged (int index)
 
void on_programKpBox_textChanged (const QString &arg1)
 
void on_programKrBox_textChanged (const QString &arg1)
 
void on_animBox_currentIndexChanged (int index)
 
void on_typingButton_clicked (bool checked)
 
void on_modButton_clicked (bool checked)
 
void on_fnButton_clicked (bool checked)
 
void on_numButton_clicked (bool checked)
 
void on_mediaButton_clicked (bool checked)
 
void on_mbButton_clicked (bool checked)
 
void on_mb2Button_clicked (bool checked)
 
void on_wheelButton_clicked (bool checked)
 
void on_dpiButton_clicked (bool checked)
 
void on_modeButton_clicked (bool checked)
 
void on_lightButton_clicked (bool checked)
 
void on_lockButton_clicked (bool checked)
 
void on_programKpButton_clicked (bool checked)
 
void on_programKrButton_clicked (bool checked)
 
void on_programKpSIBox_clicked (bool checked)
 
void on_programKrSIBox_clicked (bool checked)
 
void on_animButton_clicked (bool checked)
 
void on_pteMacroBox_textChanged ()
 
void on_btnStartMacro_clicked ()
 RebindWidget::on_btnStartMacro_clicked starts macro recording. A new notification channel and MacroReader are created to do the job. More...
 
void on_btnStopMacro_clicked ()
 RebindWidget::on_btnStopMacro_clicked ends the macro recording. Notify channel ist closed, the ReaderThread is deleted when the notification is really down. More...
 
void on_btnClearMacro_clicked ()
 RebindWidget::on_btnClearMacro_clicked changes the help info an the panel. The job of clearing the input panels is triggerd with signal/slot via the RebindWidget.ui file. More...
 
void on_rb_delay_no_toggled (bool checked)
 RebindWidget::on_rb_delay_no_toggled. More...
 
void on_rb_delay_asTyped_toggled (bool checked)
 RebindWidget::on_rb_delay_asTyped_toggled. More...
 
void on_rb_delay_default_toggled (bool checked)
 RebindWidget::on_rb_delay_default_toggled. More...
 

Private Member Functions

void setBox (QWidget *box)
 
void convertMacroBox ()
 RebindWidget::convertMacroBox converts the macroBox content. The KB sends each keypress as "key [+|-]<keyname><newline>" This is followed by timing information (delays between keystrokes). More...
 
void helpStatus (int status)
 RebindWidget::helpStatus shows a help line in the ui. More...
 
void setCorrectRadioButton (QString macdef)
 RebindWidget::setCorrectRadioButton. More...
 

Private Attributes

Ui::RebindWidgetui
 
KbBindbind
 
KbProfileprofile
 
QStringList selection
 
QStringList typingKeys
 
QStringList modKeys
 
QStringList fnKeys
 
QStringList numKeys
 
QStringList mediaKeys
 
QStringList mouseKeys
 
QStringList mouseExtKeys
 
QStringList wheelKeys
 
MacroReadermacReader
 macReader holds the MacroReader when macro recording starts. More...
 

Static Private Attributes

static const int TAB_KB = 0
 
static const int TAB_MOUSE = 1
 
static const int TAB_ANIM = 2
 
static const int TAB_SPECIAL = 3
 
static const int TAB_PROGRAM = 4
 
static const int TAB_MACRO = 5
 

Detailed Description

Definition at line 15 of file rebindwidget.h.

Constructor & Destructor Documentation

RebindWidget::RebindWidget ( QWidget parent)
explicit

Definition at line 9 of file rebindwidget.cpp.

References Ui_RebindWidget::fnBox, fnKeys, KeyMap::friendlyName(), Ui_RebindWidget::lightWrapBox, Ui_RebindWidget::mediaBox, mediaKeys, Ui_RebindWidget::modBox, Ui_RebindWidget::modeWrapBox, modKeys, mouseExtKeys, mouseKeys, Ui_RebindWidget::numBox, numKeys, Ui_RebindWidget::programKpExtra, Ui_RebindWidget::programKrExtra, Ui_RebindWidget::progTipLabel, Ui_RebindWidget::setupUi(), ui, and wheelKeys.

9  :
10  QWidget(parent),
11  ui(new Ui::RebindWidget),
12  bind(0), profile(0), macReader(0)
13 {
14  ui->setupUi(this);
15  ui->lightWrapBox->hide();
16  ui->modeWrapBox->hide();
17  ui->programKpExtra->hide();
18  ui->programKrExtra->hide();
19 
20  // Populate key lists
21  modKeys << "caps" << "lshift" << "rshift" << "lctrl" << "rctrl" << "lwin" << "rwin" << "lalt" << "ralt" << "rmenu" << "fn";
22  fnKeys << "esc" << "f1" << "f2" << "f3" << "f4" << "f5" << "f6" << "f7" << "f8" << "f9" << "f10" << "f11" << "f12" << "prtscn" << "scroll" << "pause" << "f13" << "f14" << "f15" << "f16" << "f17" << "f18" << "f19" << "f20" << "ins" << "del" << "home" << "end" << "pgup" << "pgdn" << "power" << "lightup" << "lightdn" << "up" << "down" << "left" << "right";
23  numKeys << "numlock" << "num0" << "num1" << "num2" << "num3" << "num4" << "num5" << "num6" << "num7" << "num8" << "num9" << "numslash" << "numstar" << "numminus" << "numplus" << "numdot" << "numenter";
24  mediaKeys << "stop" << "prev" << "play" << "next" << "volup" << "voldn" << "mute" << "eject";
25  mouseKeys << "mouse1" << "mouse2" << "mouse3";
26  mouseExtKeys << "mouse4" << "mouse5" << "mouse6" << "mouse7" << "mouse8";
27  wheelKeys << "wheelup" << "wheeldn";
28  // Populate boxes
29  foreach(const QString& key, modKeys)
30  ui->modBox->addItem(KeyMap::friendlyName(key));
31  foreach(const QString& key, fnKeys)
32  ui->fnBox->addItem(KeyMap::friendlyName(key).replace("\n", " / "));
33  foreach(const QString& key, numKeys)
34  ui->numBox->addItem(KeyMap::friendlyName(key).remove("NumPad "));
35  foreach(const QString& key, mediaKeys)
36  ui->mediaBox->addItem(KeyMap::friendlyName(key));
37 #ifdef Q_OS_MACX
38  // Replace some OSX keys with their actual meanings
39  ui->modBox->setItemText(modKeys.indexOf("lwin") + 1, "Left Cmd");
40  ui->modBox->setItemText(modKeys.indexOf("rwin") + 1, "Right Cmd");
41  ui->modBox->setItemText(modKeys.indexOf("lalt") + 1, "Left Option");
42  ui->modBox->setItemText(modKeys.indexOf("ralt") + 1, "Right Option");
43  ui->fnBox->setItemText(fnKeys.indexOf("prtscn") + 1, "F13");
44  ui->fnBox->setItemText(fnKeys.indexOf("scroll") + 1, "F14");
45  ui->fnBox->setItemText(fnKeys.indexOf("pause") + 1, "F15");
46  ui->fnBox->setItemText(fnKeys.indexOf("f13") + 1, "F13 (Windows/Linux)");
47  ui->fnBox->setItemText(fnKeys.indexOf("f14") + 1, "F14 (Windows/Linux)");
48  ui->fnBox->setItemText(fnKeys.indexOf("f15") + 1, "F15 (Windows/Linux)");
49  ui->fnBox->setItemText(fnKeys.indexOf("ins") + 1, "Help");
50  ui->numBox->setItemText(numKeys.indexOf("numlock") + 1, "Clear");
51 
52  // Add tip label
53  ui->progTipLabel->setText("<p style=\"line-height:150%\">Tip: use the <font face=\"monospace\">open</font> command to launch a file, directory, or app. For instance, to start Safari:<br /><font face=\"monospace\">&nbsp;&nbsp;open /Applications/Safari.app</font></p>");
54 #else
55  ui->progTipLabel->setText("<p style=\"line-height:150%\">Tip: use <font face=\"monospace\">xdg-open</font> to launch a file or directory. For instance, to open your home folder:<br /><font face=\"monospace\">&nbsp;&nbsp;xdg-open " + QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "</font></p>");
56 #endif
57 }
QStringList wheelKeys
Definition: rebindwidget.h:105
KbBind * bind
Definition: rebindwidget.h:94
static QString friendlyName(const QString &key, Layout layout=US)
Definition: keymap.cpp:925
QStringList mouseExtKeys
Definition: rebindwidget.h:104
QCheckBox * modeWrapBox
Definition: keymap.h:49
QCheckBox * lightWrapBox
QComboBox * modBox
QStringList mediaKeys
Definition: rebindwidget.h:102
void setupUi(QWidget *RebindWidget)
QStringList mouseKeys
Definition: rebindwidget.h:103
QComboBox * numBox
KbProfile * profile
Definition: rebindwidget.h:95
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QStringList modKeys
Definition: rebindwidget.h:99
QWidget * programKpExtra
MacroReader * macReader
macReader holds the MacroReader when macro recording starts.
Definition: rebindwidget.h:106
QStringList fnKeys
Definition: rebindwidget.h:100
QComboBox * mediaBox
QStringList numKeys
Definition: rebindwidget.h:101
QWidget * programKrExtra
QComboBox * fnBox

+ Here is the call graph for this function:

RebindWidget::~RebindWidget ( )

Definition at line 59 of file rebindwidget.cpp.

References ui.

59  {
60  delete ui;
61 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

Member Function Documentation

void RebindWidget::applyChanges ( const QStringList &  keys,
bool  doUnbind 
)
privateslot

G-key macro handling: Set the macro definiton for all keys selected (indeed, it may be multiple keys). First, concat the Macro Key Definion and the Macro plain text after escaping possible colos in the parts for Macro Text and Macro Comment.

But first, there is a special condition to handle: You have recorded a macro with timing infos. Afterwards you changed manually the timing infos in the pteMacroBox and press Apply. In that case we must overwrite the txtBuffer to remember your changes.

Todo:
There is still a bug in the state machine: If you record a macro in asTyped-mode, switch to another mode and change the vontent of the pteMacroBox manually, then the changes are not saved in the timing buffer. But anyhow, let's do more relevant things...

Definition at line 334 of file rebindwidget.cpp.

References anim, KeyAction::animAction(), Ui_RebindWidget::animBox, Ui_RebindWidget::animKrBox, KbLight::animList(), Ui_RebindWidget::animOnceBox, bind, DPI_OFFSET, KeyAction::dpiAction(), Ui_RebindWidget::dpiBox, Ui_RebindWidget::dpiCustXBox, Ui_RebindWidget::dpiCustYBox, Ui_RebindWidget::fnBox, fnKeys, KbAnim::guid(), KbBind::light(), KeyAction::lightAction(), Ui_RebindWidget::lightBox, Ui_RebindWidget::lightWrapBox, KeyAction::lockAction(), Ui_RebindWidget::lockBox, KeyAction::macroAction(), Ui_RebindWidget::mb2Box, Ui_RebindWidget::mbBox, Ui_RebindWidget::mediaBox, mediaKeys, Ui_RebindWidget::modBox, KeyAction::modeAction(), Ui_RebindWidget::modeBox, Ui_RebindWidget::modeWrapBox, modKeys, mouseExtKeys, mouseKeys, KbBind::noAction(), Ui_RebindWidget::numBox, numKeys, KeyAction::PROGRAM_PR_MULTI, KeyAction::PROGRAM_RE_INDEF, KeyAction::PROGRAM_RE_KPSTOP, KeyAction::PROGRAM_RE_MULTI, KeyAction::programAction(), Ui_RebindWidget::programKpBox, Ui_RebindWidget::programKpModeBox, Ui_RebindWidget::programKpSIBox, Ui_RebindWidget::programKrBox, Ui_RebindWidget::programKrModeBox, Ui_RebindWidget::programKrSIBox, Ui_RebindWidget::pteMacroBox, Ui_RebindWidget::pteMacroComment, Ui_RebindWidget::pteMacroText, Ui_RebindWidget::rb_delay_asTyped, KbBind::setAction(), Ui_RebindWidget::txtBuffer, Ui_RebindWidget::typingBox, typingKeys, ui, Ui_RebindWidget::wheelBox, and wheelKeys.

Referenced by on_applyButton_clicked(), and setSelection().

334  {
335  if(ui->typingBox->currentIndex() > 0)
336  bind->setAction(keys, typingKeys[ui->typingBox->currentIndex() - 1]);
337  else if(ui->modBox->currentIndex() > 0)
338  bind->setAction(keys, modKeys[ui->modBox->currentIndex() - 1]);
339  else if(ui->fnBox->currentIndex() > 0)
340  bind->setAction(keys, fnKeys[ui->fnBox->currentIndex() - 1]);
341  else if(ui->numBox->currentIndex() > 0)
342  bind->setAction(keys, numKeys[ui->numBox->currentIndex() - 1]);
343  else if(ui->mediaBox->currentIndex() > 0)
344  bind->setAction(keys, mediaKeys[ui->mediaBox->currentIndex() - 1]);
345  else if(ui->mbBox->currentIndex() > 0)
346  bind->setAction(keys, mouseKeys[ui->mbBox->currentIndex() - 1]);
347  else if(ui->mb2Box->currentIndex() > 0)
348  bind->setAction(keys, mouseExtKeys[ui->mb2Box->currentIndex() - 1]);
349  else if(ui->wheelBox->currentIndex() > 0)
350  bind->setAction(keys, wheelKeys[ui->wheelBox->currentIndex() - 1]);
351  else if(ui->dpiBox->currentIndex() > 0)
352  bind->setAction(keys, KeyAction::dpiAction(ui->dpiBox->currentIndex() - DPI_OFFSET, ui->dpiCustXBox->value(), ui->dpiCustYBox->value()));
353  else if(ui->modeBox->currentIndex() > 0)
354  bind->setAction(keys, KeyAction::modeAction(ui->modeBox->currentIndex() - 3 - (ui->modeWrapBox->isChecked() && ui->modeBox->currentIndex() < 3 ? 2 : 0)));
355  else if(ui->lightBox->currentIndex() > 0)
356  bind->setAction(keys, KeyAction::lightAction(ui->lightBox->currentIndex() - 1 + (ui->lightWrapBox->isChecked() ? 2 : 0)));
357  else if(ui->lockBox->currentIndex() > 0)
358  bind->setAction(keys, KeyAction::lockAction(ui->lockBox->currentIndex() - 1));
359  else if(ui->animBox->currentIndex() > 0){
360  KbAnim* anim = bind->light()->animList().at(ui->animBox->currentIndex() - 1);
361  bind->setAction(keys, KeyAction::animAction(anim->guid(), !ui->animOnceBox->isChecked(), ui->animKrBox->isChecked()));
362  } else if(!ui->programKpBox->text().isEmpty() || !ui->programKrBox->text().isEmpty()){
363  int kpStop = 0, krStop = 0;
364  if(!ui->programKpBox->text().isEmpty()){
365  if(!ui->programKpSIBox->isChecked())
367  else
368  kpStop = ui->programKpModeBox->currentIndex();
369  }
370  if(!ui->programKrBox->text().isEmpty()){
371  if(!ui->programKrSIBox->isChecked())
373  else if(ui->programKrModeBox->currentIndex() == 0)
375  else
377  }
378  bind->setAction(keys, KeyAction::programAction(ui->programKpBox->text(), ui->programKrBox->text(), kpStop | krStop));
379  } else if (ui->pteMacroBox->toPlainText().length() > 0) {
384 
389  if (ui->rb_delay_asTyped->isChecked()) ui->txtBuffer->setText(ui->pteMacroBox->toPlainText());
390 
396  QString mac;
397  mac = ui->txtBuffer->text();
398  mac = ui->pteMacroComment->toPlainText().replace(":", "&das_IST_31N_col0n;") + ":" + mac;
399  mac = ui->pteMacroText->toPlainText().replace(":", "&das_IST_31N_col0n;") + ":" + mac;
400  mac = ui->pteMacroBox->toPlainText() + ":" + mac;
402  } else if(doUnbind)
403  bind->noAction(keys);
404 }
static const int DPI_OFFSET
Definition: rebindwidget.cpp:6
static QString animAction(const QUuid &guid, bool onlyOnce, bool stopOnRelease)
Definition: keyaction.cpp:184
QStringList wheelKeys
Definition: rebindwidget.h:105
KbBind * bind
Definition: rebindwidget.h:94
static QString macroAction(QString macroDef)
well documented in cpp file
Definition: keyaction.cpp:523
QCheckBox * programKpSIBox
static const int PROGRAM_PR_MULTI
Definition: keyaction.h:138
QStringList mouseExtKeys
Definition: rebindwidget.h:104
const AnimList & animList()
Definition: kblight.h:49
QPlainTextEdit * pteMacroText
QComboBox * typingBox
QPlainTextEdit * pteMacroBox
static const int PROGRAM_RE_MULTI
Definition: keyaction.h:139
static QString dpiAction(int level, int customX=0, int customY=0)
Definition: keyaction.cpp:162
QCheckBox * modeWrapBox
static QString programAction(const QString &onPress, const QString &onRelease, int stop)
Definition: keyaction.cpp:177
QCheckBox * lightWrapBox
QComboBox * animBox
QComboBox * modBox
QComboBox * dpiBox
static const int PROGRAM_RE_INDEF
Definition: keyaction.h:139
QStringList mediaKeys
Definition: rebindwidget.h:102
QCheckBox * animOnceBox
QLineEdit * programKpBox
QStringList mouseKeys
Definition: rebindwidget.h:103
QStringList typingKeys
Definition: rebindwidget.h:98
QComboBox * numBox
QComboBox * lockBox
static const int PROGRAM_RE_KPSTOP
Definition: keyaction.h:139
static QString lockAction(int type=LOCK_TOGGLE)
Definition: keyaction.cpp:173
QLineEdit * programKrBox
KbLight * light()
Definition: kbbind.cpp:54
QComboBox * mb2Box
QCheckBox * animKrBox
Definition: kbanim.h:11
static QString modeAction(int mode)
Definition: keyaction.cpp:158
QRadioButton * rb_delay_asTyped
const QUuid & guid() const
Definition: kbanim.h:71
QComboBox * programKpModeBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QSpinBox * dpiCustYBox
QStringList modKeys
Definition: rebindwidget.h:99
static QString lightAction(int type=LIGHT_UP_WRAP)
Definition: keyaction.cpp:169
QStringList fnKeys
Definition: rebindwidget.h:100
void noAction(const QString &key)
Definition: kbbind.cpp:181
QComboBox * mediaBox
QSpinBox * dpiCustXBox
void setAction(const QString &key, const QString &action)
Definition: kbbind.cpp:189
QStringList numKeys
Definition: rebindwidget.h:101
QComboBox * lightBox
QCheckBox * programKrSIBox
QComboBox * modeBox
QComboBox * mbBox
QComboBox * fnBox
QComboBox * wheelBox
QComboBox * programKrModeBox
struct keyAnim * anim
Definition: main.c:55
QPlainTextEdit * pteMacroComment

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RebindWidget::convertMacroBox ( )
private

The ckb-daemon needs a shorter format, only " [+|-]<keyname>=<delay>", multiple entries are separated by comma.

That function does the conversion.

Definition at line 808 of file rebindwidget.cpp.

References Ui_RebindWidget::pteMacroBox, Ui_RebindWidget::rb_delay_default, Ui_RebindWidget::rb_delay_no, Ui_RebindWidget::txtBuffer, and ui.

Referenced by on_btnStopMacro_clicked(), on_rb_delay_asTyped_toggled(), on_rb_delay_default_toggled(), and on_rb_delay_no_toggled().

808  {
809  QString in;
810 
811  // Remember the original input stream before it is converted.
812  // In case of new choice of delay mode we have to restore it.
813  if (ui->txtBuffer->text() == "") {
814  ui->txtBuffer->setText(ui->pteMacroBox->toPlainText());
815  in = ui->pteMacroBox->toPlainText();
816  } else in = ui->txtBuffer->text();
817 
818  in.replace (QRegExp("\n"), ","); // first join all in one line
819  in.replace (QRegExp("key "), ""); // then delete keyword "key" followed by space
820  in.replace (QRegExp(",="), "="); // at last join each keystroke with its delay parameter
821 
822  // How to deal with the delay params?
823  // Because the three radio buttons are mututally exclusive,
824  // we can run through the if-chain w/o conflicts.
825  // If rb_delay_asTyped is checked, do nothing, because that's the standard.
826 
827  if (ui->rb_delay_default->isChecked()) {
828  in.replace(QRegExp("=\\d+,"), ","); // Delete the timing infos, use default value
829  in.replace(QRegExp("=\\d+$"), ""); // The last entry is without comma
830  }
831  if (ui->rb_delay_no->isChecked()) {
832  in.replace(QRegExp("=\\d+,"), "=0,"); // Set timing infos to zero for no delay
833  in.replace(QRegExp("=\\d+$"), "=0"); // Again the last entry w/o comma
834  in.replace(QRegExp("([\\+\\-]\\w+),"), "\\1=0,"); // If no delay is given, force it to zero
835  in.replace(QRegExp("([\\+\\-]\\w+)$"), "\\1=0");
836  }
837 
838  // Show the new format by replacing the older one.
839  ui->pteMacroBox->setPlainText(in);
840 }
QPlainTextEdit * pteMacroBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QRadioButton * rb_delay_default
QRadioButton * rb_delay_no

+ Here is the caller graph for this function:

void RebindWidget::helpStatus ( int  status)
private
Parameters
statusdetermines what to display.

Definition at line 782 of file rebindwidget.cpp.

References Ui_RebindWidget::lbl_macro, and ui.

Referenced by on_btnClearMacro_clicked(), on_btnStartMacro_clicked(), on_btnStopMacro_clicked(), and setBox().

782  {
783  switch (status) {
784  case 1:
785  ui->lbl_macro->setText("Type in a macro name in the comment box and click start.");
786  break;
787  case 2:
788  ui->lbl_macro->setText("Type your macro and click stop when finished.");
789  break;
790  case 3:
791  ui->lbl_macro->setText("Click Apply or change values in Macro Key Actions in advance.");
792  break;
793  default:
794  ui->lbl_macro->setText(QString("Oops: Some magic in RebindWidget::helpStatus (%1)").arg(status));
795  }
796 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

+ Here is the caller graph for this function:

void RebindWidget::on_animBox_currentIndexChanged ( int  index)
privateslot

Definition at line 613 of file rebindwidget.cpp.

References Ui_RebindWidget::animBox, Ui_RebindWidget::animButton, setBox(), and ui.

613  {
614  if(index == 0)
615  ui->animButton->setChecked(false);
616  else {
617  ui->animButton->setChecked(true);
618  setBox(ui->animBox);
619  }
620 }
void setBox(QWidget *box)
QComboBox * animBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QRadioButton * animButton

+ Here is the call graph for this function:

void RebindWidget::on_animButton_clicked ( bool  checked)
privateslot

Definition at line 710 of file rebindwidget.cpp.

References Ui_RebindWidget::animBox, and ui.

710  {
711  if(checked && ui->animBox->currentIndex() == 0)
712  ui->animBox->setCurrentIndex(1);
713 }
QComboBox * animBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_applyButton_clicked ( )
privateslot

Definition at line 406 of file rebindwidget.cpp.

References applyChanges(), on_btnStopMacro_clicked(), and selection.

406  {
407  // Normally, this should be done via signalling.
408  // Because there is no serarate thread, we have to call it directly
409  // (otherwise we could do Key char conversion step by step,
410  // but so it is more easy to change the key definition):
412  applyChanges(selection, true);
413 }
void on_btnStopMacro_clicked()
RebindWidget::on_btnStopMacro_clicked ends the macro recording. Notify channel ist closed...
QStringList selection
Definition: rebindwidget.h:96
void applyChanges(const QStringList &keys, bool doUnbind)

+ Here is the call graph for this function:

void RebindWidget::on_btnClearMacro_clicked ( )
privateslot
Todo:
I do not know what is the better solution with the delay-buttons in case of clicking clear: Reset the button to the default value or do not touch it? Not clear is ignored.

Definition at line 774 of file rebindwidget.cpp.

References helpStatus().

774  {
775  helpStatus(1);
776 }
void helpStatus(int status)
RebindWidget::helpStatus shows a help line in the ui.

+ Here is the call graph for this function:

void RebindWidget::on_btnStartMacro_clicked ( )
privateslot

The UI is protected against false clicking (e.g. if you type start and than Apply, the channel is closed in wrong order).

At this time, all neccessary params like macroNumber, macroPath, cmdFile etc. had been cached.

Definition at line 724 of file rebindwidget.cpp.

References Ui_RebindWidget::applyButton, bind, Ui_RebindWidget::btnStartMacro, Ui_RebindWidget::btnStopMacro, KbBind::getMacroNumber(), KbBind::getMacroPath(), KbBind::handleNotificationChannel(), helpStatus(), macReader, Ui_RebindWidget::pteMacroBox, Ui_RebindWidget::pteMacroText, Ui_RebindWidget::rb_delay_asTyped, Ui_RebindWidget::rb_delay_default, Ui_RebindWidget::rb_delay_no, Ui_RebindWidget::resetButton, ui, and Ui_RebindWidget::unbindButton.

724  {
725  if (!macReader) {
728  // because of the second thread we need to disable three of the four bottom buttons.
729  // Clicking "Stop" will enable them again.
730  ui->applyButton->setEnabled(false);
731  ui->resetButton->setEnabled(false);
732  ui->unbindButton->setEnabled(false);
733  ui->btnStartMacro->setEnabled(false);
734  ui->btnStopMacro->setEnabled(true);
735  ui->rb_delay_asTyped->setEnabled(false);
736  ui->rb_delay_no->setEnabled(false);
737  ui->rb_delay_default->setEnabled(false);
738  helpStatus(2);
739  }
740 }
QPushButton * resetButton
KbBind * bind
Definition: rebindwidget.h:94
The MacroReader class creates a worker thread object. It does a connect do delayed deletion of thread...
Definition: macroreader.h:87
QPlainTextEdit * pteMacroText
QPlainTextEdit * pteMacroBox
QPushButton * unbindButton
QPushButton * btnStartMacro
QPushButton * applyButton
QRadioButton * rb_delay_asTyped
QPushButton * btnStopMacro
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void helpStatus(int status)
RebindWidget::helpStatus shows a help line in the ui.
QString getMacroPath()
KbBind::getMacroPath.
Definition: kbbind.cpp:274
MacroReader * macReader
macReader holds the MacroReader when macro recording starts.
Definition: rebindwidget.h:106
void handleNotificationChannel(bool start)
handleNotificationChannel sends commands to ckb-daemon for (de-) activating the notify channel...
Definition: kbbind.cpp:284
QRadioButton * rb_delay_default
int getMacroNumber()
KbBind::getMacroNumber.
Definition: kbbind.cpp:266
QRadioButton * rb_delay_no

+ Here is the call graph for this function:

void RebindWidget::on_btnStopMacro_clicked ( )
privateslot

Afterwards, the characters in the MacroBox are changed from KB-out format to cmd-in format. At last the UI changes to the new state.

Definition at line 749 of file rebindwidget.cpp.

References Ui_RebindWidget::applyButton, bind, Ui_RebindWidget::btnStartMacro, Ui_RebindWidget::btnStopMacro, convertMacroBox(), KbBind::handleNotificationChannel(), helpStatus(), macReader, Ui_RebindWidget::rb_delay_asTyped, Ui_RebindWidget::rb_delay_default, Ui_RebindWidget::rb_delay_no, Ui_RebindWidget::resetButton, ui, and Ui_RebindWidget::unbindButton.

Referenced by on_applyButton_clicked().

749  {
750  if (macReader) {
752  delete macReader;
753  macReader = 0;
754  convertMacroBox();
755  ui->applyButton->setEnabled(true);
756  ui->resetButton->setEnabled(true);
757  ui->unbindButton->setEnabled(true);
758  ui->btnStartMacro->setEnabled(true);
759  ui->btnStopMacro->setEnabled(false);
760  ui->rb_delay_asTyped->setEnabled(true);
761  ui->rb_delay_no->setEnabled(true);
762  ui->rb_delay_default->setEnabled(true);
763  helpStatus(3);
764  }
765 }
QPushButton * resetButton
KbBind * bind
Definition: rebindwidget.h:94
QPushButton * unbindButton
QPushButton * btnStartMacro
QPushButton * applyButton
QRadioButton * rb_delay_asTyped
void convertMacroBox()
RebindWidget::convertMacroBox converts the macroBox content. The KB sends each keypress as "key [+|-]...
QPushButton * btnStopMacro
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void helpStatus(int status)
RebindWidget::helpStatus shows a help line in the ui.
MacroReader * macReader
macReader holds the MacroReader when macro recording starts.
Definition: rebindwidget.h:106
void handleNotificationChannel(bool start)
handleNotificationChannel sends commands to ckb-daemon for (de-) activating the notify channel...
Definition: kbbind.cpp:284
QRadioButton * rb_delay_default
QRadioButton * rb_delay_no

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RebindWidget::on_cancelButton_clicked ( )
privateslot

Definition at line 415 of file rebindwidget.cpp.

References selection, and setSelection().

415  {
416  // Re-load selection
418 }
QStringList selection
Definition: rebindwidget.h:96
void setSelection(const QStringList &newSelection, bool applyPrevious=false)

+ Here is the call graph for this function:

void RebindWidget::on_dpiBox_currentIndexChanged ( int  index)
privateslot

Definition at line 539 of file rebindwidget.cpp.

References DPI_CUST_IDX, Ui_RebindWidget::dpiBox, Ui_RebindWidget::dpiButton, Ui_RebindWidget::dpiCustLabel, Ui_RebindWidget::dpiCustXBox, Ui_RebindWidget::dpiCustYBox, setBox(), and ui.

539  {
540  if(index != DPI_CUST_IDX){
541  // Clear custom DPI
542  ui->dpiCustXBox->setEnabled(false);
543  ui->dpiCustYBox->setEnabled(false);
544  ui->dpiCustLabel->setEnabled(false);
545  } else {
546  ui->dpiCustXBox->setEnabled(true);
547  ui->dpiCustYBox->setEnabled(true);
548  ui->dpiCustLabel->setEnabled(true);
549  }
550  if(index == 0)
551  ui->dpiButton->setChecked(false);
552  else {
553  ui->dpiButton->setChecked(true);
554  setBox(ui->dpiBox);
555  }
556 }
void setBox(QWidget *box)
QComboBox * dpiBox
QRadioButton * dpiButton
QLabel * dpiCustLabel
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QSpinBox * dpiCustYBox
QSpinBox * dpiCustXBox
static const int DPI_CUST_IDX
Definition: rebindwidget.cpp:7

+ Here is the call graph for this function:

void RebindWidget::on_dpiButton_clicked ( bool  checked)
privateslot

Definition at line 695 of file rebindwidget.cpp.

References Ui_RebindWidget::dpiBox, and ui.

695  {
696  if(checked && ui->dpiBox->currentIndex() == 0)
697  ui->dpiBox->setCurrentIndex(1);
698 }
QComboBox * dpiBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_fnBox_currentIndexChanged ( int  index)
privateslot

Definition at line 485 of file rebindwidget.cpp.

References Ui_RebindWidget::fnBox, Ui_RebindWidget::fnButton, setBox(), and ui.

485  {
486  if(index == 0)
487  ui->fnButton->setChecked(false);
488  else {
489  ui->fnButton->setChecked(true);
490  setBox(ui->fnBox);
491  }
492 }
QRadioButton * fnButton
void setBox(QWidget *box)
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * fnBox

+ Here is the call graph for this function:

void RebindWidget::on_fnButton_clicked ( bool  checked)
privateslot

Definition at line 632 of file rebindwidget.cpp.

References Ui_RebindWidget::fnBox, and ui.

632  {
633  if(checked && ui->fnBox->currentIndex() == 0)
634  ui->fnBox->setCurrentIndex(1);
635 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * fnBox
void RebindWidget::on_lightBox_currentIndexChanged ( int  index)
privateslot

Definition at line 571 of file rebindwidget.cpp.

References Ui_RebindWidget::lightBox, Ui_RebindWidget::lightButton, Ui_RebindWidget::lightWrapBox, setBox(), and ui.

571  {
572  if(index == 0){
573  ui->lightButton->setChecked(false);
574  ui->lightWrapBox->hide();
575  } else {
576  ui->lightWrapBox->show();
577  ui->lightButton->setChecked(true);
578  setBox(ui->lightBox);
579  }
580 }
void setBox(QWidget *box)
QCheckBox * lightWrapBox
QRadioButton * lightButton
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * lightBox

+ Here is the call graph for this function:

void RebindWidget::on_lightButton_clicked ( bool  checked)
privateslot

Definition at line 652 of file rebindwidget.cpp.

References Ui_RebindWidget::lightBox, and ui.

652  {
653  if(checked && ui->lightBox->currentIndex() == 0)
654  ui->lightBox->setCurrentIndex(1);
655 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * lightBox
void RebindWidget::on_lockBox_currentIndexChanged ( int  index)
privateslot

Definition at line 582 of file rebindwidget.cpp.

References Ui_RebindWidget::lockBox, Ui_RebindWidget::lockButton, setBox(), and ui.

582  {
583  if(index == 0)
584  ui->lockButton->setChecked(false);
585  else {
586  ui->lockButton->setChecked(true);
587  setBox(ui->lockBox);
588  }
589 }
QRadioButton * lockButton
void setBox(QWidget *box)
QComboBox * lockBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

+ Here is the call graph for this function:

void RebindWidget::on_lockButton_clicked ( bool  checked)
privateslot

Definition at line 657 of file rebindwidget.cpp.

References Ui_RebindWidget::lockBox, and ui.

657  {
658  if(checked && ui->lockBox->currentIndex() == 0)
659  ui->lockBox->setCurrentIndex(1);
660 }
QComboBox * lockBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_mb2Box_currentIndexChanged ( int  index)
privateslot

Definition at line 521 of file rebindwidget.cpp.

References Ui_RebindWidget::mb2Box, Ui_RebindWidget::mb2Button, setBox(), and ui.

521  {
522  if(index == 0)
523  ui->mb2Button->setChecked(false);
524  else {
525  ui->mb2Button->setChecked(true);
526  setBox(ui->mb2Box);
527  }
528 }
QRadioButton * mb2Button
void setBox(QWidget *box)
QComboBox * mb2Box
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

+ Here is the call graph for this function:

void RebindWidget::on_mb2Button_clicked ( bool  checked)
privateslot

Definition at line 685 of file rebindwidget.cpp.

References Ui_RebindWidget::mb2Box, and ui.

685  {
686  if(checked && ui->mb2Box->currentIndex() == 0)
687  ui->mb2Box->setCurrentIndex(1);
688 }
QComboBox * mb2Box
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_mbBox_currentIndexChanged ( int  index)
privateslot

Definition at line 512 of file rebindwidget.cpp.

References Ui_RebindWidget::mbBox, Ui_RebindWidget::mbButton, setBox(), and ui.

512  {
513  if(index == 0)
514  ui->mbButton->setChecked(false);
515  else {
516  ui->mbButton->setChecked(true);
517  setBox(ui->mbBox);
518  }
519 }
void setBox(QWidget *box)
QRadioButton * mbButton
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * mbBox

+ Here is the call graph for this function:

void RebindWidget::on_mbButton_clicked ( bool  checked)
privateslot

Definition at line 680 of file rebindwidget.cpp.

References Ui_RebindWidget::mbBox, and ui.

680  {
681  if(checked && ui->mbBox->currentIndex() == 0)
682  ui->mbBox->setCurrentIndex(1);
683 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * mbBox
void RebindWidget::on_mediaBox_currentIndexChanged ( int  index)
privateslot

Definition at line 503 of file rebindwidget.cpp.

References Ui_RebindWidget::mediaBox, Ui_RebindWidget::mediaButton, setBox(), and ui.

503  {
504  if(index == 0)
505  ui->mediaButton->setChecked(false);
506  else {
507  ui->mediaButton->setChecked(true);
508  setBox(ui->mediaBox);
509  }
510 }
void setBox(QWidget *box)
QRadioButton * mediaButton
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * mediaBox

+ Here is the call graph for this function:

void RebindWidget::on_mediaButton_clicked ( bool  checked)
privateslot

Definition at line 642 of file rebindwidget.cpp.

References Ui_RebindWidget::mediaBox, and ui.

642  {
643  if(checked && ui->mediaBox->currentIndex() == 0)
644  ui->mediaBox->setCurrentIndex(1);
645 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * mediaBox
void RebindWidget::on_modBox_currentIndexChanged ( int  index)
privateslot

Definition at line 476 of file rebindwidget.cpp.

References Ui_RebindWidget::modBox, Ui_RebindWidget::modButton, setBox(), and ui.

476  {
477  if(index == 0)
478  ui->modButton->setChecked(false);
479  else {
480  ui->modButton->setChecked(true);
481  setBox(ui->modBox);
482  }
483 }
void setBox(QWidget *box)
QComboBox * modBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QRadioButton * modButton

+ Here is the call graph for this function:

void RebindWidget::on_modButton_clicked ( bool  checked)
privateslot

Definition at line 627 of file rebindwidget.cpp.

References Ui_RebindWidget::modBox, and ui.

627  {
628  if(checked && ui->modBox->currentIndex() == 0)
629  ui->modBox->setCurrentIndex(1);
630 }
QComboBox * modBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_modeBox_currentIndexChanged ( int  index)
privateslot

Definition at line 558 of file rebindwidget.cpp.

References Ui_RebindWidget::modeBox, Ui_RebindWidget::modeButton, Ui_RebindWidget::modeWrapBox, setBox(), and ui.

558  {
559  if(index == 1 || index == 2)
560  ui->modeWrapBox->show();
561  else
562  ui->modeWrapBox->hide();
563  if(index == 0)
564  ui->modeButton->setChecked(false);
565  else {
566  ui->modeButton->setChecked(true);
567  setBox(ui->modeBox);
568  }
569 }
void setBox(QWidget *box)
QCheckBox * modeWrapBox
QRadioButton * modeButton
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * modeBox

+ Here is the call graph for this function:

void RebindWidget::on_modeButton_clicked ( bool  checked)
privateslot

Definition at line 647 of file rebindwidget.cpp.

References Ui_RebindWidget::modeBox, and ui.

647  {
648  if(checked && ui->modeBox->currentIndex() == 0)
649  ui->modeBox->setCurrentIndex(1);
650 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * modeBox
void RebindWidget::on_numBox_currentIndexChanged ( int  index)
privateslot

Definition at line 494 of file rebindwidget.cpp.

References Ui_RebindWidget::numBox, Ui_RebindWidget::numButton, setBox(), and ui.

494  {
495  if(index == 0)
496  ui->numButton->setChecked(false);
497  else {
498  ui->numButton->setChecked(true);
499  setBox(ui->numBox);
500  }
501 }
void setBox(QWidget *box)
QComboBox * numBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QRadioButton * numButton

+ Here is the call graph for this function:

void RebindWidget::on_numButton_clicked ( bool  checked)
privateslot

Definition at line 637 of file rebindwidget.cpp.

References Ui_RebindWidget::numBox, and ui.

637  {
638  if(checked && ui->numBox->currentIndex() == 0)
639  ui->numBox->setCurrentIndex(1);
640 }
QComboBox * numBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_programKpBox_textChanged ( const QString &  arg1)
privateslot

Definition at line 591 of file rebindwidget.cpp.

References Ui_RebindWidget::programKpBox, Ui_RebindWidget::programKpButton, Ui_RebindWidget::programKpExtra, setBox(), and ui.

591  {
592  if(arg1.isEmpty()){
593  ui->programKpButton->setChecked(false);
594  ui->programKpExtra->hide();
595  } else {
596  ui->programKpButton->setChecked(true);
598  ui->programKpExtra->show();
599  }
600 }
void setBox(QWidget *box)
QLineEdit * programKpBox
QCheckBox * programKpButton
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QWidget * programKpExtra

+ Here is the call graph for this function:

void RebindWidget::on_programKpButton_clicked ( bool  checked)
privateslot

Definition at line 662 of file rebindwidget.cpp.

References Ui_RebindWidget::programKpBox, setBox(), and ui.

662  {
663  if(!checked){
664  ui->programKpBox->setText("");
665  } else if(ui->programKpBox->text().isEmpty()){
666  ui->programKpBox->setFocus();
668  }
669 }
void setBox(QWidget *box)
QLineEdit * programKpBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

+ Here is the call graph for this function:

void RebindWidget::on_programKpSIBox_clicked ( bool  checked)
privateslot

Definition at line 700 of file rebindwidget.cpp.

References Ui_RebindWidget::programKpModeBox, and ui.

700  {
701  ui->programKpModeBox->setCurrentIndex(0);
702  ui->programKpModeBox->setEnabled(checked);
703 }
QComboBox * programKpModeBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_programKrBox_textChanged ( const QString &  arg1)
privateslot

Definition at line 602 of file rebindwidget.cpp.

References Ui_RebindWidget::programKrBox, Ui_RebindWidget::programKrButton, Ui_RebindWidget::programKrExtra, setBox(), and ui.

602  {
603  if(arg1.isEmpty()){
604  ui->programKrButton->setChecked(false);
605  ui->programKrExtra->hide();
606  } else {
607  ui->programKrButton->setChecked(true);
609  ui->programKrExtra->show();
610  }
611 }
QCheckBox * programKrButton
void setBox(QWidget *box)
QLineEdit * programKrBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QWidget * programKrExtra

+ Here is the call graph for this function:

void RebindWidget::on_programKrButton_clicked ( bool  checked)
privateslot

Definition at line 671 of file rebindwidget.cpp.

References Ui_RebindWidget::programKrBox, setBox(), and ui.

671  {
672  if(!checked){
673  ui->programKrBox->setText("");
674  } else if(ui->programKrBox->text().isEmpty()){
675  ui->programKrBox->setFocus();
677  }
678 }
void setBox(QWidget *box)
QLineEdit * programKrBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

+ Here is the call graph for this function:

void RebindWidget::on_programKrSIBox_clicked ( bool  checked)
privateslot

Definition at line 705 of file rebindwidget.cpp.

References Ui_RebindWidget::programKrModeBox, and ui.

705  {
706  ui->programKrModeBox->setCurrentIndex(0);
707  ui->programKrModeBox->setEnabled(checked);
708 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * programKrModeBox
void RebindWidget::on_pteMacroBox_textChanged ( )
privateslot

Definition at line 470 of file rebindwidget.cpp.

References Ui_RebindWidget::pteMacroBox, setBox(), and ui.

470  {
471  if (ui->pteMacroBox->toPlainText().length() > 0) {
473  }
474 }
QPlainTextEdit * pteMacroBox
void setBox(QWidget *box)
Ui::RebindWidget * ui
Definition: rebindwidget.h:80

+ Here is the call graph for this function:

void RebindWidget::on_rb_delay_asTyped_toggled ( bool  checked)
privateslot
Parameters
checkedThis button ist clicked to use the delay times, as they are recorded. Returs a warning message, if we are not in the recording phase, because then we don't have the delay times any more.

Definition at line 862 of file rebindwidget.cpp.

References convertMacroBox().

863 {
864  convertMacroBox();
865 }
void convertMacroBox()
RebindWidget::convertMacroBox converts the macroBox content. The KB sends each keypress as "key [+|-]...

+ Here is the call graph for this function:

void RebindWidget::on_rb_delay_default_toggled ( bool  checked)
privateslot
Parameters
checkedThis is as easy as the no-delay-button, because this means take the default values.

Definition at line 873 of file rebindwidget.cpp.

References convertMacroBox().

874 {
875  convertMacroBox();
876 }
void convertMacroBox()
RebindWidget::convertMacroBox converts the macroBox content. The KB sends each keypress as "key [+|-]...

+ Here is the call graph for this function:

void RebindWidget::on_rb_delay_no_toggled ( bool  checked)
privateslot
Parameters
checkedThe following slots are triggerd by changing the mutual exclusive radio buttons when choosing the delay. They are called, if the button ist enabled. This first one should disable all delay.

Definition at line 850 of file rebindwidget.cpp.

References convertMacroBox().

851 {
852  convertMacroBox();
853 }
void convertMacroBox()
RebindWidget::convertMacroBox converts the macroBox content. The KB sends each keypress as "key [+|-]...

+ Here is the call graph for this function:

void RebindWidget::on_resetButton_clicked ( )
privateslot

Definition at line 420 of file rebindwidget.cpp.

References bind, KbBind::resetAction(), and selection.

420  {
422 }
KbBind * bind
Definition: rebindwidget.h:94
void resetAction(const QString &key)
Definition: kbbind.cpp:171
QStringList selection
Definition: rebindwidget.h:96

+ Here is the call graph for this function:

void RebindWidget::on_typingBox_currentIndexChanged ( int  index)
privateslot

Definition at line 461 of file rebindwidget.cpp.

References setBox(), Ui_RebindWidget::typingBox, Ui_RebindWidget::typingButton, and ui.

461  {
462  if(index == 0)
463  ui->typingButton->setChecked(false);
464  else {
465  ui->typingButton->setChecked(true);
466  setBox(ui->typingBox);
467  }
468 }
QComboBox * typingBox
void setBox(QWidget *box)
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QRadioButton * typingButton

+ Here is the call graph for this function:

void RebindWidget::on_typingButton_clicked ( bool  checked)
privateslot

Definition at line 622 of file rebindwidget.cpp.

References Ui_RebindWidget::typingBox, and ui.

622  {
623  if(checked && ui->typingBox->currentIndex() == 0)
624  ui->typingBox->setCurrentIndex(1);
625 }
QComboBox * typingBox
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void RebindWidget::on_unbindButton_clicked ( )
privateslot

Definition at line 424 of file rebindwidget.cpp.

References bind, KbBind::noAction(), and selection.

424  {
426 }
KbBind * bind
Definition: rebindwidget.h:94
QStringList selection
Definition: rebindwidget.h:96
void noAction(const QString &key)
Definition: kbbind.cpp:181

+ Here is the call graph for this function:

void RebindWidget::on_wheelBox_currentIndexChanged ( int  index)
privateslot

Definition at line 530 of file rebindwidget.cpp.

References setBox(), ui, Ui_RebindWidget::wheelBox, and Ui_RebindWidget::wheelButton.

530  {
531  if(index == 0)
532  ui->wheelButton->setChecked(false);
533  else {
534  ui->wheelButton->setChecked(true);
535  setBox(ui->wheelBox);
536  }
537 }
QRadioButton * wheelButton
void setBox(QWidget *box)
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * wheelBox

+ Here is the call graph for this function:

void RebindWidget::on_wheelButton_clicked ( bool  checked)
privateslot

Definition at line 690 of file rebindwidget.cpp.

References ui, and Ui_RebindWidget::wheelBox.

690  {
691  if(checked && ui->wheelBox->currentIndex() == 0)
692  ui->wheelBox->setCurrentIndex(1);
693 }
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QComboBox * wheelBox
void RebindWidget::setBind ( KbBind newBind,
KbProfile newProfile 
)

Definition at line 63 of file rebindwidget.cpp.

References bind, KeyMap::byPosition(), KbBind::defaultAction(), KbPerf::dpi(), KbPerf::DPI_COUNT, DPI_OFFSET, Ui_RebindWidget::dpiBox, Ui_RebindWidget::dpiButton, Ui_RebindWidget::dpiCustLabel, Ui_RebindWidget::dpiCustXBox, Ui_RebindWidget::dpiCustYBox, Ui_RebindWidget::dpiWarning, fnKeys, Key::friendlyName(), KeyMap::isISO(), KbBind::isMouse(), KeyMap::K95, KeyMap::layout(), KbBind::map(), mediaKeys, Ui_RebindWidget::modeBox, KbProfile::modes(), modKeys, KbMode::name(), numKeys, KbBind::perf(), profile, setSelection(), Ui_RebindWidget::typingBox, typingKeys, and ui.

Referenced by KbBindWidget::newLayout(), and KbBindWidget::setBind().

63  {
64  bind = newBind;
65  profile = newProfile;
66  setSelection(QStringList());
67 
68  // Populate typing keys by position
69  ui->typingBox->clear();
70  ui->typingBox->addItem(" ");
71  typingKeys.clear();
72  // Use the K95 map as it has all keys
73  const KeyMap& map = KeyMap(KeyMap::K95, bind->map().layout());
74  foreach(const QString& name, map.byPosition()){
75  KeyAction action(bind->defaultAction(name));
76  if(action.isNormal() && !modKeys.contains(name) && !fnKeys.contains(name) && !numKeys.contains(name) && !mediaKeys.contains(name) && name != "enter" && name != "tab" && name != "bspace"){
77  const Key& pos = map[name];
78  QString friendly = pos.friendlyName();
79  ui->typingBox->addItem(friendly);
80  typingKeys.append(name);
81  }
82  }
83  typingKeys << "enter" << "tab" << "bspace";
84  ui->typingBox->addItem("Enter");
85  ui->typingBox->addItem("Tab");
86  ui->typingBox->addItem("Backspace");
87  if(!map.isISO()){
88  // Add ISO backslash (aka KEY_102ND) to ANSI options
89  typingKeys << "bslash_iso";
90  ui->typingBox->addItem("Backslash (ISO layout)");
91  }
92 
93  // Populate mode list
94  ui->modeBox->clear();
95  ui->modeBox->addItem(" ");
96  ui->modeBox->addItem("(Previous)");
97  ui->modeBox->addItem("(Next)");
98  int idx = 1;
99  foreach(KbMode* mode, newProfile->modes())
100  ui->modeBox->addItem(QString("%1: %2").arg(idx++).arg(mode->name()));
101 
102  // Enable/disable DPI based on device
103  if(bind->isMouse()){
104  ui->dpiButton->setEnabled(true);
105  ui->dpiBox->setEnabled(true);
106  ui->dpiWarning->hide();
107  // Fill DPI slots
108  const KbPerf* perf = bind->perf();
109  for(int i = 0; i < KbPerf::DPI_COUNT; i++){
110  bool sniper = (i == 0);
111  int boxIdx = i + DPI_OFFSET;
112  QPoint dpi = perf->dpi(i);
113  QString text = tr(sniper ? "Sniper:\t%1 x %2" : "%3:\t%1 x %2").arg(dpi.x()).arg(dpi.y());
114  if(!sniper) text = text.arg(i);
115  ui->dpiBox->setItemText(boxIdx, text);
116  }
117  } else {
118  ui->dpiButton->setEnabled(false);
119  ui->dpiBox->setEnabled(false);
120  ui->dpiWarning->show();
121  }
122  // Always disable custom DPI boxes until selected
123  ui->dpiCustXBox->setEnabled(false);
124  ui->dpiCustYBox->setEnabled(false);
125  ui->dpiCustLabel->setEnabled(false);
126 }
const ModeList & modes() const
Definition: kbprofile.h:42
bool isMouse() const
Definition: kbbind.h:45
static const int DPI_OFFSET
Definition: rebindwidget.cpp:6
KbBind * bind
Definition: rebindwidget.h:94
QStringList byPosition() const
Definition: keymap.cpp:902
QComboBox * typingBox
KbPerf * perf()
Definition: kbbind.cpp:50
QString friendlyName(bool os=true) const
Definition: keymap.h:23
const KeyMap & map()
Definition: kbbind.h:41
QComboBox * dpiBox
QStringList mediaKeys
Definition: rebindwidget.h:102
QStringList typingKeys
Definition: rebindwidget.h:98
KbProfile * profile
Definition: rebindwidget.h:95
QPoint dpi(int index) const
Definition: kbperf.h:50
Definition: kbmode.h:36
Definition: kbperf.h:15
static bool isISO(Layout layout)
Definition: keymap.h:94
QString defaultAction(const QString &key)
Definition: kbbind.cpp:155
QRadioButton * dpiButton
static const int DPI_COUNT
Definition: kbperf.h:46
Layout layout() const
Definition: keymap.h:130
QLabel * dpiCustLabel
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QSpinBox * dpiCustYBox
QStringList modKeys
Definition: rebindwidget.h:99
const QString & name() const
Definition: kbmode.h:50
QStringList fnKeys
Definition: rebindwidget.h:100
Definition: keymap.h:8
Definition: keymap.h:49
void setSelection(const QStringList &newSelection, bool applyPrevious=false)
QSpinBox * dpiCustXBox
QStringList numKeys
Definition: rebindwidget.h:101
QComboBox * modeBox

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RebindWidget::setBox ( QWidget box)
private

Definition at line 428 of file rebindwidget.cpp.

References Ui_RebindWidget::animBox, Ui_RebindWidget::dpiBox, Ui_RebindWidget::fnBox, helpStatus(), Ui_RebindWidget::lightBox, Ui_RebindWidget::lockBox, Ui_RebindWidget::mb2Box, Ui_RebindWidget::mbBox, Ui_RebindWidget::mediaBox, Ui_RebindWidget::modBox, Ui_RebindWidget::modeBox, Ui_RebindWidget::numBox, Ui_RebindWidget::programKpBox, Ui_RebindWidget::programKpButton, Ui_RebindWidget::programKrBox, Ui_RebindWidget::programKrButton, Ui_RebindWidget::pteMacroBox, Ui_RebindWidget::txtBuffer, Ui_RebindWidget::typingBox, ui, and Ui_RebindWidget::wheelBox.

Referenced by on_animBox_currentIndexChanged(), on_dpiBox_currentIndexChanged(), on_fnBox_currentIndexChanged(), on_lightBox_currentIndexChanged(), on_lockBox_currentIndexChanged(), on_mb2Box_currentIndexChanged(), on_mbBox_currentIndexChanged(), on_mediaBox_currentIndexChanged(), on_modBox_currentIndexChanged(), on_modeBox_currentIndexChanged(), on_numBox_currentIndexChanged(), on_programKpBox_textChanged(), on_programKpButton_clicked(), on_programKrBox_textChanged(), on_programKrButton_clicked(), on_pteMacroBox_textChanged(), on_typingBox_currentIndexChanged(), on_wheelBox_currentIndexChanged(), and setSelection().

428  {
429  // Un-select every item except for the current one.
430  // on_*_currentIndexChanged will take care of deselecting the checkbox.
431  // Key
432  if(box != ui->typingBox) ui->typingBox->setCurrentIndex(0);
433  if(box != ui->modBox) ui->modBox->setCurrentIndex(0);
434  if(box != ui->fnBox) ui->fnBox->setCurrentIndex(0);
435  if(box != ui->numBox) ui->numBox->setCurrentIndex(0);
436  if(box != ui->mediaBox) ui->mediaBox->setCurrentIndex(0);
437  // Mouse
438  if(box != ui->mbBox) ui->mbBox->setCurrentIndex(0);
439  if(box != ui->mb2Box) ui->mb2Box->setCurrentIndex(0);
440  if(box != ui->wheelBox) ui->wheelBox->setCurrentIndex(0);
441  if(box != ui->dpiBox) ui->dpiBox->setCurrentIndex(0);
442  // Anim
443  if(box != ui->animBox) ui->animBox->setCurrentIndex(0);
444  // Special
445  if(box != ui->modeBox) ui->modeBox->setCurrentIndex(0);
446  if(box != ui->lightBox) ui->lightBox->setCurrentIndex(0);
447  if(box != ui->lockBox) ui->lockBox->setCurrentIndex(0);
448  // Program
449  if(box != ui->programKpBox && box != ui->programKrBox){
450  ui->programKpButton->setChecked(false);
451  ui->programKrButton->setChecked(false);
452  }
453  // Clear macro panel
454  if (box != ui->pteMacroBox) {
455  ui->pteMacroBox->setPlainText("");
456  ui->txtBuffer->setText("");
457  helpStatus(1);
458  }
459 }
QCheckBox * programKrButton
QComboBox * typingBox
QPlainTextEdit * pteMacroBox
QComboBox * animBox
QComboBox * modBox
QComboBox * dpiBox
QLineEdit * programKpBox
QComboBox * numBox
QComboBox * lockBox
QLineEdit * programKrBox
QComboBox * mb2Box
QCheckBox * programKpButton
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
void helpStatus(int status)
RebindWidget::helpStatus shows a help line in the ui.
QComboBox * mediaBox
QComboBox * lightBox
QComboBox * modeBox
QComboBox * mbBox
QComboBox * fnBox
QComboBox * wheelBox

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RebindWidget::setCorrectRadioButton ( QString  macdef)
private
Parameters
macdefSet the radiobutton for timing paramters according to the context. If no "=" followed by a number and comma can be found, it is the default button. If "=" can be found and numbers with more than one digit (means: > 9), it is the "asTyped" button Otherwise it is the "no" button.

Definition at line 887 of file rebindwidget.cpp.

References Ui_RebindWidget::rb_delay_asTyped, Ui_RebindWidget::rb_delay_default, Ui_RebindWidget::rb_delay_no, and ui.

Referenced by setSelection().

887  {
888  if (!macdef.contains(QRegExp("=\\d+,"))) {
889  ui->rb_delay_default->setChecked(true);
890  return;
891  }
892  if (macdef.contains(QRegExp("=\\d\\d+,"))) {
893  ui->rb_delay_asTyped->setChecked(true);
894  return;
895  }
896  ui->rb_delay_no->setChecked(true);
897 }
QRadioButton * rb_delay_asTyped
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QRadioButton * rb_delay_default
QRadioButton * rb_delay_no

+ Here is the caller graph for this function:

void RebindWidget::setSelection ( const QStringList &  newSelection,
bool  applyPrevious = false 
)

Definition at line 128 of file rebindwidget.cpp.

References KbBind::action(), anim, Ui_RebindWidget::animBox, KeyAction::animInfo(), Ui_RebindWidget::animKrBox, KbLight::animList(), Ui_RebindWidget::animOnceBox, applyChanges(), bind, KeyAction::DPI_CUSTOM, DPI_OFFSET, Ui_RebindWidget::dpiBox, Ui_RebindWidget::dpiCustXBox, Ui_RebindWidget::dpiCustYBox, KeyAction::dpiInfo(), KbLight::findAnimIdx(), Ui_RebindWidget::fnBox, fnKeys, KeyAction::isAnim(), KeyAction::isDPI(), KeyAction::isMouse(), KeyAction::isNormal(), KeyAction::isProgram(), KeyAction::isSpecial(), KeyAction::isValidMacro(), KbBind::light(), KeyAction::LIGHT_DOWN, KeyAction::LIGHT_DOWN_WRAP, KeyAction::LIGHT_UP, KeyAction::LIGHT_UP_WRAP, Ui_RebindWidget::lightBox, Ui_RebindWidget::lightWrapBox, Ui_RebindWidget::lockBox, KeyAction::macroContent(), KeyAction::macroDisplay(), KeyAction::macroLine(), KeyAction::macroTiming(), Ui_RebindWidget::mb2Box, Ui_RebindWidget::mbBox, Ui_RebindWidget::mediaBox, mediaKeys, Ui_RebindWidget::modBox, KeyAction::MODE_NEXT, KeyAction::MODE_NEXT_WRAP, KeyAction::MODE_PREV, KeyAction::MODE_PREV_WRAP, Ui_RebindWidget::modeBox, Ui_RebindWidget::modeWrapBox, modKeys, mouseExtKeys, mouseKeys, KbAnim::name(), Ui_RebindWidget::numBox, numKeys, KeyAction::PROGRAM_PR_MULTI, KeyAction::PROGRAM_RE_INDEF, KeyAction::PROGRAM_RE_KPSTOP, KeyAction::PROGRAM_RE_MULTI, KeyAction::programInfo(), Ui_RebindWidget::programKpBox, Ui_RebindWidget::programKpModeBox, Ui_RebindWidget::programKpSIBox, Ui_RebindWidget::programKrBox, Ui_RebindWidget::programKrModeBox, Ui_RebindWidget::programKrSIBox, Ui_RebindWidget::pteMacroBox, Ui_RebindWidget::pteMacroComment, Ui_RebindWidget::pteMacroText, selection, setBox(), setCorrectRadioButton(), KeyAction::specialInfo(), TAB_ANIM, TAB_KB, TAB_MACRO, TAB_MOUSE, TAB_PROGRAM, TAB_SPECIAL, Ui_RebindWidget::tabWidget, Ui_RebindWidget::txtBuffer, Ui_RebindWidget::typingBox, typingKeys, ui, Ui_RebindWidget::wheelBox, and wheelKeys.

Referenced by KbBindWidget::newSelection(), on_cancelButton_clicked(), setBind(), and KbBindWidget::updateBind().

128  {
129  if(bind){
130  // Populate animation list
131  // FIXME: There should be a trigger to update this whenever an animation is added/removed, even if the key selection hasn't changed
132  ui->animBox->clear();
133  ui->animBox->addItem(" ");
134  foreach(KbAnim* anim, bind->light()->animList())
135  ui->animBox->addItem(anim->name());
136  }
137 
138  // Apply changes to previous selection (if any)
139  if(!selection.isEmpty() && applyPrevious){
140  QStringList previous = selection;
141  selection = QStringList();
142  applyChanges(previous, false);
143  }
144 
145  selection = newSelection;
146  if(newSelection.isEmpty()){
147  hide();
148  return;
149  } else
150  show();
151 
152  bool hasAction = false;
153  QString action;
154  if(selection.count() == 1){
155  // Select action from the UI
156  action = bind->action(selection.first());
157  if(!action.isEmpty())
158  hasAction = true;
159  } else {
160  // Select an action from the UI if all keys are the same.
161  // Select nothing if any are unbound or different
162  foreach(const QString& key, selection){
163  QString keyAction = bind->action(key);
164  if(keyAction.isEmpty() || (hasAction && keyAction != action)){
165  hasAction = false;
166  break;
167  } else if(action.isEmpty()){
168  action = keyAction;
169  hasAction = true;
170  }
171  }
172  }
173 
174  if(!hasAction)
175  action = "";
176  KeyAction act(action);
177  // Clear everything
178  setBox(0);
179  ui->dpiCustXBox->setValue(400);
180  ui->dpiCustYBox->setValue(400);
181  ui->animOnceBox->setChecked(false);
182  ui->animKrBox->setChecked(false);
183  ui->programKpBox->setText("");
184  ui->programKrBox->setText("");
185  ui->programKpSIBox->setChecked(false);
186  ui->programKrSIBox->setChecked(false);
187  ui->programKpModeBox->setCurrentIndex(0);
188  ui->programKrModeBox->setCurrentIndex(0);
189  ui->programKpModeBox->setEnabled(false);
190  ui->programKrModeBox->setEnabled(false);
191  // Clear neu UI elements in MacroTab
192  ui->pteMacroBox->setPlainText("");
193  ui->pteMacroText->setPlainText("");
194  ui->pteMacroComment->setPlainText("");
195  ui->txtBuffer->setText("");
196  // Fill in field and select tab according to action type
197  bool mouse = act.isMouse();
198  if(mouse){
199  // Mouse buttons
200  ui->tabWidget->setCurrentIndex(TAB_MOUSE);
201  // Set mouse buttons (indexOf returns -1 if not found, index zero is blank)
202  ui->mbBox->setCurrentIndex(mouseKeys.indexOf(action) + 1);
203  ui->mb2Box->setCurrentIndex(mouseExtKeys.indexOf(action) + 1);
204  ui->wheelBox->setCurrentIndex(wheelKeys.indexOf(action) + 1);
205  if(act.isDPI()){
206  QPoint custom;
207  int value = act.dpiInfo(custom);
208  if(value <= -DPI_OFFSET || value > KeyAction::DPI_CUSTOM)
209  return;
210  ui->dpiBox->setCurrentIndex(value + DPI_OFFSET);
211  if(value == KeyAction::DPI_CUSTOM){
212  ui->dpiCustXBox->setValue(custom.x());
213  ui->dpiCustYBox->setValue(custom.y());
214  }
215  }
216  } else if(act.isNormal()){
217  // Standard key
218  ui->tabWidget->setCurrentIndex(TAB_KB);
219  ui->typingBox->setCurrentIndex(typingKeys.indexOf(action) + 1);
220  ui->modBox->setCurrentIndex(modKeys.indexOf(action) + 1);
221  ui->fnBox->setCurrentIndex(fnKeys.indexOf(action) + 1);
222  ui->numBox->setCurrentIndex(numKeys.indexOf(action) + 1);
223  ui->mediaBox->setCurrentIndex(mediaKeys.indexOf(action) + 1);
224  } else if(act.isProgram()){
225  // Program key
226  ui->tabWidget->setCurrentIndex(TAB_PROGRAM);
227  QString onPress, onRelease;
228  int stop = act.programInfo(onPress, onRelease);
229  ui->programKpBox->setText(onPress);
230  ui->programKrBox->setText(onRelease);
231  switch(stop & 0x0F){
233  ui->programKpSIBox->setChecked(false);
234  ui->programKpModeBox->setCurrentIndex(0);
235  ui->programKpModeBox->setEnabled(false);
236  break;
237  default:
238  ui->programKpSIBox->setChecked(true);
239  ui->programKpModeBox->setCurrentIndex(stop & 0x0F);
240  ui->programKpModeBox->setEnabled(true);
241  break;
242  }
243  switch(stop & 0xF0){
245  ui->programKrSIBox->setChecked(false);
246  ui->programKrModeBox->setCurrentIndex(0);
247  ui->programKrModeBox->setEnabled(false);
248  break;
250  ui->programKrSIBox->setChecked(true);
251  ui->programKrModeBox->setCurrentIndex(0);
252  ui->programKrModeBox->setEnabled(true);
253  break;
255  ui->programKrSIBox->setChecked(true);
256  ui->programKrModeBox->setCurrentIndex(1);
257  ui->programKrModeBox->setEnabled(true);
258  break;
259  }
260  } else if(act.isAnim()){
261  // Animation key
262  ui->tabWidget->setCurrentIndex(TAB_ANIM);
263  bool onlyOnce = false, stopOnRelease = false;
264  QUuid id = act.animInfo(onlyOnce, stopOnRelease);
265  // Find this animation in the list. If not found, -1 will be returned, resulting in the blank space being selected
266  int index = bind->light()->findAnimIdx(id);
267  ui->animBox->setCurrentIndex(index + 1);
268  ui->animOnceBox->setChecked(!onlyOnce);
269  ui->animKrBox->setChecked(stopOnRelease);
270  } else if(act.isSpecial()){
271  // Other special keys
272  ui->tabWidget->setCurrentIndex(TAB_SPECIAL);
273  int param;
274  QString sAction = act.specialInfo(param);
275  // Mode selection. Check wrap-around flag
276  ui->modeWrapBox->setChecked(true);
277  if(sAction == "mode"){
278  ui->modeWrapBox->setChecked(true);
279  if(param == KeyAction::MODE_PREV_WRAP)
280  param = KeyAction::MODE_PREV;
281  else if(param == KeyAction::MODE_NEXT_WRAP)
282  param = KeyAction::MODE_NEXT;
283  else if(param < 0)
284  ui->modeWrapBox->setChecked(false);
285  // Set mode box to current selection, or to mode 1 if invalid
286  param += 3;
287  if(param >= 0 && param < ui->modeBox->count())
288  ui->modeBox->setCurrentIndex(param);
289  else
290  // 0 -> "", 1 -> Prev, 2 -> Next, 3 -> Mode 1
291  ui->modeBox->setCurrentIndex(3);
292  } else if (sAction == "macro") {
293  ui->tabWidget->setCurrentIndex(TAB_MACRO);
294  if (act.isValidMacro()) {
295  ui->pteMacroBox->setPlainText(act.macroContent());
296  ui->pteMacroText->setPlainText(act.macroLine()[1].replace("&das_IST_31N_col0n;", ":"));
297  ui->pteMacroComment->setPlainText(act.macroLine()[2].replace("&das_IST_31N_col0n;", ":"));
298  // Set the invisible Buffer to the original timing information.
299  // For convenience / Migration from older versions:
300  // If the timing information is only "x", then ignore it by setting it to an empty QString.
301  ui->txtBuffer->setText("");
302  if (act.macroTiming() != "x") ui->txtBuffer->setText(act.macroTiming());
303  setCorrectRadioButton(act.macroContent());
304  } else {
305  qDebug("RebindWidget::setSelection found invalid macro definition.");
306  act.macroDisplay();
307  }
308  } else
309  ui->modeBox->setCurrentIndex(0);
310  // Brightness control. Also check wrap
311  if(sAction == "light"){
312  ui->lightWrapBox->setChecked(true);
313  if(param == KeyAction::LIGHT_DOWN_WRAP)
314  param = KeyAction::LIGHT_DOWN;
315  else if(param == KeyAction::LIGHT_UP_WRAP)
316  param = KeyAction::LIGHT_UP;
317  else
318  ui->lightWrapBox->setChecked(false);
319  if(param < 0 || param > 1)
320  param = -1;
321  ui->lightBox->setCurrentIndex(param + 1);
322  } else
323  ui->lightBox->setCurrentIndex(0);
324  // Win lock
325  if(sAction == "lock"){
326  if(param < 0 || param > 2)
327  param = -1;
328  ui->lockBox->setCurrentIndex(param + 1);
329  } else
330  ui->lockBox->setCurrentIndex(0);
331  }
332 }
static const int DPI_OFFSET
Definition: rebindwidget.cpp:6
QStringList wheelKeys
Definition: rebindwidget.h:105
KbBind * bind
Definition: rebindwidget.h:94
QCheckBox * programKpSIBox
static const int DPI_CUSTOM
Definition: keyaction.h:128
static const int PROGRAM_PR_MULTI
Definition: keyaction.h:138
QStringList mouseExtKeys
Definition: rebindwidget.h:104
const AnimList & animList()
Definition: kblight.h:49
QPlainTextEdit * pteMacroText
QComboBox * typingBox
QPlainTextEdit * pteMacroBox
void setBox(QWidget *box)
static const int PROGRAM_RE_MULTI
Definition: keyaction.h:139
QCheckBox * modeWrapBox
const QString & name() const
Definition: kbanim.h:73
static const int TAB_SPECIAL
Definition: rebindwidget.h:83
static const int MODE_PREV
Definition: keyaction.h:122
Definition: keymap.h:49
static const int TAB_MOUSE
Definition: rebindwidget.h:83
static const int TAB_PROGRAM
Definition: rebindwidget.h:83
QCheckBox * lightWrapBox
QComboBox * animBox
QComboBox * modBox
QComboBox * dpiBox
static const int PROGRAM_RE_INDEF
Definition: keyaction.h:139
QStringList mediaKeys
Definition: rebindwidget.h:102
QCheckBox * animOnceBox
QLineEdit * programKpBox
QStringList mouseKeys
Definition: rebindwidget.h:103
QStringList typingKeys
Definition: rebindwidget.h:98
QComboBox * numBox
QComboBox * lockBox
static const int PROGRAM_RE_KPSTOP
Definition: keyaction.h:139
static const int MODE_PREV_WRAP
Definition: keyaction.h:123
QLineEdit * programKrBox
KbLight * light()
Definition: kbbind.cpp:54
void setCorrectRadioButton(QString macdef)
RebindWidget::setCorrectRadioButton.
QComboBox * mb2Box
static const int TAB_MACRO
Definition: rebindwidget.h:83
QString action(const QString &key)
Definition: kbbind.cpp:145
QCheckBox * animKrBox
Definition: kbanim.h:11
static const int TAB_ANIM
Definition: rebindwidget.h:83
QComboBox * programKpModeBox
static const int LIGHT_DOWN
Definition: keyaction.h:131
QStringList selection
Definition: rebindwidget.h:96
Ui::RebindWidget * ui
Definition: rebindwidget.h:80
QTabWidget * tabWidget
QSpinBox * dpiCustYBox
QStringList modKeys
Definition: rebindwidget.h:99
static const int MODE_NEXT_WRAP
Definition: keyaction.h:123
QStringList fnKeys
Definition: rebindwidget.h:100
QComboBox * mediaBox
static const int MODE_NEXT
Definition: keyaction.h:122
QSpinBox * dpiCustXBox
QStringList numKeys
Definition: rebindwidget.h:101
static const int TAB_KB
Definition: rebindwidget.h:83
void applyChanges(const QStringList &keys, bool doUnbind)
QComboBox * lightBox
static const int LIGHT_DOWN_WRAP
Definition: keyaction.h:132
static const int LIGHT_UP_WRAP
Definition: keyaction.h:132
QCheckBox * programKrSIBox
QComboBox * modeBox
QComboBox * mbBox
QComboBox * fnBox
static const int LIGHT_UP
Definition: keyaction.h:131
QComboBox * wheelBox
QComboBox * programKrModeBox
struct keyAnim * anim
Definition: main.c:55
int findAnimIdx(const QUuid &guid) const
Definition: kblight.h:52
QPlainTextEdit * pteMacroComment

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

QStringList RebindWidget::fnKeys
private

Definition at line 100 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), setBind(), and setSelection().

MacroReader* RebindWidget::macReader
private

Definition at line 106 of file rebindwidget.h.

Referenced by on_btnStartMacro_clicked(), and on_btnStopMacro_clicked().

QStringList RebindWidget::mediaKeys
private

Definition at line 102 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), setBind(), and setSelection().

QStringList RebindWidget::modKeys
private

Definition at line 99 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), setBind(), and setSelection().

QStringList RebindWidget::mouseExtKeys
private

Definition at line 104 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), and setSelection().

QStringList RebindWidget::mouseKeys
private

Definition at line 103 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), and setSelection().

QStringList RebindWidget::numKeys
private

Definition at line 101 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), setBind(), and setSelection().

KbProfile* RebindWidget::profile
private

Definition at line 95 of file rebindwidget.h.

Referenced by setBind().

QStringList RebindWidget::selection
private
const int RebindWidget::TAB_ANIM = 2
staticprivate

Definition at line 83 of file rebindwidget.h.

Referenced by setSelection().

const int RebindWidget::TAB_KB = 0
staticprivate

Definition at line 83 of file rebindwidget.h.

Referenced by setSelection().

const int RebindWidget::TAB_MACRO = 5
staticprivate

Definition at line 83 of file rebindwidget.h.

Referenced by setSelection().

const int RebindWidget::TAB_MOUSE = 1
staticprivate

Definition at line 83 of file rebindwidget.h.

Referenced by setSelection().

const int RebindWidget::TAB_PROGRAM = 4
staticprivate

Definition at line 83 of file rebindwidget.h.

Referenced by setSelection().

const int RebindWidget::TAB_SPECIAL = 3
staticprivate

Definition at line 83 of file rebindwidget.h.

Referenced by setSelection().

QStringList RebindWidget::typingKeys
private

Definition at line 98 of file rebindwidget.h.

Referenced by applyChanges(), setBind(), and setSelection().

QStringList RebindWidget::wheelKeys
private

Definition at line 105 of file rebindwidget.h.

Referenced by applyChanges(), RebindWidget(), and setSelection().


The documentation for this class was generated from the following files: