author | llornkcor <llornkcor> | 2002-08-16 12:22:46 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-16 12:22:46 (UTC) |
commit | 5144bf5607a246441f5b37dd0bbb9564017ce017 (patch) (side-by-side diff) | |
tree | c6f29d27a14426562f7cfa622230cce5879bd3df | |
parent | 2ce537c4275c5071a85efae8e9862b5fd9ceb6ae (diff) | |
download | opie-5144bf5607a246441f5b37dd0bbb9564017ce017.zip opie-5144bf5607a246441f5b37dd0bbb9564017ce017.tar.gz opie-5144bf5607a246441f5b37dd0bbb9564017ce017.tar.bz2 |
added mute and changed qcop from volumeChange to setVolume
-rw-r--r-- | noncore/multimedia/opieplayer2/volumecontrol.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/volumecontrol.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/volumecontrol.cpp b/noncore/multimedia/opieplayer2/volumecontrol.cpp index b8ec0df..219f63e 100644 --- a/noncore/multimedia/opieplayer2/volumecontrol.cpp +++ b/noncore/multimedia/opieplayer2/volumecontrol.cpp @@ -24,17 +24,18 @@ void VolumeControl::setVolume( int volumePerc ) { volumePerc = 100; } if ( volumePerc < 0 ) { volumePerc = 0; } m_volumePerc = volumePerc; cfg.writeEntry("VolumePercent", volumePerc ); - QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false; +// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false; + QCopEnvelope( "QPE/System", "setVolume(int,int)" ) << 0, volumePerc; } void VolumeControl::incVol( int ammount ) { int oldVol = getVolume(); setVolume( oldVol + ammount); } @@ -47,13 +48,15 @@ void VolumeControl::decVol( int ammount ) { VolumeControl::VolumeControl( ) { getVolume(); } VolumeControl::~VolumeControl() { QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false; } - +void VolumeControl::setMute(bool on) { + QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << on; +} diff --git a/noncore/multimedia/opieplayer2/volumecontrol.h b/noncore/multimedia/opieplayer2/volumecontrol.h index 37be398..d0d34a2 100644 --- a/noncore/multimedia/opieplayer2/volumecontrol.h +++ b/noncore/multimedia/opieplayer2/volumecontrol.h @@ -30,16 +30,17 @@ public: public slots: /** * Set the volume in percent * @value volumePerc between 0 and 100 */ void setVolume( int volumePerc ); + void setMute(bool); private: int m_volumePerc; }; |