KDEUI
kshortcutseditor.cpp
Go to the documentation of this file.
56 KShortcutsEditor::KShortcutsEditor(KActionCollection *collection, QWidget *parent, ActionTypes actionType,
66 KShortcutsEditor::KShortcutsEditor(QWidget *parent, ActionTypes actionType, LetterShortcuts allowLetterShortcuts)
133 hier[KShortcutsEditorPrivate::Program] = d->findOrMakeItem( hier[KShortcutsEditorPrivate::Root], displayTitle);
142 hier[KShortcutsEditorPrivate::Action] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Program], category->text());
294 void KShortcutsEditorPrivate::initGUI( KShortcutsEditor::ActionTypes types, KShortcutsEditor::LetterShortcuts allowLetterShortcuts )
336 bool KShortcutsEditorPrivate::addAction(QAction *action, QTreeWidgetItem *hier[], hierarchyLevel level)
373 changeKeyShortcut(item, GlobalPrimary, act->globalShortcut(KAction::DefaultShortcut).primary());
374 changeKeyShortcut(item, GlobalAlternate, act->globalShortcut(KAction::DefaultShortcut).alternate());
397 QTreeWidgetItem *KShortcutsEditorPrivate::findOrMakeItem(QTreeWidgetItem *parent, const QString &name)
413 void KShortcutsEditorPrivate::capturedShortcut(const QVariant &newShortcut, const QModelIndex &index)
431 void KShortcutsEditorPrivate::changeKeyShortcut(KShortcutsEditorItem *item, uint column, const QKeySequence &capture)
445 void KShortcutsEditorPrivate::changeShapeGesture(KShortcutsEditorItem *item, const KShapeGesture &capture)
479 void KShortcutsEditorPrivate::changeRockerGesture(KShortcutsEditorItem *item, const KRockerGesture &capture)
568 bool KShortcutsEditorPrivate::stealShapeGesture(KShortcutsEditorItem *item, const KShapeGesture &gst)
571 QString message = i18n("The '%1' shape gesture has already been allocated to the \"%2\" action.\n"
584 bool KShortcutsEditorPrivate::stealRockerGesture(KShortcutsEditorItem *item, const KRockerGesture &gst)
587 QString message = i18n("The '%1' rocker gesture has already been allocated to the \"%2\" action.\n"
701 shortcutTable->cellAt(shortcutTable->rows()-1,0).firstCursorPosition().insertText(shortcutTitleToColumn.at(k).first);
void writeConfiguration(KConfigGroup *config=0) const
Write the current settings to the config object.
Definition: kshortcutseditor.cpp:220
text
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
void undoChanges()
Undo all change made since the last commit().
Definition: kshortcutseditor.cpp:257
QString i18n(const char *text)
QTextCursor firstCursorPosition() const
void setupUi(QWidget *widget)
Definition: kmessagebox.h:74
int rows() const
void setProperty(int propertyId, const QVariant &value)
KComponentData componentData() const
The KComponentData with which this class is associated.
Definition: kactioncollection.cpp:176
void insertHtml(const QString &html)
QTreeWidgetItem * child(int index) const
Definition: kgesture.h:152
KShapeGesture shapeGesture(ShortcutTypes type=ActiveShortcut) const
Definition: kaction.cpp:323
void exportConfiguration(KConfig *config) const
Export the current setting to configuration config.
Definition: kshortcutseditor.cpp:191
const T & at(int i) const
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Defines platform-independent classes for keyboard shortcut handling.
void writeSettings(KConfigGroup *config=0, bool writeDefaults=false, QAction *oneAction=0) const
Write the current configurable key associations to config.
Definition: kactioncollection.cpp:563
T value() const
void setCellSpacing(qreal spacing)
void setFormat(const QTextCharFormat &format)
const KAboutData * aboutData() const
const_iterator insert(const T &value)
The shortcut is a default shortcut - it becomes active when somebody decides to reset shortcuts to de...
Definition: kaction.h:238
QPrintDialog * createPrintDialog(QPrinter *printer, PageSelectPolicy pageSelectPolicy, const QList< QWidget * > &customTabs, QWidget *parent=0)
Definition: kdeprintdialog.cpp:39
void setHeaderRowCount(int count)
QString i18nc(const char *ctxt, const char *text)
void printShortcuts() const
Opens a printing dialog to print all the shortcuts.
Definition: kshortcutseditor.cpp:279
QList< T > findChildren(const QString &name) const
void setFlags(QFlags< Qt::ItemFlag > flags)
bool isValid() const
int count(const T &value) const
Definition: kstandardshortcut.h:69
void clearCollections()
Removes all action collections from the editor.
Definition: kshortcutseditor.cpp:94
void setBorder(qreal width)
void setUpdatesEnabled(bool enable)
void insertText(const QString &text)
objectName
bool isEmpty() const
QList< QAction * > actions() const
Returns the list of KActions which belong to this action collection.
Definition: kactioncollection.cpp:186
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
Actions which are triggered by any keypress in the windowing system.
Definition: kshortcutseditor.h:73
void setFormat(const QTextTableFormat &format)
Widget for configuration of KAccel and KGlobalAccel.
Definition: kshortcutseditor.h:60
void importConfiguration(KConfig *config)
Import the settings from configuration config.
Definition: kshortcutseditor.cpp:177
whatsThis
void setDefaultFont(const QFont &font)
void setBottomMargin(qreal margin)
QKeySequence alternate() const
Returns the alternate key sequence of this shortcut.
Definition: kshortcut.cpp:139
void allDefault()
Set all shortcuts to their default values (bindings).
Definition: kshortcutseditor.cpp:273
bool contains(const T &value) const
void setTopMargin(qreal margin)
QTextCharFormat format() const
Letter shortcuts are allowed.
Definition: kshortcutseditor.h:86
void setFontWeight(int weight)
void addCollection(KActionCollection *, const QString &title=QString())
Insert an action collection, i.e.
Definition: kshortcutseditor.cpp:102
QTextTable * insertTable(int rows, int columns, const QTextTableFormat &format)
QString rockerName() const
Return a user-friendly name of the button combination.
Definition: kgesture.cpp:532
KRockerGesture rockerGesture(ShortcutTypes type=ActiveShortcut) const
Definition: kaction.cpp:332
void exportGlobalShortcuts(KConfigGroup *config, bool writeDefaults=false) const
Export the current configurable global key associations to config.
Definition: kactioncollection.cpp:444
Qt::ItemFlags flags() const
virtual int exec()
QString toString(SequenceFormat format) const
char * toString(const T &value)
Definition: kgesture.h:37
QTextTableCell cellAt(int row, int column) const
const QList< QAction * > actions() const
Returns the actions belonging to this category.
Definition: kactioncategory.cpp:57
void insertRows(int index, int rows)
bool isEmpty() const
Returns whether the action collection is empty or not.
Definition: kactioncollection.cpp:152
void setText(int column, const QString &text)
void setCellPadding(qreal padding)
const KComponentData & mainComponent()
int column() const
bool isShortcutConfigurable() const
Returns true if this action's shortcut is configurable.
Definition: kaction.cpp:173
int type() const
void print(QPrinter *printer) const
QKeySequence primary() const
Returns the primary key sequence of this shortcut.
Definition: kshortcut.cpp:134
void setBorderStyle(BorderStyle style)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int childCount() const
QChar * data()
QString toString() const
QString text(int column) const
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
Display a "warning" dialog.
Definition: kmessagebox.cpp:644
KShortcutsEditor(KActionCollection *collection, QWidget *parent, ActionTypes actionTypes=AllActions, LetterShortcuts allowLetterShortcuts=LetterShortcutsAllowed)
Constructor.
Definition: kshortcutseditor.cpp:56
QString shapeName() const
Return the user-visible name for this gesture's shape, like "triangle" or "line". ...
Definition: kgesture.cpp:152
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.