QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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 #include "qgis_sip.h"
21 #include "qgshelp.h"
22 
23 #include <QDialog>
24 #include "qgis_gui.h"
25 
26 class QgsMapCanvas;
27 class QgsMessageBar;
28 
36 class GUI_EXPORT QgsExpressionSelectionDialog : public QDialog, private Ui::QgsExpressionSelectionDialogBase
37 {
38  Q_OBJECT
39 
40  public:
41 
48  QgsExpressionSelectionDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent SIP_TRANSFERTHIS = nullptr );
49 
54  QgsExpressionBuilderWidget *expressionBuilder();
55 
60  void setExpressionText( const QString &text );
61 
66  QString expressionText();
67 
71  void setGeomCalculator( const QgsDistanceArea &da );
72 
79  void setMessageBar( QgsMessageBar *messageBar );
80 
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 
121 #endif
QgsExpressionBuilderWidget
A reusable widget that can be used to build a expression string.
Definition: qgsexpressionbuilderwidget.h:43
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:85
QgsExpressionSelectionDialog
This class offers a dialog to change feature selections.
Definition: qgsexpressionselectiondialog.h:37
qgis_sip.h
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:61
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsDistanceArea
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Definition: qgsdistancearea.h:50
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
qgshelp.h