KXmlGui
kshortcutsdialog.cpp
119 m_detailsButton->setText(detailsButtonText() + (isVisible ? QStringLiteral(" >>") : QStringLiteral(" <<")));
141 : KShortcutsDialog(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsAllowed, parent)
145KShortcutsDialog::KShortcutsDialog(KShortcutsEditor::ActionTypes types, KShortcutsEditor::LetterShortcuts allowLetterShortcuts, QWidget *parent)
158 connect(d->m_schemeEditor, &KShortcutSchemesEditor::shortcutsSchemeChanged, this, [this](const QString &scheme) {
165 d->m_detailsButton->setText(KShortcutsDialogPrivate::detailsButtonText() + QLatin1String(" >>"));
173 buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults);
176 KGuiItem::assign(buttonBox->button(QDialogButtonBox::RestoreDefaults), KStandardGuiItem::defaults());
179 connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, d->m_keyChooser, &KShortcutsEditor::allDefault);
183 connect(printButton, &QPushButton::clicked, d->m_keyChooser, &KShortcutsEditor::printShortcuts);
240void KShortcutsDialog::showDialog(KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts, QWidget *parent)
Persistent
Global
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString readEntry(const char *key, const char *aDefault=nullptr) const
static void assign(QPushButton *button, const KGuiItem &item)
Dialog for configuration of KActionCollection and KGlobalAccel.
Definition kshortcutsdialog.h:85
KShortcutsDialog(KShortcutsEditor::ActionTypes actionTypes=KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcuts allowLetterShortcuts=KShortcutsEditor::LetterShortcutsAllowed, QWidget *parent=nullptr)
Constructs a KShortcutsDialog as a child of parent.
Definition kshortcutsdialog.cpp:145
void importConfiguration(const QString &path)
Imports a shortcuts set up from path.
Definition kshortcutsdialog.cpp:251
void addActionToSchemesMoreButton(QAction *action)
This adds a QAction to the "More Actions" menu.
Definition kshortcutsdialog.cpp:268
void saved()
Emitted after the dialog is accepted (by clicking the OK button) and settings are saved.
void exportConfiguration(const QString &path) const
Exports a shortcuts set up from path.
Definition kshortcutsdialog.cpp:257
QList< KActionCollection * > actionCollections() const
Definition kshortcutsdialog.cpp:207
void refreshSchemes()
Reloads the list of schemes in the "Manage Schemes" section.
Definition kshortcutsdialog.cpp:263
bool configure(bool saveSettings=true)
Run the dialog and call writeSettings() on the action collections that were added if saveSettings is ...
Definition kshortcutsdialog.cpp:214
static void showDialog(KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts=KShortcutsEditor::LetterShortcutsAllowed, QWidget *parent=nullptr)
This static method shows a modal dialog that can be used to configure the shortcuts associated with e...
Definition kshortcutsdialog.cpp:240
void addCollection(KActionCollection *collection, const QString &title={})
Add all actions of the collection to the ones displayed and configured by the dialog.
Definition kshortcutsdialog.cpp:201
Widget for configuration of KAccel and KGlobalAccel.
Definition kshortcutseditor.h:50
void clearCollections()
Removes all action collections from the editor.
Definition kshortcutseditor.cpp:83
void addCollection(KActionCollection *, const QString &title=QString())
Insert an action collection, i.e.
Definition kshortcutseditor.cpp:91
void allDefault()
Set all shortcuts to their default values (bindings).
Definition kshortcutseditor.cpp:235
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
Definition kxmlguiclient.h:40
KXMLGUIFactory * factory() const
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return nullptr if the ...
Definition kxmlguiclient.cpp:631
void setXMLGUIBuildDocument(const QDomDocument &doc)
Definition kxmlguiclient.cpp:616
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition kxmlguifactory.h:56
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
PrimaryAction
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
KGuiItem print()
KGuiItem cancel()
KGuiItem defaults()
KGuiItem ok()
KGuiItem save()
KGuiItem discard()
void clicked(bool checked)
void setText(const QString &text)
virtual void accept()
virtual int exec()
void setModal(bool modal)
virtual void reject()
ActionRole
void accepted()
QPushButton * addButton(StandardButton button)
QPushButton * button(StandardButton which) const const
void rejected()
void setStandardButtons(StandardButtons buttons)
void restoreOverrideCursor()
void setOverrideCursor(const QCursor &cursor)
void addWidget(QWidget *w)
T & first()
bool isEmpty() const const
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
WaitCursor
WA_DeleteOnClose
QLayout * layout() const const
bool isModal() const const
void show()
void resize(const QSize &)
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.