Marble
6 #include "PlaybackSoundCueItem.h"
8 #include "GeoDataSoundCue.h"
11 #include <phonon/AudioOutput>
18 PlaybackSoundCueItem::PlaybackSoundCueItem(
const GeoDataSoundCue* soundCue ) :
19 m_soundCue( soundCue ),
20 m_href( soundCue->href() )
23 Phonon::createPath( &m_mediaObject,
new Phonon::AudioOutput( Phonon::MusicCategory,
this ) );
24 m_mediaObject.setCurrentSource(
QUrl( m_href ) );
28 const GeoDataSoundCue* PlaybackSoundCueItem::soundCue()
const
33 double PlaybackSoundCueItem::duration()
const
36 return m_mediaObject.totalTime() * 1.0 / 1000;
42 void PlaybackSoundCueItem::play()
45 if( m_href != m_soundCue->href() ) {
46 m_mediaObject.setCurrentSource(
QUrl( soundCue()->href() ) );
48 if( m_mediaObject.isValid() ) {
57 m_mediaObject.pause();
61 void PlaybackSoundCueItem::seek(
double progress )
64 m_mediaObject.seek( progress * 1000 );
79 #include "moc_PlaybackSoundCueItem.cpp"
void stop(Ekos::AlignState mode)
Q_SCRIPTABLE Q_NOREPLY void pause()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.