Add extra shortcuts to main window and sub-editors

This commit is contained in:
BigBahss
2020-11-12 23:48:03 -05:00
parent f044672d2e
commit bb6786f24e
7 changed files with 69 additions and 44 deletions

View File

@@ -207,16 +207,14 @@ public:
virtual void reset() override { user_shortcuts.clear(); }
// Call this before applying user shortcuts so that the user can restore defaults.
void setDefaultShortcuts(const QObjectList &objects);
void setDefaultShortcuts(const QMultiMap<const QObject *, QKeySequence> &objects_keySequences);
QList<QKeySequence> defaultShortcuts(const QObject *object) const;
void setUserShortcuts(const QObjectList &objects);
void setUserShortcuts(const QMultiMap<const QObject *, QKeySequence> &objects_keySequences);
QList<QKeySequence> userShortcuts(const QObject *object) const;
static bool objectNameIsValid(const QObject *object);
protected:
virtual QString getConfigFilepath() override;
virtual void parseConfigKeyValue(QString key, QString value) override;
@@ -243,7 +241,6 @@ private:
const QList<QKeySequence> &keySequences);
};
// Call setDefaultShortcuts() prior to applying user shortcuts.
extern ShortcutsConfig shortcutsConfig;
#endif // CONFIG_H

View File

@@ -108,6 +108,7 @@ private:
void initSelectedTileItem();
void initMetatileLayersItem();
void initShortcuts();
void initExtraShortcuts();
void restoreWindowState();
void initMetatileHistory();
void setTilesets(QString primaryTilesetLabel, QString secondaryTilesetLabel);