Marble

GeoSceneMap.h
1/*
2 SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef MARBLE_GEOSCENEMAP_H
8#define MARBLE_GEOSCENEMAP_H
9
10#include <QList>
11#include <QVariant>
12
13#include <geodata_export.h>
14
15#include "GeoDocument.h"
16
17class QColor;
18class QString;
19
20namespace Marble
21{
22
23class GeoSceneLayer;
24class GeoSceneFilter;
25
26class GeoSceneMapPrivate;
27
28/**
29 * @short Map layer structure of a GeoScene document.
30 */
31class GEODATA_EXPORT GeoSceneMap : public GeoNode
32{
33public:
35 ~GeoSceneMap() override;
36 const char *nodeType() const override;
37
38 QColor backgroundColor() const;
39 void setBackgroundColor(const QColor &);
40
41 QColor labelColor() const;
42 void setLabelColor(const QColor &);
43
44 QColor highlightBrushColor() const;
45 void setHighlightBrushColor(const QColor &);
46
47 QColor highlightPenColor() const;
48 void setHighlightPenColor(const QColor &);
49 /**
50 * @brief Add a new layer to the map
51 * @param layer The new layer
52 */
53 void addLayer(GeoSceneLayer *);
54 /**
55 * @ brief Set starting center with lon lat cooredinates
56 * used if a scene downloadUrl do not handle elements in other locations
57 */
58 void setCenter(const QString &coordinateString);
59 /**
60 * @breif Get starting center with cooredinates
61 * used if a scene downloadUrl do not handle elements in other locations
62 * return A QVariantList of lon lat as specified in the dgml
63 */
64 QVariantList center() const;
65 /**
66 * @brief Return a layer by its name
67 * @param name The name of the layer
68 * @return A pointer to the layer request by its name
69 */
70 GeoSceneLayer *layer(const QString &name);
71 const GeoSceneLayer *layer(const QString &name) const;
72
73 /**
74 * @brief Return all layers
75 * @return A vector that contains pointers to all available layers
76 */
77 QList<GeoSceneLayer *> layers() const;
78
79 /**
80 * @brief Add a new filter to the map
81 * @param filter The new filter
82 */
83 void addFilter(GeoSceneFilter *);
84
85 /**
86 * @brief Return a filter by its name
87 * @param name The name of the filter
88 * @return A pointer to the filter request by its name
89 */
90 GeoSceneFilter *filter(const QString &name);
91
92 /**
93 * @brief Return all filters
94 * @return A vector that contains pointers to all available filters
95 */
96 QList<GeoSceneFilter *> filters() const;
97
98 /**
99 * @brief Checks for valid layers that contain texture data
100 * @return Whether a texture layer got created internally
101 *
102 * NOTE: The existence of the file(s) that contain the actual data
103 * still needs to get checked at runtime!
104 */
105 bool hasTextureLayers() const;
106
107 /**
108 * @brief Checks for valid layers that contain vector data
109 * @return Whether a vector layer got created internally
110 *
111 * NOTE: The existence of the file(s) that contain the actual data
112 * still needs to get checked at runtime!
113 */
114 bool hasVectorLayers() const;
115
116private:
117 Q_DISABLE_COPY(GeoSceneMap)
118 GeoSceneMapPrivate *const d;
119};
120
121}
122
123#endif
A shared base class for all classes that are mapped to a specific tag (ie.
Definition GeoDocument.h:35
Filter of a GeoScene document.
Layer of a GeoScene document.
Map layer structure of a GeoScene document.
Definition GeoSceneMap.h:32
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 Wed Nov 6 2024 12:11:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.