QGIS API Documentation
2.12.0-Lyon
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
gui
qgsscalecombobox.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsscalecombobox.h
3
------------------------
4
begin : January 7, 2012
5
copyright : (C) 2012 by Alexander Bruy
6
email : alexander dot bruy at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSSCALECOMBOBOX_H
19
#define QGSSCALECOMBOBOX_H
20
21
#include <QComboBox>
22
27
class
GUI_EXPORT
QgsScaleComboBox
:
public
QComboBox
28
{
29
Q_OBJECT
30
public
:
31
QgsScaleComboBox
(
QWidget
* parent = 0 );
32
virtual
~
QgsScaleComboBox
();
33
35
QString
scaleString();
37
bool
setScaleString(
const
QString
& scaleTxt );
39
double
scale();
41
void
setScale(
double
scale );
42
44
// Performs rounding, so an exact representation is not to
45
// be expected.
46
static
QString
toString(
double
scale );
48
static
double
toDouble(
const
QString
& scaleString,
bool
*ok = NULL );
49
50
signals:
52
void
scaleChanged();
53
54
public
slots:
55
void
updateScales(
const
QStringList
&scales =
QStringList
() );
56
57
protected
:
58
void
showPopup
()
override
;
59
60
private
slots:
61
void
fixupScale();
62
63
private
:
64
double
mScale;
65
};
66
67
#endif // QGSSCALECOMBOBOX_H
QWidget
QString
QStringList
QComboBox::showPopup
virtual void showPopup()
QgsScaleComboBox
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...
Definition:
qgsscalecombobox.h:27
QComboBox
Generated on Sat Oct 24 2015 04:11:26 for QGIS API Documentation by
1.8.9.1