Marble

GeoSceneItem.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Torsten Rahn <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "GeoSceneItem.h"
8 
9 #include "GeoSceneIcon.h"
10 #include "GeoSceneTypes.h"
11 
12 namespace Marble
13 {
14 
15 GeoSceneItem::GeoSceneItem( const QString& name )
16  : m_icon(new GeoSceneIcon),
17  m_name( name ),
18  m_text(),
19  m_connectTo(),
20  m_checkable( false ),
21  m_spacing( 12 )
22 {
23 }
24 
25 GeoSceneItem::~GeoSceneItem()
26 {
27  delete m_icon;
28 }
29 
30 const char* GeoSceneItem::nodeType() const
31 {
32  return GeoSceneTypes::GeoSceneItemType;
33 }
34 
35 const GeoSceneIcon* GeoSceneItem::icon() const
36 {
37  return m_icon;
38 }
39 
40 GeoSceneIcon* GeoSceneItem::icon()
41 {
42  return m_icon;
43 }
44 
45 QString GeoSceneItem::name() const
46 {
47  return m_name;
48 }
49 
50 QString GeoSceneItem::text() const
51 {
52  return m_text;
53 }
54 
55 void GeoSceneItem::setText( const QString& text )
56 {
57  m_text = text;
58 }
59 
60 bool GeoSceneItem::checkable() const
61 {
62  return m_checkable;
63 }
64 
65 void GeoSceneItem::setCheckable( bool checkable )
66 {
67  m_checkable = checkable;
68 }
69 
70 QString GeoSceneItem::connectTo() const
71 {
72  return m_connectTo;
73 }
74 
75 void GeoSceneItem::setConnectTo( const QString& connectTo )
76 {
77  m_connectTo = connectTo;
78 }
79 
80 int GeoSceneItem::spacing() const
81 {
82  return m_spacing;
83 }
84 
85 void GeoSceneItem::setSpacing( int spacing )
86 {
87  m_spacing = spacing;
88 }
89 
90 }
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
Binds a QML item to a specific geodetic location in screen coordinates.
QString name(StandardShortcut id)
Icon properties of a GeoScene document.
Definition: GeoSceneIcon.h:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jun 28 2022 03:53:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.