A delegate item class for QgsAttributeTable (see Qt documentation for QItemDelegate).
More...
#include <qgsattributetabledelegate.h>
|
| QgsAttributeTableDelegate (QObject *parent=nullptr) |
| Constructor. More...
|
|
QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| Used to create an editor for when the user tries to change the contents of a cell. More...
|
|
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| Overloads the paint method form the QItemDelegate base class. More...
|
|
void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| Sets data from model into the editor. More...
|
|
void | setFeatureSelectionModel (QgsFeatureSelectionModel *featureSelectionModel) |
|
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| Sets data from editor back to model. More...
|
|
A delegate item class for QgsAttributeTable (see Qt documentation for QItemDelegate).
Definition at line 35 of file qgsattributetabledelegate.h.
◆ QgsAttributeTableDelegate()
QgsAttributeTableDelegate::QgsAttributeTableDelegate |
( |
QObject * |
parent = nullptr | ) |
|
|
inline |
◆ actionColumnItemPainted
void QgsAttributeTableDelegate::actionColumnItemPainted |
( |
const QModelIndex & |
index | ) |
const |
|
signal |
Emitted when an action column item is painted.
The consumer of this signal can initialize the index widget.
- Note
- This signal is emitted repeatedly whenever the item is being painted. It is the consumers responsibility to check if initialization has already happened before.
◆ createEditor()
QWidget * QgsAttributeTableDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ paint()
void QgsAttributeTableDelegate::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ setEditorData()
void QgsAttributeTableDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Sets data from model into the editor.
Overloads default method
- Parameters
-
editor | editor which was created by create editor function in this class |
index | index of field which is to be retrieved |
Definition at line 143 of file qgsattributetabledelegate.cpp.
◆ setFeatureSelectionModel()
◆ setModelData()
void QgsAttributeTableDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Sets data from editor back to model.
Overloads default method
- Parameters
-
editor | editor which was created by create editor function in this class |
model | model where data should be updated |
index | index of field which is to be modified |
Definition at line 101 of file qgsattributetabledelegate.cpp.
The documentation for this class was generated from the following files: