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

An expression item that can be used in the QgsExpressionBuilderWidget tree. More...

#include <qgsexpressionbuilderwidget.h>

Inheritance diagram for QgsExpressionItem:
Inheritance graph
[legend]

Public Types

enum  ItemType { Header, Field, ExpressionNode }
 

Public Member Functions

 QgsExpressionItem (const QString &label, const QString &expressionText, const QString &helpText, QgsExpressionItem::ItemType itemType=ExpressionNode)
 
 QgsExpressionItem (const QString &label, const QString &expressionText, QgsExpressionItem::ItemType itemType=ExpressionNode)
 
QString getExpressionText () const
 
QString getHelpText () const
 Get the help text that is associated with this expression item. More...
 
QgsExpressionItem::ItemType getItemType () const
 Get the type of expression item eg header, field, ExpressionNode. More...
 
void setHelpText (const QString &helpText)
 Set the help text for the current item. More...
 
- Public Member Functions inherited from QStandardItem
 QStandardItem ()
 
 QStandardItem (const QString &text)
 
 QStandardItem (int rows, int columns)
 
 QStandardItem (const QIcon &icon, const QString &text)
 
virtual ~QStandardItem ()
 
QString accessibleDescription () const
 
QString accessibleText () const
 
void appendColumn (const QList< QStandardItem * > &items)
 
void appendRow (const QList< QStandardItem * > &items)
 
void appendRow (QStandardItem *item)
 
void appendRows (const QList< QStandardItem * > &items)
 
QBrush background () const
 
Qt::CheckState checkState () const
 
QStandardItemchild (int row, int column) const
 
virtual QStandardItemclone () const
 
int column () const
 
int columnCount () const
 
virtual QVariant data (int role) const
 
Qt::ItemFlags flags () const
 
QFont font () const
 
QBrush foreground () const
 
bool hasChildren () const
 
QIcon icon () const
 
QModelIndex index () const
 
void insertColumn (int column, const QList< QStandardItem * > &items)
 
void insertColumns (int column, int count)
 
void insertRow (int row, QStandardItem *item)
 
void insertRow (int row, const QList< QStandardItem * > &items)
 
void insertRows (int row, const QList< QStandardItem * > &items)
 
void insertRows (int row, int count)
 
bool isCheckable () const
 
bool isDragEnabled () const
 
bool isDropEnabled () const
 
bool isEditable () const
 
bool isEnabled () const
 
bool isSelectable () const
 
bool isTristate () const
 
QStandardItemModelmodel () const
 
virtual bool operator< (const QStandardItem &other) const
 
QStandardItemparent () const
 
virtual void read (QDataStream &in)
 
void removeColumn (int column)
 
void removeColumns (int column, int count)
 
void removeRow (int row)
 
void removeRows (int row, int count)
 
int row () const
 
int rowCount () const
 
void setAccessibleDescription (const QString &accessibleDescription)
 
void setAccessibleText (const QString &accessibleText)
 
void setBackground (const QBrush &brush)
 
void setCheckable (bool checkable)
 
void setCheckState (Qt::CheckState state)
 
void setChild (int row, int column, QStandardItem *item)
 
void setChild (int row, QStandardItem *item)
 
void setColumnCount (int columns)
 
virtual void setData (const QVariant &value, int role)
 
void setDragEnabled (bool dragEnabled)
 
void setDropEnabled (bool dropEnabled)
 
void setEditable (bool editable)
 
void setEnabled (bool enabled)
 
void setFlags (QFlags< Qt::ItemFlag > flags)
 
void setFont (const QFont &font)
 
void setForeground (const QBrush &brush)
 
void setIcon (const QIcon &icon)
 
void setRowCount (int rows)
 
void setSelectable (bool selectable)
 
void setSizeHint (const QSize &size)
 
void setStatusTip (const QString &statusTip)
 
void setText (const QString &text)
 
void setTextAlignment (QFlags< Qt::AlignmentFlag > alignment)
 
void setToolTip (const QString &toolTip)
 
void setTristate (bool tristate)
 
void setWhatsThis (const QString &whatsThis)
 
QSize sizeHint () const
 
void sortChildren (int column, Qt::SortOrder order)
 
QString statusTip () const
 
QStandardItemtakeChild (int row, int column)
 
QList< QStandardItem * > takeColumn (int column)
 
QList< QStandardItem * > takeRow (int row)
 
QString text () const
 
Qt::Alignment textAlignment () const
 
QString toolTip () const
 
virtual int type () const
 
QString whatsThis () const
 
virtual void write (QDataStream &out) const
 

Static Public Attributes

static const int CustomSortRole = Qt::UserRole + 1
 Custom sort order role. More...
 
static const int ItemTypeRole = Qt::UserRole + 2
 Item type role. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QStandardItem
 QStandardItem (const QStandardItem &other)
 
void emitDataChanged ()
 
QStandardItemoperator= (const QStandardItem &other)
 

Detailed Description

An expression item that can be used in the QgsExpressionBuilderWidget tree.

Definition at line 33 of file qgsexpressionbuilderwidget.h.

Member Enumeration Documentation

◆ ItemType

Enumerator
Header 
Field 
ExpressionNode 

Definition at line 36 of file qgsexpressionbuilderwidget.h.

Constructor & Destructor Documentation

◆ QgsExpressionItem() [1/2]

QgsExpressionItem::QgsExpressionItem ( const QString label,
const QString expressionText,
const QString helpText,
QgsExpressionItem::ItemType  itemType = ExpressionNode 
)
inline

Definition at line 43 of file qgsexpressionbuilderwidget.h.

◆ QgsExpressionItem() [2/2]

QgsExpressionItem::QgsExpressionItem ( const QString label,
const QString expressionText,
QgsExpressionItem::ItemType  itemType = ExpressionNode 
)
inline

Definition at line 55 of file qgsexpressionbuilderwidget.h.

Member Function Documentation

◆ getExpressionText()

QString QgsExpressionItem::getExpressionText ( ) const
inline

Definition at line 65 of file qgsexpressionbuilderwidget.h.

◆ getHelpText()

QString QgsExpressionItem::getHelpText ( ) const
inline

Get the help text that is associated with this expression item.

Returns
The help text.

Definition at line 71 of file qgsexpressionbuilderwidget.h.

◆ getItemType()

QgsExpressionItem::ItemType QgsExpressionItem::getItemType ( ) const
inline

Get the type of expression item eg header, field, ExpressionNode.

Returns
The QgsExpressionItem::ItemType

Definition at line 82 of file qgsexpressionbuilderwidget.h.

◆ setHelpText()

void QgsExpressionItem::setHelpText ( const QString helpText)
inline

Set the help text for the current item.

Note
The help text can be set as a html string.

Definition at line 76 of file qgsexpressionbuilderwidget.h.

Member Data Documentation

◆ CustomSortRole

const int QgsExpressionItem::CustomSortRole = Qt::UserRole + 1
static

Custom sort order role.

Definition at line 85 of file qgsexpressionbuilderwidget.h.

◆ ItemTypeRole

const int QgsExpressionItem::ItemTypeRole = Qt::UserRole + 2
static

Item type role.

Definition at line 87 of file qgsexpressionbuilderwidget.h.


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