60 void registerAllChildren( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
71 void registerAllChildActions( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
82 void registerAllChildShortcuts( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
95 bool registerAction( QAction *action,
const QString &defaultShortcut = QString(),
const QString §ion = QString() );
107 bool registerShortcut( QShortcut *shortcut,
const QString &defaultSequence = QString(),
const QString §ion = QString() );
117 bool unregisterAction( QAction *action );
127 bool unregisterShortcut( QShortcut *shortcut );
134 QList<QAction *> listActions()
const;
141 QList<QShortcut *> listShortcuts()
const;
148 QList<QObject *> listAll()
const;
156 QString objectDefaultKeySequence( QObject *
object )
const;
164 QString defaultKeySequence( QAction *action )
const;
172 QString defaultKeySequence( QShortcut *shortcut )
const;
181 bool setKeySequence(
const QString &name,
const QString &sequence );
189 bool setObjectKeySequence( QObject *
object,
const QString &sequence );
197 bool setKeySequence( QAction *action,
const QString &sequence );
205 bool setKeySequence( QShortcut *shortcut,
const QString &sequence );
214 QObject *objectForSequence(
const QKeySequence &sequence )
const;
222 QAction *actionForSequence(
const QKeySequence &sequence )
const;
230 QShortcut *shortcutForSequence(
const QKeySequence &sequence )
const;
237 QAction *actionByName(
const QString &name )
const;
244 QShortcut *shortcutByName(
const QString &name )
const;
255 QString objectSettingKey( QObject *
object )
const;
263 QObject *objectForSettingKey(
const QString &name )
const;
267 void actionDestroyed( QAction *action );
268 void shortcutDestroyed( QShortcut *shortcut );
271 typedef QHash<QAction *, QPair<QString, QString>> ActionsHash;
272 typedef QHash<QShortcut *, QPair<QString, QString>> ShortcutsHash;
274 ActionsHash mActions;
275 ShortcutsHash mShortcuts;
276 QString mSettingsPath;
284 void updateActionToolTip( QAction *action,
const QString &sequence );