QGIS API Documentation  2.99.0-Master (19b062c)
qgsscalevisibilitydialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsscalevisibilitydialog.cpp
3  --------------------------------------
4  Date : 20.05.2014
5  Copyright : (C) 2014 Denis Rouzaud
6  Email : denis.rouzaud@gmail.com
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 QGSSCALEVISIBILITYDIALOG_H
17 #define QGSSCALEVISIBILITYDIALOG_H
18 
19 #include <QDialog>
20 #include "qgis.h"
21 #include <QGroupBox>
22 #include "qgis_gui.h"
23 
24 class QgsMapCanvas;
26 
32 class GUI_EXPORT QgsScaleVisibilityDialog : public QDialog
33 {
34  Q_OBJECT
35  Q_PROPERTY( bool hasScaleVisibility READ hasScaleVisibility WRITE setScaleVisiblity )
36  Q_PROPERTY( double minimumScale READ minimumScale WRITE setMinimumScale )
37  Q_PROPERTY( double maximumScale READ maximumScale WRITE setMaximumScale )
38 
39  public:
40 
46  explicit QgsScaleVisibilityDialog( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &title = QString(), QgsMapCanvas *mapCanvas = nullptr );
47 
51  bool hasScaleVisibility() const;
52 
59  double minimumScale() const;
60 
67  double maximumScale() const;
68 
69  public slots:
70 
75  void setScaleVisiblity( bool hasScaleVisibility );
76 
83  void setMinimumScale( double scale );
84 
91  void setMaximumScale( double scale );
92 
93 
94  private:
95  QGroupBox *mGroupBox = nullptr;
96  QgsScaleRangeWidget *mScaleWidget = nullptr;
97 
98 };
99 
100 #endif // QGSSCALEVISIBILITYDIALOG_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:74
A dialog allowing users to enter a scale visibility range.
A widget allowing entry of a range of map scales, e.g.