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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • data
GeoDataAnimatedUpdate.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 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
9 //
10 
11 #include "GeoDataAnimatedUpdate.h"
12 #include "GeoDataUpdate.h"
13 #include "GeoDataTypes.h"
14 #include "GeoDataAbstractView.h"
15 #include "GeoDataUpdate.h"
16 
17 namespace Marble {
18 
19 class GeoDataAnimatedUpdatePrivate
20 {
21 public:
22  double m_duration;
23  GeoDataUpdate* m_update;
24  GeoDataAnimatedUpdatePrivate();
25 };
26 
27 GeoDataAnimatedUpdatePrivate::GeoDataAnimatedUpdatePrivate() :
28  m_duration( 0.0 ), m_update( 0 )
29 {
30 
31 }
32 
33 GeoDataAnimatedUpdate::GeoDataAnimatedUpdate() : d( new GeoDataAnimatedUpdatePrivate )
34 {
35 
36 }
37 
38 GeoDataAnimatedUpdate::GeoDataAnimatedUpdate( const Marble::GeoDataAnimatedUpdate &other ) :
39  GeoDataTourPrimitive( other ), d( new GeoDataAnimatedUpdatePrivate( *other.d ) )
40 {
41 
42 }
43 
44 GeoDataAnimatedUpdate &GeoDataAnimatedUpdate::operator=( const GeoDataAnimatedUpdate &other )
45 {
46  GeoDataTourPrimitive::operator=( other );
47  *d = *other.d;
48  return *this;
49 }
50 
51 bool GeoDataAnimatedUpdate::operator==(const GeoDataAnimatedUpdate& other) const
52 {
53  if( ( !d->m_update && other.d->m_update ) || ( d->m_update && !other.d->m_update) ){
54  return false;
55  } else if( d->m_update && other.d->m_update ){
56  return d->m_duration == other.d->m_duration && *(d->m_update) == *(other.d->m_update);
57  }
58  return d->m_duration == other.d->m_duration;
59 }
60 
61 bool GeoDataAnimatedUpdate::operator!=(const GeoDataAnimatedUpdate& other) const
62 {
63  return !this->operator==(other);
64 }
65 
66 GeoDataAnimatedUpdate::~GeoDataAnimatedUpdate()
67 {
68  delete d;
69 }
70 
71 const char *GeoDataAnimatedUpdate::nodeType() const
72 {
73  return GeoDataTypes::GeoDataAnimatedUpdateType;
74 }
75 
76 const GeoDataUpdate* GeoDataAnimatedUpdate::update() const
77 {
78  return d->m_update;
79 }
80 
81 GeoDataUpdate* GeoDataAnimatedUpdate::update()
82 {
83  return d->m_update;
84 }
85 
86 void GeoDataAnimatedUpdate::setUpdate( GeoDataUpdate *update )
87 {
88  delete d->m_update;
89  d->m_update = update;
90  if ( d->m_update ) {
91  d->m_update->setParent( this );
92  }
93 }
94 
95 double GeoDataAnimatedUpdate::duration() const
96 {
97  return d->m_duration;
98 }
99 
100 void GeoDataAnimatedUpdate::setDuration( double duration )
101 {
102  d->m_duration = duration;
103 }
104 }
Marble::GeoDataAnimatedUpdate::GeoDataAnimatedUpdate
GeoDataAnimatedUpdate()
Definition: GeoDataAnimatedUpdate.cpp:33
GeoDataAbstractView.h
Marble::GeoDataAnimatedUpdate::update
const GeoDataUpdate * update() const
Definition: GeoDataAnimatedUpdate.cpp:76
Marble::GeoDataAnimatedUpdate::~GeoDataAnimatedUpdate
~GeoDataAnimatedUpdate()
Definition: GeoDataAnimatedUpdate.cpp:66
Marble::GeoDataTourPrimitive
Definition: GeoDataTourPrimitive.h:20
Marble::GeoDataAnimatedUpdate::setDuration
void setDuration(double duration)
Definition: GeoDataAnimatedUpdate.cpp:100
Marble::GeoDataAnimatedUpdate
Definition: GeoDataAnimatedUpdate.h:23
GeoDataUpdate.h
Marble::GeoDataAnimatedUpdate::operator!=
bool operator!=(const GeoDataAnimatedUpdate &other) const
Definition: GeoDataAnimatedUpdate.cpp:61
Marble::GeoDataAnimatedUpdate::operator=
GeoDataAnimatedUpdate & operator=(const GeoDataAnimatedUpdate &other)
Definition: GeoDataAnimatedUpdate.cpp:44
Marble::GeoDataAnimatedUpdate::setUpdate
void setUpdate(GeoDataUpdate *update)
Definition: GeoDataAnimatedUpdate.cpp:86
GeoDataAnimatedUpdate.h
Marble::GeoDataObject::operator=
GeoDataObject & operator=(const GeoDataObject &)
Definition: GeoDataObject.cpp:54
Marble::GeoDataUpdate
Definition: GeoDataUpdate.h:25
Marble::GeoDataTypes::GeoDataAnimatedUpdateType
const char * GeoDataAnimatedUpdateType
Definition: GeoDataTypes.cpp:29
Marble::GeoDataAnimatedUpdate::duration
double duration() const
Definition: GeoDataAnimatedUpdate.cpp:95
GeoDataTypes.h
Marble::GeoDataAnimatedUpdate::operator==
bool operator==(const GeoDataAnimatedUpdate &other) const
Definition: GeoDataAnimatedUpdate.cpp:51
Marble::GeoDataAnimatedUpdate::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataAnimatedUpdate.cpp:71
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 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
  • 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