59 void registerAllChildren( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
70 void registerAllChildActions( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
81 void registerAllChildShortcuts( QObject *
object,
bool recursive =
false,
const QString §ion = QString() );
94 bool registerAction( QAction *action,
const QString &defaultShortcut = QString(),
const QString §ion = QString() );
106 bool registerShortcut( QShortcut *shortcut,
const QString &defaultSequence = QString(),
const QString §ion = QString() );
116 bool unregisterAction( QAction *action );
126 bool unregisterShortcut( QShortcut *shortcut );
133 QList<QAction *> listActions()
const;
140 QList<QShortcut *> listShortcuts()
const;
147 QList<QObject *> listAll()
const;
155 QString objectDefaultKeySequence( QObject *
object )
const;
163 QString defaultKeySequence( QAction *action )
const;
171 QString defaultKeySequence( QShortcut *shortcut )
const;
180 bool setKeySequence(
const QString &name,
const QString &sequence );
188 bool setObjectKeySequence( QObject *
object,
const QString &sequence );
196 bool setKeySequence( QAction *action,
const QString &sequence );
204 bool setKeySequence( QShortcut *shortcut,
const QString &sequence );
213 QObject *objectForSequence(
const QKeySequence &sequence )
const;
221 QAction *actionForSequence(
const QKeySequence &sequence )
const;
229 QShortcut *shortcutForSequence(
const QKeySequence &sequence )
const;
236 QAction *actionByName(
const QString &name )
const;
243 QShortcut *shortcutByName(
const QString &name )
const;
254 QString objectSettingKey( QObject *
object )
const;
262 QObject *objectForSettingKey(
const QString &name )
const;
266 void actionDestroyed( QAction *action );
267 void shortcutDestroyed( QShortcut *shortcut );
270 typedef QHash<QAction *, QPair<QString, QString>> ActionsHash;
271 typedef QHash<QShortcut *, QPair<QString, QString>> ShortcutsHash;
273 ActionsHash mActions;
274 ShortcutsHash mShortcuts;
275 QString mSettingsPath;
283 void updateActionToolTip( QAction *action,
const QString &sequence );