QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
QgsFeatureListViewDelegate Class Reference

#include <qgsfeaturelistviewdelegate.h>

Collaboration diagram for QgsFeatureListViewDelegate:
Collaboration graph
[legend]

Public Types

enum  Element { EditElement, SelectionElement }

Signals

void editButtonClicked (QModelIndex &index)

Public Member Functions

 QgsFeatureListViewDelegate (QgsFeatureListModel *listModel, QObject *parent=0)
void setEditSelectionModel (QItemSelectionModel *editSelectionModel)
Element positionToElement (const QPoint &pos)
void setFeatureSelectionModel (QgsFeatureSelectionModel *featureSelectionModel)

Static Public Attributes

static int const sIconSize = 24

Protected Member Functions

virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const

Private Attributes

QgsFeatureSelectionModelmFeatureSelectionModel
QItemSelectionModel * mEditSelectionModel
QgsFeatureListModelmListModel

Detailed Description

Definition at line 14 of file qgsfeaturelistviewdelegate.h.

Member Enumeration Documentation

Enumerator:
EditElement 
SelectionElement 

Definition at line 21 of file qgsfeaturelistviewdelegate.h.

Constructor & Destructor Documentation

QgsFeatureListViewDelegate::QgsFeatureListViewDelegate ( QgsFeatureListModel listModel,
QObject *  parent = 0 
)
explicit

Definition at line 16 of file qgsfeaturelistviewdelegate.cpp.

Member Function Documentation

void QgsFeatureListViewDelegate::editButtonClicked ( QModelIndex &  index)
signal
void QgsFeatureListViewDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
protectedvirtual
QgsFeatureListViewDelegate::Element QgsFeatureListViewDelegate::positionToElement ( const QPoint &  pos)
void QgsFeatureListViewDelegate::setEditSelectionModel ( QItemSelectionModel *  editSelectionModel)

Definition at line 40 of file qgsfeaturelistviewdelegate.cpp.

References mEditSelectionModel.

Referenced by QgsFeatureListView::setModel().

void QgsFeatureListViewDelegate::setFeatureSelectionModel ( QgsFeatureSelectionModel featureSelectionModel)

Definition at line 35 of file qgsfeaturelistviewdelegate.cpp.

References mFeatureSelectionModel.

Referenced by QgsFeatureListView::setModel().

QSize QgsFeatureListViewDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
protectedvirtual

Definition at line 45 of file qgsfeaturelistviewdelegate.cpp.

References sIconSize.

Member Data Documentation

QItemSelectionModel* QgsFeatureListViewDelegate::mEditSelectionModel
private

Definition at line 44 of file qgsfeaturelistviewdelegate.h.

Referenced by paint(), and setEditSelectionModel().

QgsFeatureSelectionModel* QgsFeatureListViewDelegate::mFeatureSelectionModel
private

Definition at line 43 of file qgsfeaturelistviewdelegate.h.

Referenced by paint(), and setFeatureSelectionModel().

QgsFeatureListModel* QgsFeatureListViewDelegate::mListModel
private

Definition at line 45 of file qgsfeaturelistviewdelegate.h.

Referenced by paint().

int const QgsFeatureListViewDelegate::sIconSize = 24
static

Definition at line 19 of file qgsfeaturelistviewdelegate.h.

Referenced by positionToElement(), and sizeHint().


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