QGIS API Documentation  2.99.0-Master (0a63d1f)
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 "qgsmapcanvas.h"
22 #include "qgsmessagebar.h"
23 
24 #include <QDialog>
25 #include "qgis_gui.h"
26 
33 class GUI_EXPORT QgsExpressionSelectionDialog : public QDialog, private Ui::QgsExpressionSelectionDialogBase
34 {
35  Q_OBJECT
36 
37  public:
38 
45  QgsExpressionSelectionDialog( QgsVectorLayer* layer, const QString& startText = QString(), QWidget* parent = nullptr );
46 
51  QgsExpressionBuilderWidget* expressionBuilder();
52 
57  void setExpressionText( const QString& text );
58 
63  QString expressionText();
64 
68  void setGeomCalculator( const QgsDistanceArea & da );
69 
75  void setMessageBar( QgsMessageBar* messageBar );
76 
81  void setMapCanvas( QgsMapCanvas* canvas );
82 
83  private slots:
84  void on_mActionSelect_triggered();
85  void on_mActionAddToSelection_triggered();
86  void on_mActionRemoveFromSelection_triggered();
87  void on_mActionSelectIntersect_triggered();
88  void on_mButtonZoomToFeatures_clicked();
89  void on_mPbnClose_clicked();
90 
91  protected:
92 
98  virtual void closeEvent( QCloseEvent *closeEvent ) override;
99 
105  virtual void done( int r ) override;
106 
107  private:
108  void saveRecent();
109  QgsVectorLayer* mLayer;
110  QgsMessageBar* mMessageBar;
111  QgsMapCanvas* mMapCanvas;
112 };
113 
114 #endif
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:43
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:74
This class offers a dialog to change feature selections.
General purpose distance and area calculator.
A reusable widget that can be used to build a expression string.
Represents a vector layer which manages a vector based data sets.