kshortcutseditor.cpp
59 KShortcutsEditor::KShortcutsEditor(KActionCollection *collection, QWidget *parent, ActionTypes actionType,
68 KShortcutsEditor::KShortcutsEditor(QWidget *parent, ActionTypes actionType, LetterShortcuts allowLetterShortcuts)
126 hier[KShortcutsEditorPrivate::Program] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Root], displayTitle);
135 hier[KShortcutsEditorPrivate::Action] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Program], category->text());
290 void KShortcutsEditorPrivate::initGUI(KShortcutsEditor::ActionTypes types, KShortcutsEditor::LetterShortcuts allowLetterShortcuts)
362 bool KShortcutsEditorPrivate::addAction(QAction *action, QTreeWidgetItem *hier[], hierarchyLevel level)
394 QList<QKeySequence> defaultShortcuts = act->property("defaultShortcuts").value<QList<QKeySequence> >();
397 QKeySequence alternate = defaultShortcuts.size() <= 1 ? QKeySequence() : defaultShortcuts.at(1);
423 QTreeWidgetItem *KShortcutsEditorPrivate::findOrMakeItem(QTreeWidgetItem *parent, const QString &name)
439 void KShortcutsEditorPrivate::capturedShortcut(const QVariant &newShortcut, const QModelIndex &index)
454 void KShortcutsEditorPrivate::changeKeyShortcut(KShortcutsEditorItem *item, uint column, const QKeySequence &capture)
505 QList<QKeySequence> sc = QKeySequence::listFromString(globalShortcutsGroup.readEntry(actionId, QString()));
523 QList<QKeySequence> sc = QKeySequence::listFromString(localShortcutsGroup.readEntry(actionId, QString()));
636 shortcutTable->cellAt(shortcutTable->rows() - 1, 0).firstCursorPosition().insertText(shortcutTitleToColumn.first);
QLayout * layout() const
text
void undoChanges()
Undo all change made since the last commit().
Definition: kshortcutseditor.cpp:246
void importConfiguration(KConfigBase *config)
Import the settings from configuration config.
Definition: kshortcutseditor.cpp:176
QTextCursor firstCursorPosition() const
void setContentsMargins(int left, int top, int right, int bottom)
int rows() const
QCursor cursor() const
void setProperty(int propertyId, const QVariant &value)
QList< QKeySequence > listFromString(const QString &str, SequenceFormat format)
void insertHtml(const QString &html)
QTreeWidgetItem * child(int index) const
void showSection(int logicalIndex)
const T & at(int i) const
QList< QKeySequence > shortcuts() const
T value() const
void setCellSpacing(qreal spacing)
void setFormat(const QTextCharFormat &format)
ActionTypes actionTypes() const
iterator insert(const T &value)
void setHeaderRowCount(int count)
bool movePosition(MoveOperation operation, MoveMode mode, int n)
int size() const
void printShortcuts() const
Opens a printing dialog to print all the shortcuts.
Definition: kshortcutseditor.cpp:266
void hiddenChanged(QTreeWidgetItem *, bool)
QList< T > findChildren(const QString &name, QFlags< Qt::FindChildOption > options) const
void setFlags(Qt::ItemFlags flags)
bool isValid() const
void insertBlock()
void clearCollections()
Removes all action collections from the editor.
Definition: kshortcutseditor.cpp:94
QVariant property(const char *name) const
void setBorder(qreal width)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
bool exists() const
void setUpdatesEnabled(bool enable)
void endEditBlock()
void insertText(const QString &text)
bool isEmpty() const
objectName
bool isEmpty() const
QList< QAction * > actions() const
Returns the list of QActions which belong to this action collection.
Definition: kactioncollection.cpp:219
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
Actions which are triggered by any keypress in the windowing system.
Definition: kshortcutseditor.h:75
void setFormat(const QTextTableFormat &format)
Widget for configuration of KAccel and KGlobalAccel.
Definition: kshortcutseditor.h:61
whatsThis
void setDefaultFont(const QFont &font)
void setBottomMargin(qreal margin)
void hideSection(int logicalIndex)
void beginEditBlock()
void allDefault()
Set all shortcuts to their default values (bindings).
Definition: kshortcutseditor.cpp:261
bool contains(const T &value) const
bool hasKey(const QString &key) const
void setTopMargin(qreal margin)
QTextCharFormat format() const
Letter shortcuts are allowed.
Definition: kshortcutseditor.h:88
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 i18n(const char *text, const TYPE &arg...)
QString componentDisplayName() const
The display name for the associated component.
Definition: kactioncollection.cpp:203
static KGlobalAccel * self()
QFont systemFont(SystemFont type)
void writeConfiguration(KConfigGroup *config=nullptr) const
Write the current settings to the config object.
Definition: kshortcutseditor.cpp:211
Qt::ItemFlags flags() const
virtual int exec()
QString toString(SequenceFormat format) const
QTextTableCell cellAt(int row, int column) const
void insertRows(int index, int rows)
bool isEmpty() const
Returns whether the action collection is empty or not.
Definition: kactioncollection.cpp:169
void setText(int column, const QString &text)
void setCellPadding(qreal padding)
int column() const
bool toBool() const
bool isValid() const
int type() const
void print(QPagedPaintDevice *printer) const
QList< QKeySequence > defaultShortcut(const QAction *action) const
void setBorderStyle(BorderStyle style)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setActionTypes(ActionTypes actionTypes)
Sets the types of actions to display in this widget.
Definition: kshortcutseditor.cpp:276
QObject * parent() const
int childCount() const
QChar * data()
QString toString() const
T readEntry(const QString &key, const T &aDefault) const
QString text(int column) const
QString applicationDisplayName()
void exportConfiguration(KConfigBase *config) const
Export the current setting to configuration config.
Definition: kshortcutseditor.cpp:188
QTextBlockFormat blockFormat() const
KShortcutsEditor(KActionCollection *collection, QWidget *parent, ActionTypes actionTypes=AllActions, LetterShortcuts allowLetterShortcuts=LetterShortcutsAllowed)
Constructor.
Definition: kshortcutseditor.cpp:59
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 13 2019 02:12:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 13 2019 02:12:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.