Xlite simu shift working, dirty hack to get mouse wheel to do the right thing
This commit is contained in:
@@ -38,7 +38,7 @@ SimulatedUIWidgetXLITE::SimulatedUIWidgetXLITE(SimulatorInterface *simulator, QW
|
||||
act = new RadioUiAction(1, QList<int>() << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace, SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_EXIT);
|
||||
addRadioWidget(ui->rightbuttons->addArea(QRect(36, 147, 27, 27), "XLITE/right_exit.png", act));
|
||||
|
||||
act = new RadioUiAction(7, QList<int>() << Qt::Key_Shift, SIMU_STR_HLP_KEY_SHIFT, SIMU_STR_HLP_ACT_SHIFT);
|
||||
act = new RadioUiAction(0, QList<int>() << Qt::Key_S, SIMU_STR_HLP_KEY_SHIFT, SIMU_STR_HLP_ACT_SHIFT);
|
||||
addRadioWidget(ui->rightbuttons->addArea(QRect(73, 129, 27, 27), "XLITE/right_shift.png", act));
|
||||
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(9, 152, 25, 25), "XLITE/left_scrnshot.png", m_screenshotAction));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <QCoreApplication>
|
||||
|
||||
#define SIMU_STR_HLP_KEY_ENTER QCoreApplication::translate("SimulatedUIWidget", "ENTER")
|
||||
#define SIMU_STR_HLP_KEY_SHIFT QCoreApplication::translate("SimulatedUIWidget", "SHIFT")
|
||||
#define SIMU_STR_HLP_KEY_SHIFT QCoreApplication::translate("SimulatedUIWidget", "S")
|
||||
#define SIMU_STR_HLP_KEY_PGUP QCoreApplication::translate("SimulatedUIWidget", "PG-UP")
|
||||
#define SIMU_STR_HLP_KEY_PGDN QCoreApplication::translate("SimulatedUIWidget", "PG-DN")
|
||||
#define SIMU_STR_HLP_KEY_DEL QCoreApplication::translate("SimulatedUIWidget", "DEL")
|
||||
|
||||
@@ -280,10 +280,17 @@ void OpenTxSimulator::rotaryEncoderEvent(int steps)
|
||||
#else
|
||||
// TODO : this should probably be handled in the GUI
|
||||
int key;
|
||||
#if defined(PCBXLITE)
|
||||
if (steps > 0)
|
||||
key = KEY_DOWN;
|
||||
else if (steps < 0)
|
||||
key = KEY_UP;
|
||||
#else
|
||||
if (steps > 0)
|
||||
key = KEY_MINUS;
|
||||
else if (steps < 0)
|
||||
key = KEY_PLUS;
|
||||
#endif
|
||||
else
|
||||
// Should not happen but Clang complains that key is unset otherwise
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user