Marble

GeoSceneProperty.cpp
1/*
2 SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "GeoSceneProperty.h"
8
9#include "GeoSceneTypes.h"
10
11namespace Marble
12{
13
14GeoSceneProperty::GeoSceneProperty(const QString &name)
15 : m_name(name)
16 , m_available(false)
17 , m_defaultValue(false)
18 , m_value(false)
19{
20}
21
22const char *GeoSceneProperty::nodeType() const
23{
24 return GeoSceneTypes::GeoScenePropertyType;
25}
26
27QString GeoSceneProperty::name() const
28{
29 return m_name;
30}
31
32bool GeoSceneProperty::available() const
33{
34 return m_available;
35}
36
37void GeoSceneProperty::setAvailable(bool available)
38{
39 m_available = available;
40}
41
42bool GeoSceneProperty::defaultValue() const
43{
44 return m_defaultValue;
45}
46
47void GeoSceneProperty::setDefaultValue(bool defaultValue)
48{
49 m_defaultValue = defaultValue;
50 setValue(defaultValue);
51}
52
53bool GeoSceneProperty::value() const
54{
55 return m_value;
56}
57
58void GeoSceneProperty::setValue(bool value)
59{
60 if (m_value == value)
61 return;
62
63 m_value = value;
64 // mDebug() << "GeoSceneProperty: Setting " << m_name << "to" << m_value;
65 Q_EMIT valueChanged(m_name, m_value);
66}
67
68}
69
70#include "moc_GeoSceneProperty.cpp"
QString name(StandardAction id)
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 Dec 6 2024 12:08:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.