QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
This can be used like a regular QTableWidgetItem with the difference that a specific role can be set to sort. More...
#include <qgstablewidgetitem.h>
Public Member Functions | |
QgsTableWidgetItem () | |
QgsTableWidgetItem (const QString &text) | |
Creates a new table widget item with the specified text. More... | |
bool | operator< (const QTableWidgetItem &other) const override |
void | setSortRole (int role) |
Set the role by which the items should be sorted. More... | |
int | sortRole () const |
Get the role by which the items should be sorted. More... | |
Public Member Functions inherited from QTableWidgetItem | |
QTableWidgetItem (int type) | |
QTableWidgetItem (const QString &text, int type) | |
QTableWidgetItem (const QTableWidgetItem &other) | |
QTableWidgetItem (const QIcon &icon, const QString &text, int type) | |
virtual | ~QTableWidgetItem () |
QBrush | background () const |
QColor | backgroundColor () const |
Qt::CheckState | checkState () const |
virtual QTableWidgetItem * | clone () const |
int | column () const |
virtual QVariant | data (int role) const |
Qt::ItemFlags | flags () const |
QFont | font () const |
QBrush | foreground () const |
QIcon | icon () const |
bool | isSelected () const |
QTableWidgetItem & | operator= (const QTableWidgetItem &other) |
virtual void | read (QDataStream &in) |
int | row () const |
void | setBackground (const QBrush &brush) |
void | setBackgroundColor (const QColor &color) |
void | setCheckState (Qt::CheckState state) |
virtual void | setData (int role, const QVariant &value) |
void | setFlags (QFlags< Qt::ItemFlag > flags) |
void | setFont (const QFont &font) |
void | setForeground (const QBrush &brush) |
void | setIcon (const QIcon &icon) |
void | setSelected (bool select) |
void | setSizeHint (const QSize &size) |
void | setStatusTip (const QString &statusTip) |
void | setText (const QString &text) |
void | setTextAlignment (int alignment) |
void | setTextColor (const QColor &color) |
void | setToolTip (const QString &toolTip) |
void | setWhatsThis (const QString &whatsThis) |
QSize | sizeHint () const |
QString | statusTip () const |
QTableWidget * | tableWidget () const |
QString | text () const |
int | textAlignment () const |
QColor | textColor () const |
QString | toolTip () const |
int | type () const |
QString | whatsThis () const |
virtual void | write (QDataStream &out) const |
This can be used like a regular QTableWidgetItem with the difference that a specific role can be set to sort.
Definition at line 25 of file qgstablewidgetitem.h.
QgsTableWidgetItem::QgsTableWidgetItem | ( | ) |
Definition at line 18 of file qgstablewidgetitem.cpp.
QgsTableWidgetItem::QgsTableWidgetItem | ( | const QString & | text | ) |
Creates a new table widget item with the specified text.
Definition at line 24 of file qgstablewidgetitem.cpp.
|
overridevirtual |
Reimplemented from QTableWidgetItem.
Definition at line 40 of file qgstablewidgetitem.cpp.
void QgsTableWidgetItem::setSortRole | ( | int | role | ) |
Set the role by which the items should be sorted.
By default this will be set to Qt::DisplayRole
Definition at line 30 of file qgstablewidgetitem.cpp.
int QgsTableWidgetItem::sortRole | ( | ) | const |
Get the role by which the items should be sorted.
By default this will be Qt::DisplayRole
Definition at line 35 of file qgstablewidgetitem.cpp.