QGIS API Documentation  2.99.0-Master (c42dad3)
Public Slots | Public Member Functions | Protected Member Functions | List of all members
QgsExpressionSelectionDialog Class Reference

This class offers a dialog to change feature selections. More...

#include <qgsexpressionselectiondialog.h>

Inheritance diagram for QgsExpressionSelectionDialog:
Inheritance graph
[legend]

Public Slots

void on_mActionAddToSelection_triggered ()
 
void on_mActionRemoveFromSelection_triggered ()
 
void on_mActionSelect_triggered ()
 
void on_mActionSelectIntersect_triggered ()
 
void on_mPbnClose_clicked ()
 

Public Member Functions

 QgsExpressionSelectionDialog (QgsVectorLayer *layer, const QString &startText=QString(), QWidget *parent=nullptr)
 Creates a new selection dialog. More...
 
QgsExpressionBuilderWidgetexpressionBuilder ()
 The builder widget that is used by the dialog. More...
 
QString expressionText ()
 Returns the current expression text. More...
 
void setExpressionText (const QString &text)
 Sets the current expression text. More...
 
void setGeomCalculator (const QgsDistanceArea &da)
 Sets geometry calculator used in distance/area calculations. More...
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *closeEvent) override
 Implementation for closeEvent Saves the window geometry. More...
 
virtual void done (int r) override
 Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets saved and the object deleted. More...
 

Detailed Description

This class offers a dialog to change feature selections.

To do so, a QgsExpressionBuilderWidget is shown in a dialog. It offers the possibilities to create a new selection, add to the current selection remove from the current selection or select within the current selection.

Definition at line 28 of file qgsexpressionselectiondialog.h.

Constructor & Destructor Documentation

§ QgsExpressionSelectionDialog()

QgsExpressionSelectionDialog::QgsExpressionSelectionDialog ( QgsVectorLayer layer,
const QString &  startText = QString(),
QWidget *  parent = nullptr 
)

Creates a new selection dialog.

Parameters
layerThe layer on which the selection is to be performed.
startTextA default expression text to be applied (Defaults to empty)
parentparent object (owner)

Definition at line 23 of file qgsexpressionselectiondialog.cpp.

Member Function Documentation

§ closeEvent()

void QgsExpressionSelectionDialog::closeEvent ( QCloseEvent *  closeEvent)
overrideprotectedvirtual

Implementation for closeEvent Saves the window geometry.

Parameters
closeEventEvent object. Unused.

Definition at line 106 of file qgsexpressionselectiondialog.cpp.

§ done()

void QgsExpressionSelectionDialog::done ( int  r)
overrideprotectedvirtual

Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets saved and the object deleted.

Parameters
rResult value. Unused.

Definition at line 119 of file qgsexpressionselectiondialog.cpp.

§ expressionBuilder()

QgsExpressionBuilderWidget * QgsExpressionSelectionDialog::expressionBuilder ( )

The builder widget that is used by the dialog.

Returns
The builder widget that is used by the dialog

Definition at line 57 of file qgsexpressionselectiondialog.cpp.

§ expressionText()

QString QgsExpressionSelectionDialog::expressionText ( )

Returns the current expression text.

Returns
The expression text

Definition at line 67 of file qgsexpressionselectiondialog.cpp.

§ on_mActionAddToSelection_triggered

void QgsExpressionSelectionDialog::on_mActionAddToSelection_triggered ( )
slot

Definition at line 85 of file qgsexpressionselectiondialog.cpp.

§ on_mActionRemoveFromSelection_triggered

void QgsExpressionSelectionDialog::on_mActionRemoveFromSelection_triggered ( )
slot

Definition at line 99 of file qgsexpressionselectiondialog.cpp.

§ on_mActionSelect_triggered

void QgsExpressionSelectionDialog::on_mActionSelect_triggered ( )
slot

Definition at line 78 of file qgsexpressionselectiondialog.cpp.

§ on_mActionSelectIntersect_triggered

void QgsExpressionSelectionDialog::on_mActionSelectIntersect_triggered ( )
slot

Definition at line 92 of file qgsexpressionselectiondialog.cpp.

§ on_mPbnClose_clicked

void QgsExpressionSelectionDialog::on_mPbnClose_clicked ( )
slot

Definition at line 114 of file qgsexpressionselectiondialog.cpp.

§ setExpressionText()

void QgsExpressionSelectionDialog::setExpressionText ( const QString &  text)

Sets the current expression text.

Parameters
textthe expression text to set

Definition at line 62 of file qgsexpressionselectiondialog.cpp.

§ setGeomCalculator()

void QgsExpressionSelectionDialog::setGeomCalculator ( const QgsDistanceArea da)

Sets geometry calculator used in distance/area calculations.

Definition at line 72 of file qgsexpressionselectiondialog.cpp.


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