6 #include "GeoDataAnimatedUpdate.h"
7 #include "GeoDataUpdate.h"
8 #include "GeoDataTypes.h"
9 #include "GeoDataAbstractView.h"
13 class GeoDataAnimatedUpdatePrivate
17 double m_delayedStart;
18 GeoDataUpdate* m_update;
19 GeoDataAnimatedUpdatePrivate();
22 GeoDataAnimatedUpdatePrivate::GeoDataAnimatedUpdatePrivate() :
23 m_duration( 0.0 ), m_delayedStart( 0 ), m_update( nullptr )
28 GeoDataAnimatedUpdate::GeoDataAnimatedUpdate() : d( new GeoDataAnimatedUpdatePrivate )
33 GeoDataAnimatedUpdate::GeoDataAnimatedUpdate(
const Marble::GeoDataAnimatedUpdate &other ) :
34 GeoDataTourPrimitive( other ), d( new GeoDataAnimatedUpdatePrivate( *other.d ) )
39 GeoDataAnimatedUpdate &GeoDataAnimatedUpdate::operator=(
const GeoDataAnimatedUpdate &other )
41 GeoDataTourPrimitive::operator=( other );
46 bool GeoDataAnimatedUpdate::operator==(
const GeoDataAnimatedUpdate& other)
const
48 if( ( !d->m_update && other.d->m_update ) || ( d->m_update && !other.d->m_update) ){
50 }
else if( d->m_update && other.d->m_update ){
51 return d->m_duration == other.d->m_duration && *(d->m_update) == *(other.d->m_update);
53 return d->m_duration == other.d->m_duration;
56 bool GeoDataAnimatedUpdate::operator!=(
const GeoDataAnimatedUpdate& other)
const
61 GeoDataAnimatedUpdate::~GeoDataAnimatedUpdate()
66 const char *GeoDataAnimatedUpdate::nodeType()
const
68 return GeoDataTypes::GeoDataAnimatedUpdateType;
71 const GeoDataUpdate* GeoDataAnimatedUpdate::update()
const
76 GeoDataUpdate* GeoDataAnimatedUpdate::update()
81 void GeoDataAnimatedUpdate::setUpdate( GeoDataUpdate *update )
86 d->m_update->setParent(
this );
90 double GeoDataAnimatedUpdate::duration()
const
95 void GeoDataAnimatedUpdate::setDuration(
double duration )
97 d->m_duration = duration;
100 double GeoDataAnimatedUpdate::delayedStart()
const
102 return d->m_delayedStart;
105 void GeoDataAnimatedUpdate::setDelayedStart(
double delayedStart )
107 d->m_delayedStart = delayedStart;