QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsscalerangewidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsscalerangewidget.h
3 --------------------------------------
4 Date : 25.04.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 QGSSCALERANGEWIDGET_H
17#define QGSSCALERANGEWIDGET_H
18
19#include <QGridLayout>
20#include "qgis_sip.h"
21#include <QLabel>
22#include "qgis_gui.h"
23
24class QgsMapCanvas;
25class QgsScaleWidget;
26
32class GUI_EXPORT QgsScaleRangeWidget : public QWidget
33{
34 Q_OBJECT
35 Q_PROPERTY( double minimumScale READ minimumScale WRITE setMinimumScale )
36 Q_PROPERTY( double maximumScale READ maximumScale WRITE setMaximumScale )
37
38 public:
42 explicit QgsScaleRangeWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
43
48 void setMapCanvas( QgsMapCanvas *canvas );
49
56 double minimumScale() const;
57
64 double maximumScale() const;
65
69 void reloadProjectScales();
70
71 public slots:
72
85 void setMinimumScale( double scale );
86
99 void setMaximumScale( double scale );
100
108 void setScaleRange( double min, double max );
109
110 signals:
111
117 void rangeChanged( double min, double max );
118
119 private slots:
120
121 void emitRangeChanged();
122
123 private:
124 // ui
125 QGridLayout *mLayout = nullptr;
126 QLabel *mMaximumScaleIconLabel = nullptr;
127 QLabel *mMinimumScaleIconLabel = nullptr;
128 QgsScaleWidget *mMaximumScaleWidget = nullptr;
129 QgsScaleWidget *mMinimumScaleWidget = nullptr;
130};
131
132#endif // QGSSCALERANGEWIDGET_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.
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53