QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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>

Inheritance diagram for QgsFeatureListViewDelegate:
Inheritance graph
[legend]
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)
 
void setCurrentFeatureEdited (bool state)
 

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
 
bool mCurrentFeatureEdited
 Set to true if the current edit selection has been edited. More...
 

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::setCurrentFeatureEdited ( bool  state)
void QgsFeatureListViewDelegate::setEditSelectionModel ( QItemSelectionModel *  editSelectionModel)

Definition at line 46 of file qgsfeaturelistviewdelegate.cpp.

References mEditSelectionModel.

Referenced by QgsFeatureListView::setModel().

void QgsFeatureListViewDelegate::setFeatureSelectionModel ( QgsFeatureSelectionModel featureSelectionModel)

Definition at line 36 of file qgsfeaturelistviewdelegate.cpp.

References mFeatureSelectionModel.

Referenced by QgsFeatureListView::setModel().

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

Definition at line 51 of file qgsfeaturelistviewdelegate.cpp.

References sIconSize.

Member Data Documentation

bool QgsFeatureListViewDelegate::mCurrentFeatureEdited
private

Set to true if the current edit selection has been edited.

Definition at line 49 of file qgsfeaturelistviewdelegate.h.

Referenced by paint(), and setCurrentFeatureEdited().

QItemSelectionModel* QgsFeatureListViewDelegate::mEditSelectionModel
private

Definition at line 46 of file qgsfeaturelistviewdelegate.h.

Referenced by paint(), and setEditSelectionModel().

QgsFeatureSelectionModel* QgsFeatureListViewDelegate::mFeatureSelectionModel
private

Definition at line 45 of file qgsfeaturelistviewdelegate.h.

Referenced by paint(), and setFeatureSelectionModel().

QgsFeatureListModel* QgsFeatureListViewDelegate::mListModel
private

Definition at line 47 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: