KXmlGui
kshortcutschemeshelper.cpp
25bool KShortcutSchemesHelper::saveShortcutScheme(const QList<KActionCollection *> &collections, const QString &schemeName)
38 // Maybe we need a checkbox for this? Or an env var for contributors to set, rather? End users don't care.
45 const QString key = saveToApplicationFile ? QCoreApplication::applicationName() : client->componentName();
62 qCDebug(DEBUG_KXMLGUI) << "Saving shortcut scheme for action collection with" << collection->actions().count() << "actions";
103 return KSharedConfig::openConfig()->group(QStringLiteral("Shortcut Schemes")).readEntry("Current Scheme", "Default");
106QString KShortcutSchemesHelper::writableShortcutSchemeFileName(const QString &componentName, const QString &schemeName)
108 return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/%1/shortcuts/%2").arg(componentName, schemeName);
111QString KShortcutSchemesHelper::writableApplicationShortcutSchemeFileName(const QString &schemeName)
117QString KShortcutSchemesHelper::shortcutSchemeFileName(const QString &componentName, const QString &schemeName)
119 return QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("%1/shortcuts/%2").arg(componentName, schemeName));
124 return QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("%1/shortcuts/%2").arg(QCoreApplication::applicationName(), schemeName));
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
Definition kxmlguiclient.h:40
const QList< QKeySequence > & shortcut(StandardShortcut id)
applicationName
bool mkpath(const QString &dirPath) const const
QDomElement createElement(const QString &tagName)
QString toString(int indent) const const
void setAttribute(const QString &name, const QString &value)
QDomNode appendChild(const QDomNode &newChild)
QDomNodeList childNodes() const const
bool isEmpty() const const
bool remove()
WriteOnly
QString listToString(const QList< QKeySequence > &list, SequenceFormat format)
bool isEmpty() const const
iterator insert(const Key &key, const T &value)
QList< Key > uniqueKeys() const const
QList< T > values() const const
GenericDataLocation
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
QString writableLocation(StandardLocation type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.