58 QObject *ContextObj_ =
nullptr;
60 QHash<QByteArray, QList<QAction*>> Actions_;
62 QHash<QByteArray, QList<QShortcut*>> Shortcuts_;
63 QHash<QShortcut*, QList<QShortcut*>> Shortcut2Subs_;
65 QHash<QByteArray, Entity> Globals_;
139 QObject *target,
const QByteArray& method,
184 bool HasActionInfo (
const QByteArray&)
const;
Proxy for requesting shortcuts from the shortcut manager in the Core.
void AnnounceGlobalShorcuts()
Announces the global shortcuts.
QPair< QByteArray, QAction * > IDPair_t
ShortcutManager(const ICoreProxy_ptr &proxy, QObject *parent)
Creates the shortcut manager.
void RegisterAction(const QByteArray &id, QAction *action)
Registers the given QAction by the given id.
void SetShortcut(const QByteArray &id, const QKeySequences_t &sequences)
Sets the key sequence for the given action.
void RegisterGlobalShortcut(const QByteArray &id, QObject *target, const QByteArray &method, const ActionInfo &info)
Registers the given global shortcut with the given id.
void RegisterActionInfo(const QByteArray &id, const ActionInfo &info)
Registers the given action info with the given id.
QMap< QByteArray, ActionInfo > GetActionInfo() const
Returns the map with information about actions.
void RegisterActions(const std::initializer_list< IDPair_t > &actions)
void RegisterShortcut(const QByteArray &id, const ActionInfo &info, QShortcut *shortcut)
Registers the given QShortcut with the given id.
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
QList< QKeySequence > QKeySequences_t
QDataStream & operator<<(QDataStream &out, const LC::Util::RegExp &rx)
#define UTIL_SHORTCUTS_API
Describes an action exposed in shortcut manager.
A message used for inter-plugin communication.