• 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
GeoDataLod.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 2009 Torsten Rahn <rahn@kde.org>
9 //
10 
11 
12 #include "GeoDataLod.h"
13 #include "GeoDataLod_p.h"
14 
15 #include <QDataStream>
16 
17 namespace Marble
18 {
19 GeoDataLod::GeoDataLod()
20  : GeoDataObject(),
21  d( new GeoDataLodPrivate )
22 {
23 }
24 
25 GeoDataLod::GeoDataLod( const GeoDataLod& other )
26  : GeoDataObject( other ),
27  d( new GeoDataLodPrivate( *other.d ) )
28 {
29 }
30 
31 GeoDataLod::~GeoDataLod()
32 {
33  delete d;
34 }
35 
36 
37 const char* GeoDataLod::nodeType() const
38 {
39  return d->nodeType();
40 }
41 
42 
43 qreal GeoDataLod::minLodPixels() const
44 {
45  return d->m_minLodPixels;
46 }
47 
48 
49 void GeoDataLod::setMinLodPixels( qreal pixels )
50 {
51  d->m_minLodPixels = pixels;
52 }
53 
54 
55 qreal GeoDataLod::maxLodPixels() const
56 {
57  return d->m_maxLodPixels;
58 }
59 
60 
61 void GeoDataLod::setMaxLodPixels( qreal pixels )
62 {
63  d->m_maxLodPixels = pixels;
64 }
65 
66 
67 qreal GeoDataLod::minFadeExtent() const
68 {
69  return d->m_minFadeExtent;
70 }
71 
72 
73 void GeoDataLod::setMinFadeExtent( qreal pixels )
74 {
75  d->m_minFadeExtent = pixels;
76 }
77 
78 
79 qreal GeoDataLod::maxFadeExtent() const
80 {
81  return d->m_maxFadeExtent;
82 }
83 
84 
85 void GeoDataLod::setMaxFadeExtent( qreal pixels )
86 {
87  d->m_maxFadeExtent = pixels;
88 }
89 
90 
91 void GeoDataLod::pack( QDataStream& stream ) const
92 {
93  GeoDataObject::pack( stream );
94 
95  stream << d->m_minLodPixels << d->m_maxLodPixels;
96  stream << d->m_minFadeExtent << d->m_maxFadeExtent;
97 }
98 
99 void GeoDataLod::unpack( QDataStream& stream )
100 {
101  GeoDataObject::unpack( stream );
102 
103  stream >> d->m_minLodPixels >> d->m_maxLodPixels;
104  stream >> d->m_minFadeExtent >> d->m_maxFadeExtent;
105 }
106 
107 GeoDataLod &GeoDataLod::operator=( const GeoDataLod& other )
108 {
109  *d = *other.d;
110  return *this;
111 }
112 
113 }
114 
Marble::GeoDataLodPrivate::m_minLodPixels
qreal m_minLodPixels
Definition: GeoDataLod_p.h:37
Marble::GeoDataLod::setMinFadeExtent
void setMinFadeExtent(qreal pixels)
Sets how "quickly" the region fades when the region is far away. Sets the distance (counted from minL...
Definition: GeoDataLod.cpp:73
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::GeoDataLod::setMaxLodPixels
void setMaxLodPixels(qreal pixels)
Sets the maximum size that is needed for the region to be active Sets the maximum number of pixels th...
Definition: GeoDataLod.cpp:61
Marble::GeoDataObject::pack
virtual void pack(QDataStream &stream) const
Reimplemented from Serializable.
Definition: GeoDataObject.cpp:114
Marble::GeoDataLod::~GeoDataLod
virtual ~GeoDataLod()
Destroys a Level of Detail object.
Definition: GeoDataLod.cpp:31
Marble::GeoDataLodPrivate::m_minFadeExtent
qreal m_minFadeExtent
Definition: GeoDataLod_p.h:39
Marble::GeoDataLod::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataLod.cpp:37
Marble::GeoDataLodPrivate::nodeType
const char * nodeType() const
Definition: GeoDataLod_p.h:32
GeoDataLod.h
Marble::GeoDataLod
The level of detail which indicates visibility and importance.
Definition: GeoDataLod.h:44
Marble::GeoDataLod::operator=
GeoDataLod & operator=(const GeoDataLod &other)
Definition: GeoDataLod.cpp:107
Marble::GeoDataLod::GeoDataLod
GeoDataLod()
Creates a new Level of Detail object.
Definition: GeoDataLod.cpp:19
Marble::GeoDataLod::unpack
virtual void unpack(QDataStream &stream)
Unserialize the Lod from a stream.
Definition: GeoDataLod.cpp:99
Marble::GeoDataLod::maxFadeExtent
qreal maxFadeExtent() const
Returns how "quickly" the region fades when the region is near. Returns the distance (counted from ma...
Definition: GeoDataLod.cpp:79
Marble::GeoDataLodPrivate
Definition: GeoDataLod_p.h:21
Marble::GeoDataLod::minLodPixels
qreal minLodPixels() const
Returns the minimum size that is needed for the region to be active Returns the minimum number of pix...
Definition: GeoDataLod.cpp:43
Marble::GeoDataLod::pack
virtual void pack(QDataStream &stream) const
Serialize the Lod to a stream.
Definition: GeoDataLod.cpp:91
GeoDataLod_p.h
Marble::GeoDataLod::d
GeoDataLodPrivate *const d
Definition: GeoDataLod.h:155
Marble::GeoDataLodPrivate::m_maxLodPixels
qreal m_maxLodPixels
Definition: GeoDataLod_p.h:38
Marble::GeoDataObject::unpack
virtual void unpack(QDataStream &steam)
Reimplemented from Serializable.
Definition: GeoDataObject.cpp:120
Marble::GeoDataLod::minFadeExtent
qreal minFadeExtent() const
Returns how "quickly" the region fades when the region is far away. Returns the distance (counted fro...
Definition: GeoDataLod.cpp:67
Marble::GeoDataLod::setMinLodPixels
void setMinLodPixels(qreal pixels)
Sets the minimum size that is needed for the region to be active Sets the minimum number of pixels th...
Definition: GeoDataLod.cpp:49
Marble::GeoDataLod::maxLodPixels
qreal maxLodPixels() const
Returns the maximum size that is needed for the region to be active Returns the maximum number of pix...
Definition: GeoDataLod.cpp:55
Marble::GeoDataLod::setMaxFadeExtent
void setMaxFadeExtent(qreal pixels)
Sets how "quickly" the region fades when the region is near. Sets the distance (counted from maxLodPi...
Definition: GeoDataLod.cpp:85
Marble::GeoDataLodPrivate::m_maxFadeExtent
qreal m_maxFadeExtent
Definition: GeoDataLod_p.h:40
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