QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
attributetable
qgsattributetabledelegate.h
Go to the documentation of this file.
1
/***************************************************************************
2
QgsAttributeTableDelegate.h
3
--------------------------------------
4
Date : Feb 2009
5
Copyright : (C) 2009 Vita Cizek
6
Email : weetya (at) gmail.com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSATTRIBUTETABLEDELEGATE_H
17
#define QGSATTRIBUTETABLEDELEGATE_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
22
#include <QItemDelegate>
23
24
class
QgsFeatureSelectionModel
;
25
class
QPainter;
26
class
QgsVectorLayer
;
27
class
QgsAttributeTableModel
;
28
class
QToolButton;
29
35
36
class
GUI_EXPORT
QgsAttributeTableDelegate
:
public
QItemDelegate
37
{
38
Q_OBJECT
39
40
static
QgsVectorLayer
*layer(
const
QAbstractItemModel *model );
41
static
const
QgsAttributeTableModel
*masterModel(
const
QAbstractItemModel *model );
42
43
public
:
48
QgsAttributeTableDelegate
( QObject *parent
SIP_TRANSFERTHIS
=
nullptr
)
49
: QItemDelegate( parent )
50
{}
51
56
QWidget *createEditor( QWidget *parent,
const
QStyleOptionViewItem &option,
const
QModelIndex &index )
const override
;
57
61
void
paint( QPainter *painter,
const
QStyleOptionViewItem &option,
const
QModelIndex &index )
const override
;
62
69
void
setModelData( QWidget *editor, QAbstractItemModel *model,
const
QModelIndex &index )
const override
;
70
76
void
setEditorData( QWidget *editor,
const
QModelIndex &index )
const override
;
77
78
void
setFeatureSelectionModel(
QgsFeatureSelectionModel
*featureSelectionModel );
79
80
signals:
81
90
void
actionColumnItemPainted
(
const
QModelIndex &index )
const
;
91
92
private
:
93
QgsFeatureSelectionModel
*mFeatureSelectionModel =
nullptr
;
94
};
95
96
#endif
//QGSATTRIBUTETABLEDELEGATE_H
QgsAttributeTableDelegate::actionColumnItemPainted
void actionColumnItemPainted(const QModelIndex &index) const
Emitted when an action column item is painted.
QgsAttributeTableDelegate::QgsAttributeTableDelegate
QgsAttributeTableDelegate(QObject *parent=nullptr)
Constructor.
Definition
qgsattributetabledelegate.h:48
QgsAttributeTableModel
A model backed by a QgsVectorLayerCache which is able to provide feature/attribute information to a Q...
Definition
qgsattributetablemodel.h:50
QgsFeatureSelectionModel
Item selection model for selecting features.
Definition
qgsfeatureselectionmodel.h:33
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
Generated on
for QGIS API Documentation by
1.17.0