Marble

LayerInterface.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2008 Torsten Rahn <tackat@kde.org>
4// SPDX-FileCopyrightText: 2008 Inge Wallin <inge@lysator.liu.se>
5//
6
7#ifndef MARBLE_LAYERINTERFACE_H
8#define MARBLE_LAYERINTERFACE_H
9
10#include "marble_export.h"
11
12#include <QtGlobal>
13
14class QStringList;
15class QString;
16
17namespace Marble {
18
19class RenderState;
20
21class GeoPainter;
22class GeoSceneLayer;
23class ViewportParams;
24
25class MARBLE_EXPORT LayerInterface
26{
27public:
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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.