QGIS API Documentation 3.99.0-Master (26c88405ac0)
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:
41
47 explicit QgsScaleVisibilityDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &title = QString(), QgsMapCanvas *mapCanvas = nullptr );
48
52 bool hasScaleVisibility() const;
53
60 double minimumScale() const;
61
68 double maximumScale() const;
69
70 public slots:
71
78
84 void setScaleVisibility( bool hasScaleVisibility );
85
92 void setMinimumScale( double scale );
93
100 void setMaximumScale( double scale );
101
102
103 private:
104 QGroupBox *mGroupBox = nullptr;
105 QgsScaleRangeWidget *mScaleWidget = nullptr;
106};
107
108#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