|
Krita Source Code Documentation
|
#include <KisShortcutsEditor_p.h>
Inheritance diagram for KisShortcutsEditorItem:Public Member Functions | |
| void | commit () |
| Commit the changes. | |
| QVariant | data (int column, int role=Qt::DisplayRole) const override |
| bool | isModified () const |
| bool | isModified (uint column) const |
| QKeySequence | keySequence (uint column) const |
| KisShortcutsEditorItem (QTreeWidgetItem *parent, QAction *action) | |
| bool | operator< (const QTreeWidgetItem &other) const override |
| void | setKeySequence (uint column, const QKeySequence &seq) |
| void | setNameBold (bool flag) |
| void | undo () |
| Undo the changes since the last commit. | |
| ~KisShortcutsEditorItem () override | |
| Destructor will erase unsaved changes. | |
Private Member Functions | |
| void | updateModified () |
| Recheck modified status - could have changed back to initial value. | |
Private Attributes | |
| QAction * | m_action |
| The action this item is responsible for. | |
| QString | m_actionNameInTable |
| The localized action name. | |
| QCollator | m_collator |
| The collator, for sorting. | |
| QString | m_id |
| The action id. Needed for exporting and importing. | |
| bool | m_isNameBold {false} |
| Should the Name column be painted in bold? | |
| QList< QKeySequence > * | m_oldLocalShortcut {0} |
| The original shortcuts before user changes. 0 means no change. | |
Friends | |
| class | KisShortcutsEditorPrivate |
A QTreeWidgetItem that can handle QActions. It also provides undo functionality.
Call commit() to save pending changes.
Definition at line 118 of file KisShortcutsEditor_p.h.
| KisShortcutsEditorItem::KisShortcutsEditorItem | ( | QTreeWidgetItem * | parent, |
| QAction * | action ) |
Definition at line 21 of file KisShortcutsEditorItem.cpp.
References m_action, m_actionNameInTable, m_collator, m_id, and warnKrita.
|
override |
Destructor will erase unsaved changes.
Definition at line 40 of file KisShortcutsEditorItem.cpp.
References m_oldLocalShortcut.
| void KisShortcutsEditorItem::commit | ( | ) |
Commit the changes.
Definition at line 226 of file KisShortcutsEditorItem.cpp.
References data(), dbgUI, m_oldLocalShortcut, and Name.
|
override |
Definition at line 50 of file KisShortcutsEditorItem.cpp.
References alternateSequence(), DefaultShortcutRole, Id, keySequence(), LocalAlternate, LocalPrimary, m_action, m_actionNameInTable, m_id, m_isNameBold, Name, ObjectRole, primarySequence(), and ShortcutRole.
| bool KisShortcutsEditorItem::isModified | ( | ) | const |
Definition at line 45 of file KisShortcutsEditorItem.cpp.
References m_oldLocalShortcut.
| bool KisShortcutsEditorItem::isModified | ( | uint | column | ) | const |
Definition at line 194 of file KisShortcutsEditorItem.cpp.
References alternateSequence(), LocalAlternate, LocalPrimary, m_action, m_oldLocalShortcut, Name, and primarySequence().
| QKeySequence KisShortcutsEditorItem::keySequence | ( | uint | column | ) | const |
Definition at line 140 of file KisShortcutsEditorItem.cpp.
References alternateSequence(), LocalAlternate, LocalPrimary, m_action, and primarySequence().
|
override |
Definition at line 134 of file KisShortcutsEditorItem.cpp.
References m_collator.
Definition at line 154 of file KisShortcutsEditorItem.cpp.
References LocalAlternate, m_action, m_oldLocalShortcut, and updateModified().
|
inline |
Definition at line 142 of file KisShortcutsEditor_p.h.
References m_isNameBold.
| void KisShortcutsEditorItem::undo | ( | ) |
Undo the changes since the last commit.
Definition at line 214 of file KisShortcutsEditorItem.cpp.
References m_action, m_oldLocalShortcut, and updateModified().
|
private |
Recheck modified status - could have changed back to initial value.
Definition at line 186 of file KisShortcutsEditorItem.cpp.
References m_action, and m_oldLocalShortcut.
|
friend |
Definition at line 148 of file KisShortcutsEditor_p.h.
|
private |
The action this item is responsible for.
Definition at line 154 of file KisShortcutsEditor_p.h.
|
private |
The localized action name.
Definition at line 165 of file KisShortcutsEditor_p.h.
|
private |
The collator, for sorting.
Definition at line 171 of file KisShortcutsEditor_p.h.
|
private |
The action id. Needed for exporting and importing.
Definition at line 168 of file KisShortcutsEditor_p.h.
|
private |
Should the Name column be painted in bold?
Definition at line 157 of file KisShortcutsEditor_p.h.
|
private |
The original shortcuts before user changes. 0 means no change.
Definition at line 161 of file KisShortcutsEditor_p.h.