Quantum GIS API Documentation
1.7.5-Wroclaw
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
core
qgsscalecalculator.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsscalecalculator.h
3
Calculates scale based on map extent and units
4
-------------------
5
begin : May 18, 2004
6
copyright : (C) 2004 by Gary E.Sherman
7
email : sherman at mrcc.com
8
***************************************************************************/
9
10
/***************************************************************************
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* *
17
***************************************************************************/
18
/* $Id$ */
19
20
#ifndef QGSSCALECALCULATOR_H
21
#define QGSSCALECALCULATOR_H
22
23
#include <
qgis.h
>
24
25
class
QString;
26
class
QgsRectangle
;
27
32
class
CORE_EXPORT
QgsScaleCalculator
33
{
34
public
:
35
42
QgsScaleCalculator
(
double
dpi = 0,
43
QGis::UnitType
mapUnits =
QGis::Meters
);
44
46
~
QgsScaleCalculator
();
47
52
void
setDpi(
double
dpi );
57
double
dpi();
58
63
void
setMapUnits(
QGis::UnitType
mapUnits );
64
66
QGis::UnitType
mapUnits()
const
;
67
74
double
calculate(
const
QgsRectangle
&mapExtent,
int
canvasWidth );
75
82
double
calculateGeographicDistance(
const
QgsRectangle
&mapExtent );
83
84
private
:
85
87
double
mDpi
;
88
90
QGis::UnitType
mMapUnits
;
91
};
92
93
#endif // #ifndef QGSSCALECALCULATOR_H
Generated on Wed Jun 13 2012 13:54:11 for Quantum GIS API Documentation by
1.8.1