QGIS API Documentation
3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
src
core
qgsmapdecoration.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmapdecoration.h
3
----------------
4
begin : April 2017
5
copyright : (C) 2017 by Mathieu Pellerin
6
email : nirvn dot asia 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 QGSMAPDECORATION_H
19
#define QGSMAPDECORATION_H
20
21
#include "qgis_core.h"
22
#include <QString>
23
24
class
QgsMapSettings
;
25
class
QgsRenderContext
;
26
33
class
CORE_EXPORT
QgsMapDecoration
34
{
35
36
public
:
37
38
QgsMapDecoration
() =
default
;
39
40
virtual
~QgsMapDecoration
() =
default
;
41
45
virtual
void
render
(
const
QgsMapSettings
&mapSettings,
QgsRenderContext
&context ) = 0;
46
51
const
QString
displayName
()
const
{
return
mDisplayName; }
52
58
virtual
bool
hasFixedMapPosition
()
const
{
return
false
; }
59
60
protected
:
61
66
void
setDisplayName
(
const
QString &name ) { mDisplayName = name; }
67
68
private
:
69
70
QString mDisplayName;
71
72
};
73
74
#endif
//QGSMAPDECORATION_H
QgsMapDecoration
Interface for map decorations.
Definition
qgsmapdecoration.h:34
QgsMapDecoration::hasFixedMapPosition
virtual bool hasFixedMapPosition() const
Returns true if the decoration is attached to a fixed map position (e.g grid, layout extent),...
Definition
qgsmapdecoration.h:58
QgsMapDecoration::displayName
const QString displayName() const
Returns the map decoration display name.
Definition
qgsmapdecoration.h:51
QgsMapDecoration::render
virtual void render(const QgsMapSettings &mapSettings, QgsRenderContext &context)=0
Renders a map decoration.
QgsMapDecoration::~QgsMapDecoration
virtual ~QgsMapDecoration()=default
QgsMapDecoration::QgsMapDecoration
QgsMapDecoration()=default
QgsMapDecoration::setDisplayName
void setDisplayName(const QString &name)
Sets the map decoration display name.
Definition
qgsmapdecoration.h:66
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map.
Definition
qgsmapsettings.h:91
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:62
Generated on Sun Dec 15 2024 01:32:01 for QGIS API Documentation by
1.9.8