Marble

LayerInterface.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2008 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2008 Inge Wallin <[email protected]>
5 //
6 
7 #ifndef MARBLE_LAYERINTERFACE_H
8 #define MARBLE_LAYERINTERFACE_H
9 
10 #include "marble_export.h"
11 
12 #include <QtGlobal>
13 
14 class QStringList;
15 class QString;
16 
17 namespace Marble {
18 
19 class RenderState;
20 
21 class GeoPainter;
22 class GeoSceneLayer;
23 class ViewportParams;
24 
25 class MARBLE_EXPORT LayerInterface
26 {
27 public:
28 
29  /** Destructor */
30  virtual ~LayerInterface();
31 
32  /**
33  * @brief Preferred level in the layer stack for the rendering
34  *
35  * Gives a preferred level in the existing layer stack where
36  * the render() method of this plugin should get executed.
37  *
38  * Possible Values:
39  * "NONE"
40  * "STARS"
41  * "BEHIND_TARGET"
42  * "SURFACE"
43  * "HOVERS_ABOVE_SURFACE"
44  * "ATMOSPHERE"
45  * "ORBIT"
46  * "ALWAYS_ON_TOP"
47  * "FLOAT_ITEM"
48  * "USER_TOOLS"
49  */
50  virtual QStringList renderPosition() const = 0;
51 
52  /**
53  * @brief Renders the content provided by the layer on the viewport.
54  * @param painter painter object allowing to paint on the map
55  * @param viewport metadata, such as current projection, screen dimension, etc.
56  * @param renderPos current render position
57  * @param layer deprecated, always zero (NULL)
58  * @return @c true Returns whether the rendering has been successful
59  */
60  virtual bool render( GeoPainter *painter, ViewportParams *viewport,
61  const QString &renderPos, GeoSceneLayer *layer ) = 0;
62 
63  /**
64  * @brief Returns the z value of the layer (default: 0.0). If two layers are painted
65  * at the same render position, the one with the higher z value is painted on top.
66  * If both have the same z value, their paint order is undefined.
67  */
68  virtual qreal zValue() const;
69 
70  virtual RenderState renderState() const;
71 
72  /**
73  * @brief Returns a debug line for perfo/tracing issues
74  */
75  virtual QString runtimeTrace() const;
76 };
77 
78 } // namespace Marble
79 
80 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.