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 <QString>
13#include <QStringList>
14#include <QtGlobal>
15
16namespace Marble
17{
18
19class RenderState;
20
21class GeoPainter;
22class GeoSceneLayer;
23class ViewportParams;
24
25class MARBLE_EXPORT LayerInterface
26{
27public:
28 /** Destructor */
29 virtual ~LayerInterface();
30
31 /**
32 * @brief Preferred level in the layer stack for the rendering
33 *
34 * Gives a preferred level in the existing layer stack where
35 * the render() method of this plugin should get executed.
36 *
37 * Possible Values:
38 * "NONE"
39 * "STARS"
40 * "BEHIND_TARGET"
41 * "SURFACE"
42 * "HOVERS_ABOVE_SURFACE"
43 * "ATMOSPHERE"
44 * "ORBIT"
45 * "ALWAYS_ON_TOP"
46 * "FLOAT_ITEM"
47 * "USER_TOOLS"
48 */
49 virtual QStringList renderPosition() const = 0;
50
51 /**
52 * @brief Renders the content provided by the layer on the viewport.
53 * @param painter painter object allowing to paint on the map
54 * @param viewport metadata, such as current projection, screen dimension, etc.
55 * @param renderPos current render position
56 * @param layer deprecated, always zero (NULL)
57 * @return @c true Returns whether the rendering has been successful
58 */
59 virtual bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer) = 0;
60
61 /**
62 * @brief Returns the z value of the layer (default: 0.0). If two layers are painted
63 * at the same render position, the one with the higher z value is painted on top.
64 * If both have the same z value, their paint order is undefined.
65 */
66 virtual qreal zValue() const;
67
68 virtual RenderState renderState() const;
69
70 /**
71 * @brief Returns a debug line for perfo/tracing issues
72 */
73 virtual QString runtimeTrace() const;
74};
75
76} // namespace Marble
77
78#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 Mon Nov 18 2024 12:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.