KDEUI
#include <kshortcutsdialog.h>
Signals | |
void | saved () |
Signals inherited from KDialog | |
void | aboutToShowDetails () |
void | applyClicked () |
void | buttonClicked (KDialog::ButtonCode button) |
void | cancelClicked () |
void | closeClicked () |
void | defaultClicked () |
void | finished () |
void | helpClicked () |
void | hidden () |
void | layoutHintChanged () |
void | noClicked () |
void | okClicked () |
void | resetClicked () |
void | tryClicked () |
void | user1Clicked () |
void | user2Clicked () |
void | user3Clicked () |
void | yesClicked () |
Static Public Member Functions | |
static int | configure (KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts=KShortcutsEditor::LetterShortcutsAllowed, QWidget *parent=0, bool bSaveSettings=true) |
Static Public Member Functions inherited from KDialog | |
static bool | avoidArea (QWidget *widget, const QRect &area, int screen=-1) |
static void | centerOnScreen (QWidget *widget, int screen=-1) |
static int | groupSpacingHint () |
static QString | makeStandardCaption (const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption) |
static int | marginHint () |
static void | resizeLayout (QWidget *widget, int margin, int spacing) |
static void | resizeLayout (QLayout *lay, int margin, int spacing) |
static void | setAllowEmbeddingInGraphicsView (bool allowEmbedding) |
static int | spacingHint () |
Additional Inherited Members | |
Public Types inherited from KDialog | |
enum | ButtonCode { None = 0x00000000, Help = 0x00000001, Default = 0x00000002, Ok = 0x00000004, Apply = 0x00000008, Try = 0x00000010, Cancel = 0x00000020, Close = 0x00000040, No = 0x00000080, Yes = 0x00000100, Reset = 0x00000200, Details = 0x00000400, User1 = 0x00001000, User2 = 0x00002000, User3 = 0x00004000, NoDefault = 0x00008000 } |
enum | ButtonPopupMode { InstantPopup = 0, DelayedPopup = 1 } |
enum | CaptionFlag { NoCaptionFlags = 0, AppNameCaption = 1, ModifiedCaption = 2, HIGCompliantCaption = AppNameCaption } |
Public Slots inherited from KDialog | |
void | delayedDestruct () |
void | enableButton (ButtonCode id, bool state) |
void | enableButtonApply (bool state) |
void | enableButtonCancel (bool state) |
void | enableButtonOk (bool state) |
void | enableLinkedHelp (bool state) |
bool | isDetailsWidgetVisible () const |
virtual void | setCaption (const QString &caption) |
virtual void | setCaption (const QString &caption, bool modified) |
void | setDetailsWidget (QWidget *detailsWidget) |
void | setDetailsWidgetVisible (bool visible) |
void | setHelp (const QString &anchor, const QString &appname=QString()) |
void | setHelpLinkText (const QString &text) |
virtual void | setPlainCaption (const QString &caption) |
Protected Slots inherited from KDialog | |
virtual void | slotButtonClicked (int button) |
void | updateGeometry () |
Protected Member Functions inherited from KDialog | |
KDialog (KDialogPrivate &dd, QWidget *parent, Qt::WindowFlags flags=0) | |
virtual void | closeEvent (QCloseEvent *e) |
virtual void | hideEvent (QHideEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
Protected Attributes inherited from KDialog | |
KDialogPrivate *const | d_ptr |
Detailed Description
Dialog for configuration of KActionCollection and KGlobalAccel.
The KShortcutsDialog class is used for configuring dictionaries of key/action associations for KActionCollection and KGlobalAccel. It uses the KShortcutsEditor widget and offers buttons to set all keys to defaults and invoke on-line help.
Several static methods are supplied which provide the most convenient interface to the dialog. The most common and most encouraged use is with KActionCollection.
- Since
- 4.3 By default this dialog is modal. If you don't want that, setModal(false) and then the non-static configure() will show the dialog. If you want to do anything extra when the dialog is done, connect to okClicked() and/or cancelClicked(). However, if your extra stuff depends on the changed settings already being saved, connect to saved() instead to be safe; if you connect to okClicked() your function might be called before the save happens.
example:
Definition at line 69 of file kshortcutsdialog.h.
Constructor & Destructor Documentation
|
explicit |
Constructs a KShortcutsDialog as a child of parent
.
Set allowLetterShortcuts
to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts.
Definition at line 119 of file kshortcutsdialog.cpp.
|
virtual |
Destructor.
Deletes all resources used by a KShortcutsDialog object.
Definition at line 145 of file kshortcutsdialog.cpp.
Member Function Documentation
QList< KActionCollection * > KShortcutsDialog::actionCollections | ( | ) | const |
- Returns
- the list of action collections that are available for configuration in the dialog.
Definition at line 160 of file kshortcutsdialog.cpp.
void KShortcutsDialog::addCollection | ( | KActionCollection * | collection, |
const QString & | title = QString() |
||
) |
Add all actions of the collection to the ones displayed and configured by the dialog.
- Parameters
-
title the title associated with the collection (if null, the KAboutData::progName() of the collection's componentData is used)
Definition at line 153 of file kshortcutsdialog.cpp.
Run the dialog and call writeSettings() on the action collections that were added if bSaveSettings
is true.
Definition at line 166 of file kshortcutsdialog.cpp.
|
static |
Pops up a modal dialog for configuring key settings.
The new shortcut settings will become active if the user presses OK.
- Parameters
-
collection the KActionCollection to configure allowLetterShortcuts set to KShortcutsEditor::LetterShortcutsDisallowed if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts. parent the parent widget to attach to bSaveSettings if true, the settings will also be saved back by calling writeSettings() on the action collections that were added.
- Returns
- Accept if the dialog was closed with OK, Reject otherwise.
Definition at line 186 of file kshortcutsdialog.cpp.
|
signal |
emitted after ok is clicked and settings are saved
|
virtual |
- See also
- QWidget::sizeHint()
Reimplemented from KDialog.
Definition at line 181 of file kshortcutsdialog.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.