KGlobalAccel
component.cpp
131 bool Component::createGlobalShortcutContext(const QString &uniqueName, const QString &friendlyName)
134 qCDebug(KGLOBALACCELD) << "Shortcut Context " << uniqueName << "already exists for component " << _uniqueName;
198 Q_EMIT globalShortcutPressed(shortcut.context()->component()->uniqueName(), shortcut.uniqueName(), timestamp);
221 Q_EMIT globalShortcutReleased(shortcut.context()->component()->uniqueName(), shortcut.uniqueName(), timestamp);
237 GlobalShortcut *Component::getShortcutByKey(const QKeySequence &key, KGlobalAccel::MatchType type) const
242 QList<GlobalShortcut *> Component::getShortcutsByKey(const QKeySequence &key, KGlobalAccel::MatchType type) const
254 GlobalShortcut *Component::getShortcutByName(const QString &uniqueName, const QString &context) const
277 bool Component::isShortcutAvailable(const QKeySequence &key, const QString &component, const QString &context) const
void append(const T &value)
bool isShortcutAvailable(const QKeySequence &key, const QString &component, const QString &context) const
Check if key is available for component component.
Definition: component.cpp:277
virtual Q_SCRIPTABLE bool cleanUp()
Remove all currently not used global shortcuts registrations for this component and if nothing is lef...
Definition: component.cpp:110
QString readEntry(const char *key, const char *aDefault=nullptr) const
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
const T value(const Key &key) const const
Q_SCRIPTABLE QStringList shortcutNames(const QString &context=QStringLiteral("default")) const
Get all shortcutnames living in context.
Definition: component.cpp:352
Q_SCRIPTABLE bool isActive() const
Check if the component is currently active.
Definition: component.cpp:265
const QList< QKeySequence > & shortcut(StandardShortcut id)
virtual void syncWindowingSystem()
Allows implementing plugins to synchronize with the windowing system.
Definition: kglobalaccel_interface.cpp:35
GlobalShortcutContext * shortcutContext(const QString &name)
Returns the shortcut context name or nullptr.
Definition: component.cpp:342
GlobalShortcut * getShortcutByKey(const QKeySequence &key, KGlobalAccel::MatchType type=KGlobalAccel::MatchType::Equal) const
Get the shortcut corresponding to key.
Definition: globalshortcutsregistry.cpp:180
Q_EMITQ_EMIT
int removeAll(const T &value)
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
Q_SCRIPTABLE void globalShortcutPressed(const QString &componentUnique, const QString &shortcutUnique, qlonglong timestamp)
Signals that a action for this component was triggered.
QList< Key > keys() const const
QList< GlobalShortcut * > getShortcutsByKey(const QKeySequence &key, KGlobalAccel::MatchType type) const
Returns the list of shortcuts (different context) registered with key.
Definition: component.cpp:242
Q_SCRIPTABLE QStringList getShortcutContexts() const
Returns the shortcut contexts available for the component.
Definition: component.cpp:260
void chop(int n)
QDBusObjectPath dbusPath() const
Return uniqueName converted to a valid dbus path.
Definition: component.cpp:146
void deleteGroup(const char *group, WriteConfigFlags flags=Normal)
QList< GlobalShortcut * > allShortcuts(const QString &context=QStringLiteral("default")) const
Returns all shortcuts in context @context.
Definition: component.cpp:98
QHash::const_iterator cend() const const
QHash::iterator insert(const Key &key, const T &value)
void deactivateShortcuts(bool temporarily=false)
Deactivate all currently active shortcuts.
Definition: component.cpp:166
PortableText
int size() const const
int size() const const
Definition: globalshortcutcontext.h:23
void unregisterShortcut(const QString &uniqueName)
Unregister shortcut. This will remove its siblings from all contexts.
Definition: component.cpp:363
bool isEmpty() const const
QString toString(QKeySequence::SequenceFormat format) const const
bool isEmpty() const const
bool createGlobalShortcutContext(const QString &context, const QString &friendlyName=QString())
Creates the new global shortcut context context.
Definition: component.cpp:131
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
QList< KGlobalShortcutInfo > allShortcutInfos() const
Return KGlobalShortcutInfos for all shortcuts.
Definition: globalshortcutcontext.cpp:33
QString path() const const
QKeySequence fromString(const QString &str, QKeySequence::SequenceFormat format)
QDBusObjectPath dbusPath() const
Return the root dbus path for the registry.
Definition: globalshortcutsregistry.cpp:162
void loadSettings(KConfigGroup &config)
Load the settings from config group config.
Definition: component.cpp:320
QList< T > values() const const
QStringList keyList() const
GlobalShortcut * getShortcutByKey(const QKeySequence &key, KGlobalAccel::MatchType type) const
Get shortcut for key or nullptr.
Definition: globalshortcutcontext.cpp:57
GlobalShortcut * getShortcutByKey(const QKeySequence &key, KGlobalAccel::MatchType type) const
Returns the currently active shortcut for key.
Definition: component.cpp:237
Q_SCRIPTABLE void globalShortcutReleased(const QString &componentUnique, const QString &shortcutUnique, qlonglong timestamp)
Signals that a action for this component is not triggered anymore.
Component(const QString &uniqueName, const QString &friendlyName)
Constructs a component.
Definition: component.cpp:56
void setFriendlyName(const QString &)
Sets the human readable name for this component.
Definition: component.cpp:337
GlobalShortcut * getShortcutByName(const QString &uniqueName, const QString &context=QStringLiteral("default")) const
Returns the shortcut by unique name.
Definition: component.cpp:254
QString name() const
QHash::const_iterator cbegin() const const
GlobalShortcut * registerShortcut(const QString &uniqueName, const QString &friendlyName, const QString &shortcutString, const QString &defaultShortcutString)
Create a new globalShortcut by its name.
Definition: component.cpp:297
Q_SCRIPTABLE QList< KGlobalShortcutInfo > allShortcutInfos(const QString &context=QStringLiteral("default")) const
Returns all shortcut in context.
Definition: component.cpp:104
bool isEmpty() const const
QString & append(QChar ch)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 03:54:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 03:54:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.