QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
u
v
w
z
+
Variables
a
b
c
d
e
g
h
i
l
n
o
p
q
r
s
t
u
w
+
Typedefs
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
scalebar
qgsscalebarrenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsscalebarrenderer.h
3
---------------------
4
begin : June 2008
5
copyright : (C) 2008 by Marco Hugentobler
6
email : marco.hugentobler@karto.baug.ethz.ch
7
***************************************************************************/
8
/***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
17
#ifndef QGSSCALEBARRENDERER_H
18
#define QGSSCALEBARRENDERER_H
19
20
#include "qgis_core.h"
21
#include "
qgis_sip.h
"
22
#include <QRectF>
23
#include <QList>
24
25
class
QgsRenderContext
;
26
class
QgsScaleBarSettings
;
27
38
class
CORE_EXPORT
QgsScaleBarRenderer
39
{
40
public
:
41
46
struct
ScaleBarContext
47
{
48
53
double
segmentWidth { 0.0 };
54
60
QSizeF
size
;
61
63
double
scale { 1.0 };
64
65
};
66
70
QgsScaleBarRenderer
() =
default
;
71
virtual
~
QgsScaleBarRenderer
() =
default
;
72
76
virtual
QString name()
const
= 0;
77
81
virtual
void
draw(
QgsRenderContext
&context,
82
const
QgsScaleBarSettings
&settings,
83
const
QgsScaleBarRenderer::ScaleBarContext
&scaleContext )
const
= 0;
84
88
virtual
QSizeF calculateBoxSize(
const
QgsScaleBarSettings
&settings,
89
const
QgsScaleBarRenderer::ScaleBarContext
&scaleContext )
const
;
90
91
protected
:
92
96
void
drawDefaultLabels(
QgsRenderContext
&context,
97
const
QgsScaleBarSettings
&settings,
98
const
QgsScaleBarRenderer::ScaleBarContext
&scaleContext )
const
;
99
103
QString firstLabelString(
const
QgsScaleBarSettings
&settings )
const
;
104
109
Q_DECL_DEPRECATED
double
firstLabelXOffset(
const
QgsScaleBarSettings
&settings )
const
SIP_DEPRECATED
;
110
115
double
firstLabelXOffset(
const
QgsScaleBarSettings
&settings,
const
QgsRenderContext
&context,
const
ScaleBarContext
&scaleContext )
const
;
116
120
QList<double> segmentPositions(
const
QgsScaleBarRenderer::ScaleBarContext
&scaleContext,
const
QgsScaleBarSettings
&settings )
const
;
121
125
QList<double> segmentWidths(
const
QgsScaleBarRenderer::ScaleBarContext
&scaleContext,
const
QgsScaleBarSettings
&settings )
const
;
126
127
};
128
129
#endif //QGSSCALEBARRENDERER_H
QgsScaleBarRenderer::ScaleBarContext::size
QSizeF size
Destination size for scalebar.
Definition:
qgsscalebarrenderer.h:60
qgis_sip.h
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition:
qgis_sip.h:106
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:51
QgsScaleBarRenderer
Abstract base class for scale bar renderers.
Definition:
qgsscalebarrenderer.h:38
QgsScaleBarSettings
The QgsScaleBarSettings class stores the appearance and layout settings for scalebar drawing with Qgs...
Definition:
qgsscalebarsettings.h:36
QgsScaleBarRenderer::ScaleBarContext
Contains parameters regarding scalebar calculations.
Definition:
qgsscalebarrenderer.h:46
Generated on Sun Oct 27 2019 00:43:28 for QGIS API Documentation by
1.8.13