16 #ifndef QGSSHORTCUTSMANAGER_H 17 #define QGSSHORTCUTSMANAGER_H 60 void registerAllChildren( QObject *
object,
bool recursive =
false );
70 void registerAllChildActions( QObject *
object,
bool recursive =
false );
80 void registerAllChildShortcuts( QObject *
object,
bool recursive =
false );
92 bool registerAction( QAction *action,
const QString &defaultShortcut = QString() );
103 bool registerShortcut( QShortcut *shortcut,
const QString &defaultSequence = QString() );
113 bool unregisterAction( QAction *action );
123 bool unregisterShortcut( QShortcut *shortcut );
130 QList<QAction *> listActions()
const;
137 QList<QShortcut *> listShortcuts()
const;
144 QList<QObject *> listAll()
const;
152 QString objectDefaultKeySequence( QObject *
object )
const;
160 QString defaultKeySequence( QAction *action )
const;
168 QString defaultKeySequence( QShortcut *shortcut )
const;
177 bool setKeySequence(
const QString &name,
const QString &sequence );
185 bool setObjectKeySequence( QObject *
object,
const QString &sequence );
193 bool setKeySequence( QAction *action,
const QString &sequence );
201 bool setKeySequence( QShortcut *shortcut,
const QString &sequence );
210 QObject *objectForSequence(
const QKeySequence &sequence )
const;
218 QAction *actionForSequence(
const QKeySequence &sequence )
const;
226 QShortcut *shortcutForSequence(
const QKeySequence &sequence )
const;
233 QAction *actionByName(
const QString &name )
const;
240 QShortcut *shortcutByName(
const QString &name )
const;
247 void actionDestroyed();
248 void shortcutDestroyed();
252 typedef QHash< QAction *, QString > ActionsHash;
253 typedef QHash< QShortcut *, QString > ShortcutsHash;
255 ActionsHash mActions;
256 ShortcutsHash mShortcuts;
257 QString mSettingsPath;
265 void updateActionToolTip( QAction *action,
const QString &sequence );
270 #endif // QGSSHORTCUTSMANAGER_H
Shortcuts manager is a class that contains a list of QActions and QShortcuts that have been registere...
QString settingsPath() const
Returns the root settings path used to store shortcut customisation.