QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
This class offers a dialog to change feature selections. More...
#include <qgsexpressionselectiondialog.h>
Public Member Functions | |
QgsExpressionSelectionDialog (QgsVectorLayer *layer, const QString &startText=QString(), QWidget *parent=nullptr) | |
Creates a new selection dialog. | |
QgsExpressionBuilderWidget * | expressionBuilder () |
The builder widget that is used by the dialog. | |
QString | expressionText () |
Returns the current expression text. | |
void | setExpressionText (const QString &text) |
Sets the current expression text. | |
void | setGeomCalculator (const QgsDistanceArea &da) |
Sets geometry calculator used in distance/area calculations. | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets a map canvas associated with the dialog. | |
void | setMessageBar (QgsMessageBar *messageBar) |
Sets the message bar to display feedback from the dialog. | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *closeEvent) override |
Implementation for closeEvent Saves the window geometry. | |
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. | |
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 36 of file qgsexpressionselectiondialog.h.
QgsExpressionSelectionDialog::QgsExpressionSelectionDialog | ( | QgsVectorLayer * | layer, |
const QString & | startText = QString() , |
||
QWidget * | parent = nullptr |
||
) |
Creates a new selection dialog.
layer | The layer on which the selection is to be performed. |
startText | A default expression text to be applied (Defaults to empty) |
parent | parent object (owner) |
Definition at line 30 of file qgsexpressionselectiondialog.cpp.
|
overrideprotected |
Implementation for closeEvent Saves the window geometry.
closeEvent | Event object. Unused. |
Definition at line 202 of file qgsexpressionselectiondialog.cpp.
|
overrideprotected |
Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets saved and the object deleted.
r | Result value. Unused. |
Definition at line 212 of file qgsexpressionselectiondialog.cpp.
QgsExpressionBuilderWidget * QgsExpressionSelectionDialog::expressionBuilder | ( | ) |
The builder widget that is used by the dialog.
Definition at line 70 of file qgsexpressionselectiondialog.cpp.
QString QgsExpressionSelectionDialog::expressionText | ( | ) |
Returns the current expression text.
Definition at line 80 of file qgsexpressionselectiondialog.cpp.
void QgsExpressionSelectionDialog::setExpressionText | ( | const QString & | text | ) |
Sets the current expression text.
text | the expression text to set |
Definition at line 75 of file qgsexpressionselectiondialog.cpp.
void QgsExpressionSelectionDialog::setGeomCalculator | ( | const QgsDistanceArea & | da | ) |
Sets geometry calculator used in distance/area calculations.
Definition at line 85 of file qgsexpressionselectiondialog.cpp.
void QgsExpressionSelectionDialog::setMapCanvas | ( | QgsMapCanvas * | canvas | ) |
Sets a map canvas associated with the dialog.
Definition at line 96 of file qgsexpressionselectiondialog.cpp.
void QgsExpressionSelectionDialog::setMessageBar | ( | QgsMessageBar * | messageBar | ) |
Sets the message bar to display feedback from the dialog.
This is used when zooming to features to display the count of selected features.
messageBar | target message bar |
Definition at line 91 of file qgsexpressionselectiondialog.cpp.