Gui: add ShortcutManager to unify shortcut handling
Support longest key sequence match with user defined delay (configurable through 'Customize -> Keyboard -> Key sequence delay'). Support user defined priority to resolve shortcut conflict through 'Customize -> Keyboard') Add 'All' category in 'Customize -> Keyboard' to list all command and showing their shortcuts Unify macro command shortcut setting (BaseApp/Preferences/Shortcut).
This commit is contained in:
@@ -289,10 +289,13 @@ public:
|
||||
const char* className() const override
|
||||
{ return "StdCmdFreezeViews"; }
|
||||
|
||||
void setShortcut (const QString &) override;
|
||||
QString getShortcut() const override;
|
||||
|
||||
protected:
|
||||
void activated(int iMsg) override;
|
||||
bool isActive() override;
|
||||
Action * createAction() override;
|
||||
Action * createAction(void) override;
|
||||
void languageChange() override;
|
||||
|
||||
private:
|
||||
@@ -356,6 +359,19 @@ Action * StdCmdFreezeViews::createAction()
|
||||
return pcAction;
|
||||
}
|
||||
|
||||
void StdCmdFreezeViews::setShortcut(const QString &shortcut)
|
||||
{
|
||||
if (freezeView)
|
||||
freezeView->setShortcut(shortcut);
|
||||
}
|
||||
|
||||
QString StdCmdFreezeViews::getShortcut() const
|
||||
{
|
||||
if (freezeView)
|
||||
return freezeView->shortcut().toString();
|
||||
return Command::getShortcut();
|
||||
}
|
||||
|
||||
void StdCmdFreezeViews::activated(int iMsg)
|
||||
{
|
||||
auto pcAction = qobject_cast<ActionGroup*>(_pcAction);
|
||||
|
||||
Reference in New Issue
Block a user