QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
QgsAttributeTableDelegate Class Reference

A delegate item class for QgsAttributeTable (see Qt documentation for QItemDelegate). More...

#include <qgsattributetabledelegate.h>

Public Member Functions

 QgsAttributeTableDelegate (QObject *parent=0)
 Constructor.
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.
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Overloads the paint method form the QItemDelegate bas class.
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 Sets data from model into the editor.
void setFeatureSelectionModel (QgsFeatureSelectionModel *featureSelectionModel)
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 Sets data from editor back to model.

Detailed Description

A delegate item class for QgsAttributeTable (see Qt documentation for QItemDelegate).

Definition at line 32 of file qgsattributetabledelegate.h.

Constructor & Destructor Documentation

QgsAttributeTableDelegate::QgsAttributeTableDelegate ( QObject *  parent = 0)
inline

Constructor.

Parameters
parentparent object

Definition at line 43 of file qgsattributetabledelegate.h.

Member Function Documentation

QWidget * QgsAttributeTableDelegate::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.

Definition at line 58 of file qgsattributetabledelegate.cpp.

void QgsAttributeTableDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Overloads the paint method form the QItemDelegate bas class.

Definition at line 122 of file qgsattributetabledelegate.cpp.

void QgsAttributeTableDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override

Sets data from model into the editor.

Overloads default method

Parameters
editoreditor which was created by create editor function in this class
indexindex of field which is to be retrieved

Definition at line 108 of file qgsattributetabledelegate.cpp.

void QgsAttributeTableDelegate::setFeatureSelectionModel ( QgsFeatureSelectionModel featureSelectionModel)

Definition at line 117 of file qgsattributetabledelegate.cpp.

void QgsAttributeTableDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

Sets data from editor back to model.

Overloads default method

Parameters
editoreditor which was created by create editor function in this class
modelmodel where data should be updated
indexindex of field which is to be modified

Definition at line 83 of file qgsattributetabledelegate.cpp.


The documentation for this class was generated from the following files: