mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
refactored deck editor UI key shortcuts
The global shortcuts were removed in favor of key events which are only triggered when a widget has focus. This is necessary to allow different widgets to react differently to the 'enter' key. The current key configuration is: search edit focused: * left/right: decrease/increase card count for selected database card * enter: add selected card to deck * ctrl-enter: add selected card to deck sideboard * ctrl-left/right: decrease/increase card count in sideboard for selected card database focused: the same as with search edit. deckview focused: * left/right: decrease/increase card count for selected deckview card * enter: increase count for selected deckview card * delete/backspace: delete selected card from deck
This commit is contained in:
parent
f6e9676c75
commit
2b7ea0c983
9 changed files with 212 additions and 30 deletions
|
|
@ -41,7 +41,8 @@ FilterBuilder::FilterBuilder(QWidget *parent)
|
|||
layout->setAlignment(Qt::AlignTop);
|
||||
setLayout(layout);
|
||||
|
||||
connect(ok, SIGNAL(released()), this, SLOT(add_released()));
|
||||
connect(edit, SIGNAL(returnPressed()), this, SLOT(emit_add()));
|
||||
connect(ok, SIGNAL(released()), this, SLOT(emit_add()));
|
||||
connect(filterCombo, SIGNAL(currentIndexChanged(int)), edit, SLOT(clear()));
|
||||
fltr = NULL;
|
||||
}
|
||||
|
|
@ -62,7 +63,7 @@ static int comboCurrentIntData(const QComboBox *combo)
|
|||
return combo->itemData(combo->currentIndex()).toInt();
|
||||
}
|
||||
|
||||
void FilterBuilder::add_released()
|
||||
void FilterBuilder::emit_add()
|
||||
{
|
||||
QString txt;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue