A delegate providing editors for the type property of KisShortcutConfiguration.
More...
#include <kis_input_type_delegate.h>
A delegate providing editors for the type property of KisShortcutConfiguration.
Definition at line 16 of file kis_input_type_delegate.h.
◆ KisInputTypeDelegate()
| KisInputTypeDelegate::KisInputTypeDelegate |
( |
QObject * | parent = 0 | ) |
|
|
explicit |
◆ ~KisInputTypeDelegate()
| KisInputTypeDelegate::~KisInputTypeDelegate |
( |
| ) |
|
|
override |
◆ createEditor()
| QWidget * KisInputTypeDelegate::createEditor |
( |
QWidget * | parent, |
|
|
const QStyleOptionViewItem & | , |
|
|
const QModelIndex & | ) const |
|
override |
◆ setEditorData()
| void KisInputTypeDelegate::setEditorData |
( |
QWidget * | editor, |
|
|
const QModelIndex & | index ) const |
|
override |
Definition at line 46 of file kis_input_type_delegate.cpp.
47{
48 KComboBox *
combo = qobject_cast<KComboBox *>(editor);
49 Q_ASSERT(combo);
50
51 combo->setCurrentIndex(index.data(Qt::EditRole).toUInt() - 1);
52}
◆ setModelData()
| void KisInputTypeDelegate::setModelData |
( |
QWidget * | editor, |
|
|
QAbstractItemModel * | model, |
|
|
const QModelIndex & | index ) const |
|
override |
Definition at line 54 of file kis_input_type_delegate.cpp.
55{
56 KComboBox *
combo = qobject_cast<KComboBox *>(editor);
57 Q_ASSERT(combo);
58 model->setData(index,
combo->currentIndex() + 1, Qt::EditRole);
59}
◆ updateEditorGeometry()
| void KisInputTypeDelegate::updateEditorGeometry |
( |
QWidget * | editor, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | ) const |
|
override |
| Private* const KisInputTypeDelegate::d |
|
private |
The documentation for this class was generated from the following files: