1 // SPDX-License-Identifier: LGPL-2.1-or-later 2 // 3 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com> 4 // 5 6 #ifndef PLAYBACKANIMATEDUPDATEITEM_H 7 #define PLAYBACKANIMATEDUPDATEITEM_H 8 9 #include "PlaybackItem.h" 10 11 namespace Marble 12 { 13 14 class GeoDataAnimatedUpdate; 15 class GeoDataDocument; 16 class GeoDataFeature; 17 class GeoDataObject; 18 19 class PlaybackAnimatedUpdateItem : public PlaybackItem 20 { 21 Q_OBJECT 22 public: 23 explicit PlaybackAnimatedUpdateItem( GeoDataAnimatedUpdate *animatedUpdate ); 24 const GeoDataAnimatedUpdate* animatedUpdate() const; 25 double duration() const override; 26 void play() override; 27 void pause() override; 28 void seek( double ) override; 29 void stop() override; 30 bool isApplied() const; 31 32 private: 33 static bool canDelete(const GeoDataFeature &feature); 34 GeoDataDocument* rootDocument( GeoDataObject *object ) const; 35 GeoDataFeature* findFeature( GeoDataFeature* feature, const QString& id ) const; 36 GeoDataAnimatedUpdate* m_animatedUpdate; 37 QList<GeoDataFeature*> m_deletedObjects; 38 GeoDataDocument* m_rootDocument; 39 bool m_playing; 40 }; 41 42 } 43 #endif 44