QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
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 QGSSCALERANGEWIDGET_H
17 #define QGSSCALERANGEWIDGET_H
18 
19 #include <QGridLayout>
20 #include <QLabel>
21 
22 #include "qgscollapsiblegroupbox.h"
23 #include "qgsmaplayer.h"
24 #include "qgsmapcanvas.h"
25 #include "qgsscalewidget.h"
26 
27 
28 class GUI_EXPORT QgsScaleRangeWidget : public QWidget
29 {
30  Q_OBJECT
31 
32  public:
33  explicit QgsScaleRangeWidget( QWidget *parent = 0 );
35 
37 
41  void setMapCanvas( QgsMapCanvas* mapCanvas );
42 
44  double minimumScale();
45 
47  double maximumScale();
48 
50  double minimumScaleDenom();
51 
53  double maximumScaleDenom();
54 
56  void reloadProjectScales();
57 
58  public slots:
59  void setMinimumScale( double scale );
60 
61  void setMaximumScale( double scale );
62 
63  void setScaleRange( double min, double max );
64 
65  private:
67  QgsMapCanvas* mCanvas;
68 
69  // ui
70  QGridLayout* mLayout;
71  QLabel* mMaximumScaleIconLabel;
72  QLabel* mMinimumScaleIconLabel;
73  QgsScaleWidget* mMaximumScaleWidget;
74  QgsScaleWidget* mMinimumScaleWidget;
75 };
76 
77 #endif // QGSSCALERANGEWIDGET_H
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:105
int min(int a, int b)
Definition: util.h:93
int max(int a, int b)
Definition: util.h:87