QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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
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 "qgis_gui.h"
20#include "qgis_sip.h"
21
22#include <QDialog>
23#include <QGroupBox>
24
25class QgsMapCanvas;
27
33class GUI_EXPORT QgsScaleVisibilityDialog : public QDialog
34{
35 Q_OBJECT
37 Q_PROPERTY( double minimumScale READ minimumScale WRITE setMinimumScale )
38 Q_PROPERTY( double maximumScale READ maximumScale WRITE setMaximumScale )
39
40 public:
46 explicit QgsScaleVisibilityDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, 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
77
83 void setScaleVisibility( bool hasScaleVisibility );
84
91 void setMinimumScale( double scale );
92
99 void setMaximumScale( double scale );
100
101
102 private:
103 QGroupBox *mGroupBox = nullptr;
104 QgsScaleRangeWidget *mScaleWidget = nullptr;
105};
106
107#endif // QGSSCALEVISIBILITYDIALOG_H
Map canvas is a class for displaying all GIS data types on a canvas.
A widget allowing entry of a range of map scales, e.g.
Q_DECL_DEPRECATED void setScaleVisiblity(bool hasScaleVisibility)
Set whether scale based visibility is enabled.
void setMaximumScale(double scale)
Set the maximum scale, or 0 to indicate the minimum is not set.
void setScaleVisibility(bool hasScaleVisibility)
Set whether scale based visibility is enabled.
void setMinimumScale(double scale)
Set the minimum scale, or 0 to indicate the minimum is not set.
QgsScaleVisibilityDialog(QWidget *parent=nullptr, const QString &title=QString(), QgsMapCanvas *mapCanvas=nullptr)
Constructor for QgsScaleVisibilityDialog, with specified dialog title.
#define SIP_DEPRECATED
Definition qgis_sip.h:114
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53