QGIS API Documentation  2.99.0-Master (b698612)
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 : [email protected]
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 
31 class GUI_EXPORT QgsScaleVisibilityDialog : public QDialog
32 {
33  Q_OBJECT
34  Q_PROPERTY( bool hasScaleVisibility READ hasScaleVisibility WRITE setScaleVisiblity )
35  Q_PROPERTY( double minimumScale READ minimumScale WRITE setMinimumScale )
36  Q_PROPERTY( double maximumScale READ maximumScale WRITE setMaximumScale )
37 
38  public:
39 
45  explicit QgsScaleVisibilityDialog( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &title = QString(), QgsMapCanvas *mapCanvas = nullptr );
46 
50  bool hasScaleVisibility() const;
51 
58  double minimumScale() const;
59 
66  double maximumScale() const;
67 
68  public slots:
69 
74  void setScaleVisiblity( bool hasScaleVisibility );
75 
82  void setMinimumScale( double scale );
83 
90  void setMaximumScale( double scale );
91 
92 
93  private:
94  QGroupBox *mGroupBox = nullptr;
95  QgsScaleRangeWidget *mScaleWidget = nullptr;
96 
97 };
98 
99 #endif // QGSSCALEVISIBILITYDIALOG_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:34
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:73
A dialog allowing users to enter a scale visibility range.
A widget allowing entry of a range of map scales, e.g.