left, right, and S shortcuts modified to use shift (#3116)
This commit is contained in:
parent
3d2c7b6670
commit
2409eae940
4 changed files with 15 additions and 10 deletions
|
@ -21,11 +21,13 @@ bool KeySignals::eventFilter(QObject * /*object*/, QEvent *event)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Right:
|
case Qt::Key_Right:
|
||||||
emit onRight();
|
if (kevent->modifiers() & Qt::ShiftModifier)
|
||||||
|
emit onShiftRight();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Left:
|
case Qt::Key_Left:
|
||||||
emit onLeft();
|
if (kevent->modifiers() & Qt::ShiftModifier)
|
||||||
|
emit onShiftLeft();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Delete:
|
case Qt::Key_Delete:
|
||||||
|
@ -54,7 +56,8 @@ bool KeySignals::eventFilter(QObject * /*object*/, QEvent *event)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Qt::Key_S:
|
case Qt::Key_S:
|
||||||
emit onS();
|
if (kevent->modifiers() & Qt::ShiftModifier)
|
||||||
|
emit onShiftS();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -12,14 +12,14 @@ signals:
|
||||||
void onEnter();
|
void onEnter();
|
||||||
void onCtrlEnter();
|
void onCtrlEnter();
|
||||||
void onCtrlAltEnter();
|
void onCtrlAltEnter();
|
||||||
void onLeft();
|
void onShiftLeft();
|
||||||
void onRight();
|
void onShiftRight();
|
||||||
void onDelete();
|
void onDelete();
|
||||||
void onCtrlAltMinus();
|
void onCtrlAltMinus();
|
||||||
void onCtrlAltEqual();
|
void onCtrlAltEqual();
|
||||||
void onCtrlAltLBracket();
|
void onCtrlAltLBracket();
|
||||||
void onCtrlAltRBracket();
|
void onCtrlAltRBracket();
|
||||||
void onS();
|
void onShiftS();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool eventFilter(QObject *, QEvent *event);
|
virtual bool eventFilter(QObject *, QEvent *event);
|
||||||
|
|
|
@ -147,7 +147,9 @@ bool ShortcutsSettings::isKeyAllowed(QString name, QString Sequences)
|
||||||
<< "Ctrl+Alt+]"
|
<< "Ctrl+Alt+]"
|
||||||
<< "Tab"
|
<< "Tab"
|
||||||
<< "Space"
|
<< "Space"
|
||||||
<< "S");
|
<< "Shift+S"
|
||||||
|
<< "Shift+Left"
|
||||||
|
<< "Shift+Right");
|
||||||
if (forbiddenKeys.contains(checkSequence)) {
|
if (forbiddenKeys.contains(checkSequence)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,12 +67,12 @@ void TabDeckEditor::createDeckDock()
|
||||||
connect(deckView->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this,
|
connect(deckView->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this,
|
||||||
SLOT(updateCardInfoRight(const QModelIndex &, const QModelIndex &)));
|
SLOT(updateCardInfoRight(const QModelIndex &, const QModelIndex &)));
|
||||||
connect(deckView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actSwapCard()));
|
connect(deckView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actSwapCard()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onS()), this, SLOT(actSwapCard()));
|
connect(&deckViewKeySignals, SIGNAL(onShiftS()), this, SLOT(actSwapCard()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onEnter()), this, SLOT(actIncrement()));
|
connect(&deckViewKeySignals, SIGNAL(onEnter()), this, SLOT(actIncrement()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onCtrlAltEqual()), this, SLOT(actIncrement()));
|
connect(&deckViewKeySignals, SIGNAL(onCtrlAltEqual()), this, SLOT(actIncrement()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onCtrlAltMinus()), this, SLOT(actDecrement()));
|
connect(&deckViewKeySignals, SIGNAL(onCtrlAltMinus()), this, SLOT(actDecrement()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onRight()), this, SLOT(actIncrement()));
|
connect(&deckViewKeySignals, SIGNAL(onShiftRight()), this, SLOT(actIncrement()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onLeft()), this, SLOT(actDecrement()));
|
connect(&deckViewKeySignals, SIGNAL(onShiftLeft()), this, SLOT(actDecrement()));
|
||||||
connect(&deckViewKeySignals, SIGNAL(onDelete()), this, SLOT(actRemoveCard()));
|
connect(&deckViewKeySignals, SIGNAL(onDelete()), this, SLOT(actRemoveCard()));
|
||||||
|
|
||||||
nameLabel = new QLabel();
|
nameLabel = new QLabel();
|
||||||
|
|
Loading…
Reference in a new issue