QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsexpressionselectiondialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgisexpressionselectiondialog.h
3 --------------------------------------
4 Date : 24.1.2013
5 Copyright : (C) 2013 by Matthias kuhn
6 Email : matthias at opengis dot ch
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSEXPRESSIONSELECTIONDIALOG_H
17#define QGSEXPRESSIONSELECTIONDIALOG_H
18
19#include "ui_qgsexpressionselectiondialogbase.h"
20
21#include "qgis_gui.h"
22#include "qgis_sip.h"
23#include "qgshelp.h"
24
25#include <QDialog>
26
27class QgsMapCanvas;
28class QgsMessageBar;
29
38class GUI_EXPORT QgsExpressionSelectionDialog : public QDialog, private Ui::QgsExpressionSelectionDialogBase
39{
40 Q_OBJECT
41
42 public:
43
50 QgsExpressionSelectionDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent SIP_TRANSFERTHIS = nullptr );
51
57
62 void setExpressionText( const QString &text );
63
68 QString expressionText();
69
73 void setGeomCalculator( const QgsDistanceArea &da );
74
80 void setMessageBar( QgsMessageBar *messageBar );
81
85 void setMapCanvas( QgsMapCanvas *canvas );
86
87 private slots:
88 void mActionSelect_triggered();
89 void mActionAddToSelection_triggered();
90 void mActionRemoveFromSelection_triggered();
91 void mActionSelectIntersect_triggered();
92 void mButtonZoomToFeatures_clicked();
93 void mPbnClose_clicked();
94 void showHelp();
95
96 protected:
97
103 void closeEvent( QCloseEvent *closeEvent ) override;
104
110 void done( int r ) override;
111
112 private:
113 void saveRecent();
114 void pushSelectedFeaturesMessage();
115 QgsVectorLayer *mLayer = nullptr;
116 QgsMessageBar *mMessageBar = nullptr;
117 QgsMapCanvas *mMapCanvas = nullptr;
118};
119
120#endif
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
A reusable widget that can be used to build an expression string.
QgsExpressionBuilderWidget * expressionBuilder()
The builder widget that is used by the dialog.
QString expressionText()
Returns the current expression text.
void closeEvent(QCloseEvent *closeEvent) override
Implementation for closeEvent Saves the window geometry.
void setExpressionText(const QString &text)
Sets the current expression text.
QgsExpressionSelectionDialog(QgsVectorLayer *layer, const QString &startText=QString(), QWidget *parent=nullptr)
Creates a new selection dialog.
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.
void setGeomCalculator(const QgsDistanceArea &da)
Sets geometry calculator used in distance/area calculations.
void done(int r) override
Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets...
Map canvas is a class for displaying all GIS data types on a canvas.
A bar for displaying non-blocking messages to the user.
Represents a vector layer which manages a vector based dataset.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53