QGIS API Documentation  2.99.0-Master (37c43df)
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...
 

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...
 

Detailed Description

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

Definition at line 36 of file qgsexpressionbuilderwidget.h.

Member Enumeration Documentation

§ ItemType

Enumerator
Header 
Field 
ExpressionNode 

Definition at line 39 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 46 of file qgsexpressionbuilderwidget.h.

§ QgsExpressionItem() [2/2]

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

Definition at line 58 of file qgsexpressionbuilderwidget.h.

Member Function Documentation

§ getExpressionText()

QString QgsExpressionItem::getExpressionText ( ) const
inline

Definition at line 68 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 74 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 86 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 80 of file qgsexpressionbuilderwidget.h.

Member Data Documentation

§ CustomSortRole

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

Custom sort order role.

Definition at line 89 of file qgsexpressionbuilderwidget.h.

§ ItemTypeRole

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

Item type role.

Definition at line 91 of file qgsexpressionbuilderwidget.h.


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