QGIS API Documentation
3.4.15-Madeira (e83d02e274)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
gui
qgstablewidgetitem.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgstablewidgetitem.cpp - 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
#include "
qgstablewidgetitem.h
"
17
18
QgsTableWidgetItem::QgsTableWidgetItem
(
const
QString &text )
19
: QTableWidgetItem( text )
20
{
21
}
22
23
void
QgsTableWidgetItem::setSortRole
(
int
role )
24
{
25
mSortRole = role;
26
}
27
28
int
QgsTableWidgetItem::sortRole
()
const
29
{
30
return
mSortRole;
31
}
32
33
bool
QgsTableWidgetItem::operator<
(
const
QTableWidgetItem &other )
const
34
{
35
return
data( mSortRole ) < other.data( mSortRole );
36
}
QgsTableWidgetItem::QgsTableWidgetItem
QgsTableWidgetItem()=default
Constructor for QgsTableWidgetItem.
QgsTableWidgetItem::sortRole
int sortRole() const
Gets the role by which the items should be sorted.
Definition:
qgstablewidgetitem.cpp:28
QgsTableWidgetItem::setSortRole
void setSortRole(int role)
Set the role by which the items should be sorted.
Definition:
qgstablewidgetitem.cpp:23
QgsTableWidgetItem::operator<
bool operator<(const QTableWidgetItem &other) const override
Definition:
qgstablewidgetitem.cpp:33
qgstablewidgetitem.h
Generated on Sun Jan 19 2020 15:27:13 for QGIS API Documentation by
1.8.11