File indexing completed on 2024-04-21 03:49:55
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com> 0004 // 0005 0006 #ifndef SERIALTRACK_H 0007 #define SERIALTRACK_H 0008 0009 #include <QObject> 0010 0011 #include "PlaybackItem.h" 0012 0013 namespace Marble 0014 { 0015 class GeoDataCoordinates; 0016 0017 class SerialTrack : public QObject 0018 { 0019 Q_OBJECT 0020 public: 0021 SerialTrack(); 0022 ~SerialTrack() override; 0023 0024 void append( PlaybackItem* item ); 0025 void play(); 0026 void seek( double position ); 0027 double duration() const; 0028 void clear(); 0029 int size() const; 0030 PlaybackItem* at( int i ); 0031 double currentPosition(); 0032 0033 Q_SIGNALS: 0034 void centerOn( const GeoDataCoordinates &coordinates ); 0035 void progressChanged( double ); 0036 void finished(); 0037 void paused(); 0038 void itemFinished( int index ); 0039 0040 public Q_SLOTS: 0041 void handleFinishedItem(); 0042 void changeProgress( double ); 0043 void pause(); 0044 void stop(); 0045 0046 private: 0047 QList<PlaybackItem*> m_items; 0048 int m_currentIndex; 0049 double m_finishedPosition; 0050 double m_currentPosition; 0051 bool m_paused; 0052 }; 0053 0054 } 0055 #endif