Marble

GeoSceneProperty.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Torsten Rahn <[email protected]>
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 
12 namespace Marble
13 {
14 
15 GeoSceneProperty::GeoSceneProperty( const QString& name )
16  : m_name( name ),
17  m_available( false ),
18  m_defaultValue( false ),
19  m_value( false )
20 {
21 }
22 
23 const char* GeoSceneProperty::nodeType() const
24 {
25  return GeoSceneTypes::GeoScenePropertyType;
26 }
27 
28 QString GeoSceneProperty::name() const
29 {
30  return m_name;
31 }
32 
33 bool GeoSceneProperty::available() const
34 {
35  return m_available;
36 }
37 
38 void GeoSceneProperty::setAvailable( bool available )
39 {
40  m_available = available;
41 }
42 
43 bool GeoSceneProperty::defaultValue() const
44 {
45  return m_defaultValue;
46 }
47 
48 void GeoSceneProperty::setDefaultValue( bool defaultValue )
49 {
50  m_defaultValue = defaultValue;
51  setValue( defaultValue );
52 }
53 
54 bool GeoSceneProperty::value() const
55 {
56  return m_value;
57 }
58 
59 void 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"
Binds a QML item to a specific geodetic location in screen coordinates.
QString name(StandardShortcut id)
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.