QGIS API Documentation
3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
src
core
scalebar
qgsticksscalebarrenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsticksscalebarrenderer.h
3
--------------------------
4
begin : June 2008
5
copyright : (C) 2008 by Marco Hugentobler
6
email :
[email protected]
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 QGSTICKSSCALEBARRENDERER_H
18
#define QGSTICKSSCALEBARRENDERER_H
19
20
#include "qgis_core.h"
21
#include "
qgsscalebarrenderer.h
"
22
28
class
CORE_EXPORT
QgsTicksScaleBarRenderer
:
public
QgsScaleBarRenderer
29
{
30
public
:
31
33
enum
TickPosition
34
{
35
TicksUp
,
36
TicksDown
,
37
TicksMiddle
,
38
};
39
43
QgsTicksScaleBarRenderer
( TickPosition position = TicksMiddle );
44
45
QString
id
()
const override
;
46
QString
visibleName
()
const override
;
47
int
sortKey
()
const override
;
48
Flags
flags
()
const override
;
49
QgsTicksScaleBarRenderer
*
clone
() const override
SIP_FACTORY
;
50
51
void
draw(
QgsRenderContext
&context,
52
const
QgsScaleBarSettings
&settings,
53
const
QgsScaleBarRenderer
::ScaleBarContext &scaleContext ) const override;
54
59
void
setTickPosition(
TickPosition
position ) { mTickPosition = position; }
60
65
TickPosition
tickPosition
()
const
{
return
mTickPosition; }
66
67
private
:
68
69
TickPosition mTickPosition = TicksMiddle;
70
};
71
72
#endif
// QGSTICKSSCALEBARRENDERER_H
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:62
QgsScaleBarRenderer
Abstract base class for scale bar renderers.
Definition
qgsscalebarrenderer.h:38
QgsScaleBarRenderer::flags
virtual Flags flags() const
Returns the scalebar rendering flags, which dictates the renderer's behavior.
Definition
qgsscalebarrenderer.cpp:158
QgsScaleBarRenderer::sortKey
virtual int sortKey() const
Returns a sorting key value, where renderers with a lower sort key will be shown earlier in lists.
Definition
qgsscalebarrenderer.cpp:163
QgsScaleBarRenderer::visibleName
virtual QString visibleName() const =0
Returns the user friendly, translated name for the renderer.
QgsScaleBarRenderer::clone
virtual QgsScaleBarRenderer * clone() const =0
Returns a clone of the renderer.
QgsScaleBarRenderer::id
virtual QString id() const =0
Returns the unique ID for this renderer.
QgsScaleBarSettings
The QgsScaleBarSettings class stores the appearance and layout settings for scalebar drawing with Qgs...
Definition
qgsscalebarsettings.h:39
QgsTicksScaleBarRenderer
A scale bar that draws segments using short ticks.
Definition
qgsticksscalebarrenderer.h:29
QgsTicksScaleBarRenderer::TickPosition
TickPosition
Tick positions.
Definition
qgsticksscalebarrenderer.h:34
QgsTicksScaleBarRenderer::TicksUp
@ TicksUp
Render ticks above line.
Definition
qgsticksscalebarrenderer.h:35
QgsTicksScaleBarRenderer::TicksMiddle
@ TicksMiddle
Render ticks crossing line.
Definition
qgsticksscalebarrenderer.h:37
QgsTicksScaleBarRenderer::TicksDown
@ TicksDown
Render ticks below line.
Definition
qgsticksscalebarrenderer.h:36
QgsTicksScaleBarRenderer::tickPosition
TickPosition tickPosition() const
Returns the position for tick marks in the scalebar.
Definition
qgsticksscalebarrenderer.h:65
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgsscalebarrenderer.h
Generated on Thu Dec 26 2024 02:19:01 for QGIS API Documentation by
1.9.8