summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/volumecontrol.cpp
authorharlekin <harlekin>2002-08-19 21:11:10 (UTC)
committer harlekin <harlekin>2002-08-19 21:11:10 (UTC)
commit0d336f310b310ba18af70185eed58be6e07c26d8 (patch) (side-by-side diff)
tree4084cce27741e5e3ae1bc309d539b7db2ecc8e99 /noncore/multimedia/opieplayer2/volumecontrol.cpp
parent7f1a7e9b3272f7848423583ea5fc04eb67d97f14 (diff)
downloadopie-0d336f310b310ba18af70185eed58be6e07c26d8.zip
opie-0d336f310b310ba18af70185eed58be6e07c26d8.tar.gz
opie-0d336f310b310ba18af70185eed58be6e07c26d8.tar.bz2
fixes
Diffstat (limited to 'noncore/multimedia/opieplayer2/volumecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/volumecontrol.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/volumecontrol.cpp b/noncore/multimedia/opieplayer2/volumecontrol.cpp
index a795f3b..271b84e 100644
--- a/noncore/multimedia/opieplayer2/volumecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/volumecontrol.cpp
@@ -6,13 +6,12 @@
#include "volumecontrol.h"
-int VolumeControl::getVolume() {
- int volumePerc;
+int VolumeControl::volume() {
Config cfg( "qpe" );
cfg. setGroup( "Volume" );
- volumePerc = cfg. readNumEntry( "VolumePercent", 50 );
- m_volumePerc = volumePerc;
- return volumePerc;
+ m_volumePerc = cfg. readNumEntry( "VolumePercent", 50 );
+
+ return m_volumePerc;
}
@@ -35,18 +34,18 @@ void VolumeControl::setVolume( int volumePerc ) {
void VolumeControl::incVol( int ammount ) {
- int oldVol = getVolume();
+ int oldVol = volume();
setVolume( oldVol + ammount);
}
void VolumeControl::decVol( int ammount ) {
- int oldVol = getVolume();
+ int oldVol = volume();
setVolume( oldVol - ammount);
}
VolumeControl::VolumeControl( ) {
- getVolume();
+ volume();
}
VolumeControl::~VolumeControl() {