• 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
GeoDataStyleMap.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 2008 Patrick Spendrin <ps_ml@gmx.de>
9 //
10 
11 
12 #include "GeoDataStyleMap.h"
13 #include <QDataStream>
14 
15 #include "GeoDataTypes.h"
16 
17 namespace Marble
18 {
19 
20 class GeoDataStyleMapPrivate
21 {
22  public:
23  const char* nodeType() const
24  {
25  return GeoDataTypes::GeoDataStyleMapType;
26  }
27 
28  QString lastKey;
29 };
30 
31 
32 GeoDataStyleMap::GeoDataStyleMap()
33  : d( new GeoDataStyleMapPrivate )
34 {
35 }
36 
37 GeoDataStyleMap::GeoDataStyleMap( const GeoDataStyleMap& other )
38  : GeoDataStyleSelector( other ) , QMap<QString,QString>(other), d( new GeoDataStyleMapPrivate( *other.d ) )
39 
40 {
41 }
42 
43 GeoDataStyleMap::~GeoDataStyleMap()
44 {
45  delete d;
46 }
47 
48 const char* GeoDataStyleMap::nodeType() const
49 {
50  return d->nodeType();
51 }
52 
53 QString GeoDataStyleMap::lastKey() const
54 {
55  return d->lastKey;
56 }
57 
58 void GeoDataStyleMap::setLastKey( QString key )
59 {
60  d->lastKey = key;
61 }
62 
63 GeoDataStyleMap& GeoDataStyleMap::operator=( const GeoDataStyleMap& other )
64 {
65  QMap<QString, QString>::operator=( other );
66  GeoDataStyleSelector::operator=( other );
67  *d = *other.d;
68  return *this;
69 }
70 
71 void GeoDataStyleMap::pack( QDataStream& stream ) const
72 {
73  GeoDataStyleSelector::pack( stream );
74  // lastKey doesn't need to be stored as it is needed at runtime only
75  stream << *this;
76 }
77 
78 void GeoDataStyleMap::unpack( QDataStream& stream )
79 {
80  GeoDataStyleSelector::unpack( stream );
81 
82  stream >> *this;
83 }
84 
85 }
Marble::GeoDataTypes::GeoDataStyleMapType
const char * GeoDataStyleMapType
Definition: GeoDataTypes.cpp:72
Marble::GeoDataStyleMap::operator=
GeoDataStyleMap & operator=(const GeoDataStyleMap &other)
assignment operator
Definition: GeoDataStyleMap.cpp:63
Marble::GeoDataStyleMap::GeoDataStyleMap
GeoDataStyleMap()
Definition: GeoDataStyleMap.cpp:32
Marble::GeoDataStyleMap
a class to map different styles to one style
Definition: GeoDataStyleMap.h:38
Marble::GeoDataStyleMap::lastKey
QString lastKey() const
return the last key
Definition: GeoDataStyleMap.cpp:53
Marble::GeoDataStyleMap::setLastKey
void setLastKey(QString key)
Set the last key this property is needed to set an entry in the kml parser after the parser has set t...
Definition: GeoDataStyleMap.cpp:58
Marble::GeoDataStyleSelector::unpack
virtual void unpack(QDataStream &stream)
Unserialize the styleselector from a stream.
Definition: GeoDataStyleSelector.cpp:77
Marble::GeoDataStyleMap::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataStyleMap.cpp:48
Marble::GeoDataStyleSelector::operator=
GeoDataStyleSelector & operator=(const GeoDataStyleSelector &other)
assignment operator
Definition: GeoDataStyleSelector.cpp:48
Marble::GeoDataStyleMap::~GeoDataStyleMap
~GeoDataStyleMap()
Definition: GeoDataStyleMap.cpp:43
Marble::GeoDataStyleSelector::pack
virtual void pack(QDataStream &stream) const
Serialize the styleselector to a stream.
Definition: GeoDataStyleSelector.cpp:70
GeoDataStyleMap.h
Marble::GeoDataStyleMap::pack
virtual void pack(QDataStream &stream) const
Serialize the stylemap to a stream.
Definition: GeoDataStyleMap.cpp:71
GeoDataTypes.h
Marble::GeoDataStyleSelector
a base class for the style classes
Definition: GeoDataStyleSelector.h:40
Marble::GeoDataStyleMap::unpack
virtual void unpack(QDataStream &stream)
Unserialize the stylemap from a stream.
Definition: GeoDataStyleMap.cpp:78
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