summaryrefslogtreecommitdiff
path: root/qmafwwatchlet/qmafwwatchletplayer.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-09-04 03:27:30 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-09-04 03:27:30 +0200
commit4e10566c9b0c4fb723ad68e44ae4c231e6959323 (patch)
tree6f8aaa80a481b08e7827750e40b1c923ffc29046 /qmafwwatchlet/qmafwwatchletplayer.cpp
parent2f631362b54180252d0daa34f359338860a8782b (diff)
downloadsowatch-4e10566c9b0c4fb723ad68e44ae4c231e6959323.tar.gz
sowatch-4e10566c9b0c4fb723ad68e44ae4c231e6959323.zip
improve media player's watchlet volume change
Diffstat (limited to 'qmafwwatchlet/qmafwwatchletplayer.cpp')
-rw-r--r--qmafwwatchlet/qmafwwatchletplayer.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/qmafwwatchlet/qmafwwatchletplayer.cpp b/qmafwwatchlet/qmafwwatchletplayer.cpp
index 8f51fbf..0e8b436 100644
--- a/qmafwwatchlet/qmafwwatchletplayer.cpp
+++ b/qmafwwatchlet/qmafwwatchletplayer.cpp
@@ -11,6 +11,8 @@
using namespace sowatch;
+const QLatin1String QMafwWatchletPlayer::_volumeProp("volume");
+
QMafwWatchletPlayer::QMafwWatchletPlayer(QMafwWatchlet* watchlet) :
QObject(watchlet),
_active(false),
@@ -102,15 +104,19 @@ void QMafwWatchletPlayer::previous()
void QMafwWatchletPlayer::volumeUp()
{
if (!_renderer) return;
- QString prop("volume");
- _renderer->mafwProperty(prop, qobject_cast<QObject*>(this), SLOT(doVolumeUp(QString,QVariant)));
+ QString prop(_volumeProp);
+ _renderer->mafwProperty(prop,
+ qobject_cast<QObject*>(this),
+ SLOT(doVolumeUp(QString,QVariant)));
}
void QMafwWatchletPlayer::volumeDown()
{
if (!_renderer) return;
- QString prop("volume");
- _renderer->mafwProperty(prop, qobject_cast<QObject*>(this), SLOT(doVolumeDown(QString,QVariant)));
+ QString prop(_volumeProp);
+ _renderer->mafwProperty(prop,
+ qobject_cast<QObject*>(this),
+ SLOT(doVolumeDown(QString,QVariant)));
}
void QMafwWatchletPlayer::setRenderer(MafwRenderer * renderer)