Diffstat (limited to 'noncore/multimedia/opieplayer2/volumecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/volumecontrol.cpp | 15 |
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 @@ -7,11 +7,10 @@ #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; } @@ -36,10 +35,10 @@ 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); } @@ -47,5 +46,5 @@ void VolumeControl::decVol( int ammount ) { VolumeControl::VolumeControl( ) { - getVolume(); + volume(); } |