QGIS API Documentation
3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
src
gui
qgstablewidgetitem.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstablewidgetitem.h - QgsTableWidgetItem
3
4
---------------------
5
begin : 27.3.2016
6
copyright : (C) 2016 by Matthias Kuhn, OPENGIS.ch
7
email :
[email protected]
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#ifndef QGSTABLEWIDGETITEM_H
17
#define QGSTABLEWIDGETITEM_H
18
19
#include "qgis_gui.h"
20
21
#include <QTableWidget>
22
28
class
GUI_EXPORT
QgsTableWidgetItem
:
public
QTableWidgetItem
29
{
30
public
:
31
QgsTableWidgetItem
() =
default
;
32
36
QgsTableWidgetItem
(
const
QString &text );
37
38
43
void
setSortRole
(
int
role );
44
49
int
sortRole
()
const
;
50
51
bool
operator<
(
const
QTableWidgetItem &other )
const override
;
52
53
private
:
54
int
mSortRole = Qt::DisplayRole;
55
};
56
57
#endif
// QGSTABLEWIDGETITEM_H
QgsTableWidgetItem::sortRole
int sortRole() const
Gets the role by which the items should be sorted.
Definition
qgstablewidgetitem.cpp:30
QgsTableWidgetItem::setSortRole
void setSortRole(int role)
Set the role by which the items should be sorted.
Definition
qgstablewidgetitem.cpp:25
QgsTableWidgetItem::QgsTableWidgetItem
QgsTableWidgetItem()=default
operator<
bool operator<(const QVariant &v1, const QVariant &v2)
Compares two QVariant values and returns whether the first is less than the second.
Definition
qgis.h:7039
Generated on
for QGIS API Documentation by
1.15.0