QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 
34 class CORE_EXPORT QgsMapDecoration
35 {
36 
37  public:
38 
42  QgsMapDecoration() = default;
43 
44  virtual ~QgsMapDecoration() = default;
45 
49  virtual void render( const QgsMapSettings &mapSettings, QgsRenderContext &context ) = 0;
50 
55  const QString displayName() const { return mDisplayName; }
56 
57  protected:
58 
63  void setDisplayName( const QString &name ) { mDisplayName = name; }
64 
65  private:
66 
67  QString mDisplayName;
68 
69 };
70 
71 #endif //QGSMAPDECORATION_H
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:59
QgsMapDecoration::setDisplayName
void setDisplayName(const QString &name)
Sets the map decoration display name.
Definition: qgsmapdecoration.h:63
QgsMapDecoration
Interface for map decorations.
Definition: qgsmapdecoration.h:34
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map. The rendering itself is don...
Definition: qgsmapsettings.h:88
QgsMapDecoration::displayName
const QString displayName() const
Returns the map decoration display name.
Definition: qgsmapdecoration.h:55