Marble

GeoSceneGroup.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_GEOSCENEGROUP_H
8#define MARBLE_GEOSCENEGROUP_H
9
10#include <QList>
11#include <QObject>
12#include <QString>
13
14#include "GeoDocument.h"
15
16namespace Marble
17{
18
19class GeoSceneProperty;
20
21/**
22 * @short Group inside the settings of a GeoScene document.
23 */
24
25class GeoSceneGroup : public QObject, public GeoNode
26{
28
29public:
30 explicit GeoSceneGroup(const QString &name);
31 ~GeoSceneGroup() override;
32
33 /**
34 * @brief Get the availability of a property in this group
35 * @param name the property name
36 * @param available availability of the property
37 * @return @c true the property was registered in this group
38 * @c false the property wasn't registered in this group
39 */
40 bool propertyAvailable(const QString &name, bool &available) const;
41
42 /**
43 * @brief Set the value of a property in this group
44 * @param name the property name
45 * @param value the value of the property
46 * @return @c true the property was found and changed accordingly
47 * @c false the property couldn't be found in this group
48 */
49 bool setPropertyValue(const QString &name, bool value);
50
51 /**
52 * @brief Get the value of a property in this group
53 * @param name the property name
54 * @param value the value of the property
55 * @return @c true the property was found and returned accordingly
56 * @c false the property couldn't be found in this group
57 */
58 bool propertyValue(const QString &name, bool &value) const;
59
60 /**
61 * @brief Add a property to this setting group
62 * @param property the new property
63 */
65 const GeoSceneProperty *property(const QString &name) const;
66 GeoSceneProperty *property(const QString &name);
67 QList<GeoSceneProperty *> properties();
68 QList<const GeoSceneProperty *> properties() const;
69
70 QString name() const;
71
72 const char *nodeType() const override;
73
75 void valueChanged(const QString &, bool);
76
77private:
78 Q_DISABLE_COPY(GeoSceneGroup)
79
80 /// The vector holding all the properties in this settings group.
81 QList<GeoSceneProperty *> m_properties;
82
83 QString m_name;
84};
85
86}
87
88#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.
bool propertyAvailable(const QString &name, bool &available) const
Get the availability of a property in this group.
bool setPropertyValue(const QString &name, bool value)
Set the value of a property in this group.
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
void addProperty(GeoSceneProperty *)
Add a property to this setting group.
bool propertyValue(const QString &name, bool &value) const
Get the value of a property in this group.
Settings property within a GeoScene document.
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.