• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • data
GeoDataStyleSelector.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2007 Murad Tagirov <tmurad@gmail.com>
9 //
10 
11 
12 #include "GeoDataStyleSelector.h"
13 #include <QDataStream>
14 
15 #include "GeoDataTypes.h"
16 
17 namespace Marble
18 {
19 
20 class GeoDataStyleSelectorPrivate
21 {
22  public:
23  const char* nodeType() const
24  {
25  return GeoDataTypes::GeoDataStyleSelectorType;
26  }
27 
29  QString m_styleId;
30 };
31 
32 
33 GeoDataStyleSelector::GeoDataStyleSelector()
34  : d( new GeoDataStyleSelectorPrivate )
35 {
36 }
37 
38 GeoDataStyleSelector::GeoDataStyleSelector( const GeoDataStyleSelector& other )
39  : GeoDataObject( other ), d( new GeoDataStyleSelectorPrivate( *other.d ) )
40 {
41 }
42 
43 GeoDataStyleSelector::~GeoDataStyleSelector()
44 {
45  delete d;
46 }
47 
48 GeoDataStyleSelector& GeoDataStyleSelector::operator=( const GeoDataStyleSelector& other )
49 {
50  GeoDataObject::operator=( other );
51  *d = *other.d;
52  return *this;
53 }
54 
55 const char* GeoDataStyleSelector::nodeType() const
56 {
57  return d->nodeType();
58 }
59 
60 void GeoDataStyleSelector::setStyleId( const QString &value )
61 {
62  d->m_styleId = value;
63 }
64 
65 QString GeoDataStyleSelector::styleId() const
66 {
67  return d->m_styleId;
68 }
69 
70 void GeoDataStyleSelector::pack( QDataStream& stream ) const
71 {
72  GeoDataObject::pack( stream );
73 
74  stream << d->m_styleId;
75 }
76 
77 void GeoDataStyleSelector::unpack( QDataStream& stream )
78 {
79  GeoDataObject::unpack( stream );
80 
81  stream >> d->m_styleId;
82 }
83 
84 }
Marble::GeoDataStyleSelector::setStyleId
void setStyleId(const QString &value)
Set a new style id.
Definition: GeoDataStyleSelector.cpp:60
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::GeoDataObject::pack
virtual void pack(QDataStream &stream) const
Reimplemented from Serializable.
Definition: GeoDataObject.cpp:114
Marble::GeoDataStyleSelector::unpack
virtual void unpack(QDataStream &stream)
Unserialize the styleselector from a stream.
Definition: GeoDataStyleSelector.cpp:77
Marble::GeoDataStyleSelector::operator=
GeoDataStyleSelector & operator=(const GeoDataStyleSelector &other)
assignment operator
Definition: GeoDataStyleSelector.cpp:48
Marble::GeoDataTypes::GeoDataStyleSelectorType
const char * GeoDataStyleSelectorType
Definition: GeoDataTypes.cpp:70
Marble::GeoDataStyleSelector::pack
virtual void pack(QDataStream &stream) const
Serialize the styleselector to a stream.
Definition: GeoDataStyleSelector.cpp:70
GeoDataStyleSelector.h
Marble::GeoDataObject::operator=
GeoDataObject & operator=(const GeoDataObject &)
Definition: GeoDataObject.cpp:54
Marble::GeoDataObject::unpack
virtual void unpack(QDataStream &steam)
Reimplemented from Serializable.
Definition: GeoDataObject.cpp:120
Marble::GeoDataStyleSelector::styleId
QString styleId() const
Return the style id.
Definition: GeoDataStyleSelector.cpp:65
Marble::GeoDataStyleSelector::GeoDataStyleSelector
GeoDataStyleSelector()
Definition: GeoDataStyleSelector.cpp:33
GeoDataTypes.h
Marble::GeoDataStyleSelector
a base class for the style classes
Definition: GeoDataStyleSelector.h:40
Marble::GeoDataStyleSelector::~GeoDataStyleSelector
~GeoDataStyleSelector()
Definition: GeoDataStyleSelector.cpp:43
Marble::GeoDataStyleSelector::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataStyleSelector.cpp:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal