File indexing completed on 2025-01-05 03:59:17
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2008 Torsten Rahn <tackat@kde.org> 0004 // SPDX-FileCopyrightText: 2008 Inge Wallin <inge@lysator.liu.se> 0005 // 0006 0007 #ifndef MARBLE_LAYERINTERFACE_H 0008 #define MARBLE_LAYERINTERFACE_H 0009 0010 #include "digikam_export.h" 0011 0012 #include <QtGlobal> 0013 #include <QStringList> 0014 #include <QString> 0015 0016 namespace Marble { 0017 0018 class RenderState; 0019 0020 class GeoPainter; 0021 class GeoSceneLayer; 0022 class ViewportParams; 0023 0024 class DIGIKAM_EXPORT LayerInterface 0025 { 0026 public: 0027 0028 /** Destructor */ 0029 virtual ~LayerInterface(); 0030 0031 /** 0032 * @brief Preferred level in the layer stack for the rendering 0033 * 0034 * Gives a preferred level in the existing layer stack where 0035 * the render() method of this plugin should get executed. 0036 * 0037 * Possible Values: 0038 * "NONE" 0039 * "STARS" 0040 * "BEHIND_TARGET" 0041 * "SURFACE" 0042 * "HOVERS_ABOVE_SURFACE" 0043 * "ATMOSPHERE" 0044 * "ORBIT" 0045 * "ALWAYS_ON_TOP" 0046 * "FLOAT_ITEM" 0047 * "USER_TOOLS" 0048 */ 0049 virtual QStringList renderPosition() const = 0; 0050 0051 /** 0052 * @brief Renders the content provided by the layer on the viewport. 0053 * @param painter painter object allowing to paint on the map 0054 * @param viewport metadata, such as current projection, screen dimension, etc. 0055 * @param renderPos current render position 0056 * @param layer deprecated, always zero (NULL) 0057 * @return @c true Returns whether the rendering has been successful 0058 */ 0059 virtual bool render( GeoPainter *painter, ViewportParams *viewport, 0060 const QString &renderPos, GeoSceneLayer *layer ) = 0; 0061 0062 /** 0063 * @brief Returns the z value of the layer (default: 0.0). If two layers are painted 0064 * at the same render position, the one with the higher z value is painted on top. 0065 * If both have the same z value, their paint order is undefined. 0066 */ 0067 virtual qreal zValue() const; 0068 0069 virtual RenderState renderState() const; 0070 0071 /** 0072 * @brief Returns a debug line for perfo/tracing issues 0073 */ 0074 virtual QString runtimeTrace() const; 0075 }; 0076 0077 } // namespace Marble 0078 0079 #endif