2017-06-08 15:51:05 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/attributetable/qgsfeaturelistviewdelegate.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
class QgsFeatureListViewDelegate : QItemDelegate
|
|
|
|
{
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-08 15:51:05 +02:00
|
|
|
#include "qgsfeaturelistviewdelegate.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-01-14 12:52:30 +10:00
|
|
|
static const int ICON_SIZE;
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
enum Element
|
|
|
|
{
|
|
|
|
EditElement,
|
|
|
|
SelectionElement
|
|
|
|
};
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
explicit QgsFeatureListViewDelegate( QgsFeatureListModel *listModel, QObject *parent = 0 );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setEditSelectionModel( QItemSelectionModel *editSelectionModel );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2016-02-02 19:46:18 +11:00
|
|
|
Element positionToElement( QPoint pos );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setFeatureSelectionModel( QgsFeatureSelectionModel *featureSelectionModel );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2014-05-27 23:22:50 +02:00
|
|
|
void setCurrentFeatureEdited( bool state );
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
signals:
|
2017-05-01 18:13:15 +02:00
|
|
|
void editButtonClicked( QModelIndex &index );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
protected:
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const;
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
};
|
2017-06-08 15:51:05 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/attributetable/qgsfeaturelistviewdelegate.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|