QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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 <qgsexpressiontreeview.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
 Gets the help text that is associated with this expression item.
 
QgsExpressionItem::ItemType getItemType () const
 Gets the type of expression item, e.g., header, field, ExpressionNode.
 
void setHelpText (const QString &helpText)
 Set the help text for the current item.
 

Static Public Attributes

static const int CUSTOM_SORT_ROLE = Qt::UserRole + 1
 Custom sort order role.
 
static const int ITEM_NAME_ROLE = Qt::UserRole + 4
 Item name role.
 
static const int ITEM_TYPE_ROLE = Qt::UserRole + 2
 Item type role.
 
static const int LAYER_ID_ROLE = Qt::UserRole + 5
 Layer ID role.
 
static const int SEARCH_TAGS_ROLE = Qt::UserRole + 3
 Search tags role.
 

Detailed Description

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

Definition at line 38 of file qgsexpressiontreeview.h.

Member Enumeration Documentation

◆ ItemType

Enumerator
Header 
Field 
ExpressionNode 

Definition at line 41 of file qgsexpressiontreeview.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 48 of file qgsexpressiontreeview.h.

◆ QgsExpressionItem() [2/2]

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

Definition at line 60 of file qgsexpressiontreeview.h.

Member Function Documentation

◆ getExpressionText()

QString QgsExpressionItem::getExpressionText ( ) const
inline

Definition at line 70 of file qgsexpressiontreeview.h.

◆ getHelpText()

QString QgsExpressionItem::getHelpText ( ) const
inline

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

Returns
The help text.

Definition at line 77 of file qgsexpressiontreeview.h.

◆ getItemType()

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

Gets the type of expression item, e.g., header, field, ExpressionNode.

Returns
The QgsExpressionItem::ItemType

Definition at line 91 of file qgsexpressiontreeview.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 84 of file qgsexpressiontreeview.h.

Member Data Documentation

◆ CUSTOM_SORT_ROLE

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

Custom sort order role.

Definition at line 94 of file qgsexpressiontreeview.h.

◆ ITEM_NAME_ROLE

const int QgsExpressionItem::ITEM_NAME_ROLE = Qt::UserRole + 4
static

Item name role.

Definition at line 100 of file qgsexpressiontreeview.h.

◆ ITEM_TYPE_ROLE

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

Item type role.

Definition at line 96 of file qgsexpressiontreeview.h.

◆ LAYER_ID_ROLE

const int QgsExpressionItem::LAYER_ID_ROLE = Qt::UserRole + 5
static

Layer ID role.

Since
QGIS 3.24

Definition at line 102 of file qgsexpressiontreeview.h.

◆ SEARCH_TAGS_ROLE

const int QgsExpressionItem::SEARCH_TAGS_ROLE = Qt::UserRole + 3
static

Search tags role.

Definition at line 98 of file qgsexpressiontreeview.h.


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