File indexing completed on 2024-04-21 03:49:51

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
0004 //
0005 
0006 #ifndef PLAYBACKSOUNDCUEITEM_H
0007 #define PLAYBACKSOUNDCUEITEM_H
0008 
0009 #include "PlaybackItem.h"
0010 
0011 #include <config-phonon.h>
0012 
0013 #if HAVE_PHONON
0014 #include <phonon/MediaObject>
0015 #endif
0016 
0017 namespace Marble
0018 {
0019 
0020 class GeoDataSoundCue;
0021 
0022 class PlaybackSoundCueItem : public PlaybackItem
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit PlaybackSoundCueItem( const GeoDataSoundCue* soundCue );
0027     const GeoDataSoundCue* soundCue() const;
0028     double duration() const override;
0029     void play() override;
0030     void pause() override;
0031     void seek( double position ) override;
0032     void stop() override;
0033 private:
0034     const GeoDataSoundCue* m_soundCue;
0035     QString m_href;
0036 #if HAVE_PHONON
0037     Phonon::MediaObject m_mediaObject;
0038 #endif
0039 };
0040 
0041 }
0042 #endif