Shortcuts preference pane (#3641)

* Shortcuts preference pane

* Honor and glory to the hypnoclangifier

* clanfigy: exclude deleted files from being checked

* keep the olf translation context to be able to reuse old translations

* Fix gcc; extract translations

* Moved generic buttons after the groupbox

* Update current item on "clear/reset all"

* Sequenceedit: make buttons larger and translatable, add text

* Event filter

* Don't filter arrow keys; added placeholder text

* group counters
This commit is contained in:
ctrlaltca 2019-03-10 21:49:33 +01:00 committed by GitHub
parent 11b2942d09
commit 389f7fdc25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 1606 additions and 3123 deletions

View file

@ -10,21 +10,19 @@
#include <QSpinBox>
class CardDatabase;
class QCloseEvent;
class QGridLayout;
class QHBoxLayout;
class QLineEdit;
class QListWidget;
class QListWidgetItem;
class QStackedWidget;
class QLineEdit;
class QPushButton;
class QComboBox;
class QGroupBox;
class QCheckBox;
class QLabel;
class QCloseEvent;
class QSpinBox;
class QRadioButton;
class QSpinBox;
class QSlider;
class QSpinBox;
class QStackedWidget;
class QTreeWidget;
class QTreeWidgetItem;
class QVBoxLayout;
class SequenceEdit;
class AbstractSettingsPage : public QWidget
{
@ -228,6 +226,37 @@ private slots:
void themeBoxChanged(int index);
};
class ShortcutSettingsPage : public AbstractSettingsPage
{
Q_OBJECT
public:
ShortcutSettingsPage();
void retranslateUi() override;
private:
QTreeWidget *shortcutsTable;
QVBoxLayout *mainLayout;
QHBoxLayout *buttonsLayout;
QGroupBox *editShortcutGroupBox;
QGridLayout *editLayout;
QLabel *currentActionGroupLabel;
QLabel *currentActionGroupName;
QLabel *currentActionLabel;
QLabel *currentActionName;
QLabel *currentShortcutLabel;
SequenceEdit *editTextBox;
QLabel *faqLabel;
QPushButton *btnResetAll;
QPushButton *btnClearAll;
private slots:
void resetShortcuts();
void refreshShortcuts();
void createShortcuts();
void clearShortcuts();
void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
};
class DlgSettings : public QDialog
{
Q_OBJECT
@ -243,8 +272,7 @@ private:
QListWidget *contentsWidget;
QStackedWidget *pagesWidget;
QListWidgetItem *generalButton, *appearanceButton, *userInterfaceButton, *deckEditorButton, *messagesButton,
*soundButton;
QListWidgetItem *shortcutsButton;
*soundButton, *shortcutsButton;
void createIcons();
void retranslateUi();