summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/volumecontrol.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/volumecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/volumecontrol.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/volumecontrol.cpp b/noncore/multimedia/opieplayer2/volumecontrol.cpp
index 271b84e..b3f5f8d 100644
--- a/noncore/multimedia/opieplayer2/volumecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/volumecontrol.cpp
@@ -1,29 +1,27 @@
1 1
2#include <qpe/qpeapplication.h>
3#include <qpe/config.h> 2#include <qpe/config.h>
4#include "qpe/qcopenvelope_qws.h" 3#include "qpe/qcopenvelope_qws.h"
5#include <qmessagebox.h>
6 4
7#include "volumecontrol.h" 5#include "volumecontrol.h"
8 6
9int VolumeControl::volume() { 7int VolumeControl::volume() {
10 Config cfg( "qpe" ); 8 Config cfg( "qpe" );
11 cfg. setGroup( "Volume" ); 9 cfg. setGroup( "Volume" );
12 m_volumePerc = cfg. readNumEntry( "VolumePercent", 50 ); 10 m_volumePerc = cfg. readNumEntry( "VolumePercent", 50 );
13 11
14 return m_volumePerc; 12 return m_volumePerc;
15} 13}
16 14
17 15
18void VolumeControl::setVolume( int volumePerc ) { 16void VolumeControl::setVolume( int volumePerc ) {
19 Config cfg("qpe"); 17 Config cfg("qpe");
20 cfg.setGroup("Volume"); 18 cfg.setGroup("Volume");
21 19
22 if ( volumePerc > 100 ) { 20 if ( volumePerc > 100 ) {
23 volumePerc = 100; 21 volumePerc = 100;
24 } 22 }
25 if ( volumePerc < 0 ) { 23 if ( volumePerc < 0 ) {
26 volumePerc = 0; 24 volumePerc = 0;
27 } 25 }
28 26
29 m_volumePerc = volumePerc; 27 m_volumePerc = volumePerc;