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
23class GeoSceneGroup;
24
25class GeoSceneSettingsPrivate;
26
27/**
28 * @short Settings of a GeoScene document.
29 */
30class GEODATA_EXPORT GeoSceneSettings : public QObject, public GeoNode
31{
33
34public:
35 GeoSceneSettings();
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 */
70
71 /**
72 * @brief Get the whole list of properties stored in the settings
73 */
75
76 /**
77 * @brief Add a group to the settings
78 * @param group the new group
79 */
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 */
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 */
109
111 void valueChanged(const QString &, bool);
112
113private:
114 Q_DISABLE_COPY(GeoSceneSettings)
115 GeoSceneSettingsPrivate *const d;
116};
117
118}
119
120#endif
Group inside the settings of a GeoScene document.
Settings property within a GeoScene document.
void addGroup(GeoSceneGroup *group)
Add a group to the settings.
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
bool propertyValue(const QString &name, bool &value) const
Get the value of a property across groups.
void addProperty(GeoSceneProperty *property)
Add a property to the settings.
bool setPropertyValue(const QString &name, bool value)
Set the value of a property across groups.
const GeoSceneProperty * property(const QString &name) const
Get a property from the settings.
bool propertyAvailable(const QString &name, bool &available) const
Get the availability of a property across groups.
QList< GeoSceneProperty * > rootProperties()
Get the properties that are categorized into groups.
const GeoSceneGroup * group(const QString &name) const
Get a group from the settings.
QList< GeoSceneProperty * > allProperties()
Get the whole list of properties stored in the settings.
Binds a QML item to a specific geodetic location in screen coordinates.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:09 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.