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 "MarbleDebug.h"
10#include "GeoSceneTypes.h"
11
12namespace Marble
13{
14
15GeoSceneProperty::GeoSceneProperty( const QString& name )
16 : m_name( name ),
17 m_available( false ),
18 m_defaultValue( false ),
19 m_value( false )
20{
21}
22
23const char* GeoSceneProperty::nodeType() const
24{
25 return GeoSceneTypes::GeoScenePropertyType;
26}
27
28QString GeoSceneProperty::name() const
29{
30 return m_name;
31}
32
33bool GeoSceneProperty::available() const
34{
35 return m_available;
36}
37
38void GeoSceneProperty::setAvailable( bool available )
39{
40 m_available = available;
41}
42
43bool GeoSceneProperty::defaultValue() const
44{
45 return m_defaultValue;
46}
47
48void GeoSceneProperty::setDefaultValue( bool defaultValue )
49{
50 m_defaultValue = defaultValue;
51 setValue( defaultValue );
52}
53
54bool GeoSceneProperty::value() const
55{
56 return m_value;
57}
58
59void GeoSceneProperty::setValue( bool value )
60{
61 if ( m_value == value )
62 return;
63
64 m_value = value;
65// mDebug() << "GeoSceneProperty: Setting " << m_name << "to" << m_value;
66 emit valueChanged( m_name, m_value );
67}
68
69}
70
71#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 Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.