Marble

GeoSceneSettings.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_GEOSCENESETTINGS_H
8#define MARBLE_GEOSCENESETTINGS_H
9
10#include <QList>
11#include <QObject>
12
13#include <geodata_export.h>
14
15#include "GeoDocument.h"
16
17class QString;
18
19namespace Marble
20{
21
22class GeoSceneProperty;
23class GeoSceneGroup;
24
25class GeoSceneSettingsPrivate;
26
27/**
28 * @short Settings of a GeoScene document.
29 */
30class GEODATA_EXPORT GeoSceneSettings : public QObject, public GeoNode
31{
32 Q_OBJECT
33
34public:
36 ~GeoSceneSettings() override;
37 const char *nodeType() const override;
38
39 /**
40 * @brief Get the availability of a property across groups
41 * @param name the property name
42 * @param available availability of the property
43 * @return @c true the property was registered across groups
44 * @c false the property wasn't registered across groups
45 */
46 bool propertyAvailable(const QString &name, bool &available) const;
47
48 /**
49 * @brief Set the value of a property across groups
50 * @param name the property name
51 * @param value the value of the property
52 * @return @c true the property was found and changed accordingly
53 * @c false the property couldn't be found here
54 */
55 bool setPropertyValue(const QString &name, bool value);
56
57 /**
58 * @brief Get the value of a property across groups
59 * @param name the property name
60 * @param value the value of the property
61 * @return @c true the property was found and returned accordingly
62 * @c false the property couldn't be found in this group
63 */
64 bool propertyValue(const QString &name, bool &value) const;
65
66 /**
67 * @brief Get the whole list of properties stored in the settings
68 */
69 QList<GeoSceneProperty *> allProperties();
70
71 /**
72 * @brief Get the whole list of properties stored in the settings
73 */
74 QList<const GeoSceneProperty *> allProperties() const;
75
76 /**
77 * @brief Add a group to the settings
78 * @param group the new group
79 */
80 void addGroup(GeoSceneGroup *group);
81
82 /**
83 * @brief Get a group from the settings
84 * @param name the name of the group
85 */
86 const GeoSceneGroup *group(const QString &name) const;
87 GeoSceneGroup *group(const QString &name);
88
89 /**
90 * @brief Add a property to the settings
91 * @param property the new property
92 */
93 void addProperty(GeoSceneProperty *property);
94
95 /**
96 * @brief Get a property from the settings
97 * @param name the name of the property
98 */
99 const GeoSceneProperty *property(const QString &name) const;
100 GeoSceneProperty *property(const QString &name);
101
102 /**
103 * @brief Get the properties that are categorized into groups
104 *
105 * NOTE: If you want all the properties distributed among groups
106 * then please use: QList<GeoSceneProperty*> allProperties().
107 */
108 QList<GeoSceneProperty *> rootProperties();
109
110Q_SIGNALS:
111 void valueChanged(const QString &, bool);
112
113private:
114 Q_DISABLE_COPY(GeoSceneSettings)
115 GeoSceneSettingsPrivate *const d;
116};
117
118}
119
120#endif
A shared base class for all classes that are mapped to a specific tag (ie.
Definition GeoDocument.h:35
Group inside the settings of a GeoScene document.
Settings property within a GeoScene document.
Settings of a GeoScene document.
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 Fri Nov 8 2024 12:02:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.