6#include "PlaybackSoundCueItem.h"
8#include "GeoDataSoundCue.h"
11#include <phonon/AudioOutput>
18PlaybackSoundCueItem::PlaybackSoundCueItem(
const GeoDataSoundCue *soundCue)
19 : m_soundCue(soundCue)
20 , m_href(soundCue->href())
24 m_mediaObject.setCurrentSource(
QUrl(m_href));
28const GeoDataSoundCue *PlaybackSoundCueItem::soundCue()
const
33double PlaybackSoundCueItem::duration()
const
36 return m_mediaObject.totalTime() * 1.0 / 1000;
42void PlaybackSoundCueItem::play()
45 if (m_href != m_soundCue->href()) {
46 m_mediaObject.setCurrentSource(
QUrl(soundCue()->href()));
48 if (m_mediaObject.isValid()) {
54void PlaybackSoundCueItem::pause()
57 m_mediaObject.pause();
61void PlaybackSoundCueItem::seek(
double progress)
64 m_mediaObject.seek(progress * 1000);
70void PlaybackSoundCueItem::stop()
79#include "moc_PlaybackSoundCueItem.cpp"
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.