61 void registerAllChildren( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
72 void registerAllChildActions( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
83 void registerAllChildShortcuts( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
96 bool registerAction( QAction *action,
const QString &defaultShortcut = QString(),
const QString §ion = QString() );
108 bool registerShortcut( QShortcut *shortcut,
const QString &defaultSequence = QString(),
const QString §ion = QString() );
118 bool unregisterAction( QAction *action );
128 bool unregisterShortcut( QShortcut *shortcut );
135 QList<QAction *> listActions()
const;
142 QList<QShortcut *> listShortcuts()
const;
149 QList<QObject *> listAll()
const;
157 QString objectDefaultKeySequence( QObject *
object )
const;
165 QString defaultKeySequence( QAction *action )
const;
173 QString defaultKeySequence( QShortcut *shortcut )
const;
182 bool setKeySequence(
const QString &name,
const QString &sequence );
190 bool setObjectKeySequence( QObject *
object,
const QString &sequence );
198 bool setKeySequence( QAction *action,
const QString &sequence );
206 bool setKeySequence( QShortcut *shortcut,
const QString &sequence );
215 QObject *objectForSequence(
const QKeySequence &sequence )
const;
223 QAction *actionForSequence(
const QKeySequence &sequence )
const;
231 QShortcut *shortcutForSequence(
const QKeySequence &sequence )
const;
238 QAction *actionByName(
const QString &name )
const;
245 QShortcut *shortcutByName(
const QString &name )
const;
256 QString objectSettingKey( QObject *
object )
const;
264 QObject *objectForSettingKey(
const QString &name )
const;
268 void actionDestroyed( QAction *action );
269 void shortcutDestroyed( QShortcut *shortcut );
272 typedef QHash<QAction *, QPair<QString, QString>> ActionsHash;
273 typedef QHash<QShortcut *, QPair<QString, QString>> ShortcutsHash;
275 ActionsHash mActions;
276 ShortcutsHash mShortcuts;
277 QString mSettingsPath;
285 void updateActionToolTip( QAction *action,
const QString &sequence );