QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsTableWidgetItem Class Reference

This can be used like a regular QTableWidgetItem with the difference that a specific role can be set to sort. More...

#include <qgstablewidgetitem.h>

Inheritance diagram for QgsTableWidgetItem:
Inheritance graph
[legend]

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 QTableWidgetItemclone () 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
 
QTableWidgetItemoperator= (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
 
QTableWidgettableWidget () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsTableWidgetItem() [1/2]

QgsTableWidgetItem::QgsTableWidgetItem ( )

Definition at line 18 of file qgstablewidgetitem.cpp.

◆ QgsTableWidgetItem() [2/2]

QgsTableWidgetItem::QgsTableWidgetItem ( const QString text)

Creates a new table widget item with the specified text.

Definition at line 24 of file qgstablewidgetitem.cpp.

Member Function Documentation

◆ operator<()

bool QgsTableWidgetItem::operator< ( const QTableWidgetItem other) const
overridevirtual

Reimplemented from QTableWidgetItem.

Definition at line 40 of file qgstablewidgetitem.cpp.

◆ setSortRole()

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.

◆ sortRole()

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.


The documentation for this class was generated from the following files: