author | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
commit | 793a63d9cce0502616cad6999643b1a61836a3db (patch) (side-by-side diff) | |
tree | 3ea020afd5a06236e5e889f3acae429d87171488 /core/applets/volumeapplet/volumeappletimpl.cpp | |
parent | fe4cb014e959518e4835d15593f2c392174af55b (diff) | |
download | opie-793a63d9cce0502616cad6999643b1a61836a3db.zip opie-793a63d9cce0502616cad6999643b1a61836a3db.tar.gz opie-793a63d9cce0502616cad6999643b1a61836a3db.tar.bz2 |
Started as a bug fix this is a near complete restructuring/rewrite:
- Added a alarm volume slider on iPAQs
- Made mic mutable
- Correctly inform the launcher about tap/key sounds
Diffstat (limited to 'core/applets/volumeapplet/volumeappletimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volumeappletimpl.cpp | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp index 943e71a..47506cc 100644 --- a/core/applets/volumeapplet/volumeappletimpl.cpp +++ b/core/applets/volumeapplet/volumeappletimpl.cpp @@ -20,55 +20,46 @@ #include "volume.h" #include "volumeappletimpl.h" #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> VolumeAppletImpl::VolumeAppletImpl() : volume(0), ref(0) { } VolumeAppletImpl::~VolumeAppletImpl() { - delete volume; + delete volume; } QWidget *VolumeAppletImpl::applet( QWidget *parent ) { - if ( !volume ) - volume = new VolumeApplet( parent ); - - Config cfg("qpe"); - cfg.setGroup("Volume"); - QString foo = cfg.readEntry("Mute","TRUE"); - bool muted; - if(foo.find("TRUE",0,TRUE) != -1) - muted = TRUE; - else muted = FALSE; - QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted; //mute - return volume; + if ( !volume ) + volume = new VolumeApplet( parent ); + return volume; } int VolumeAppletImpl::position() const { - return 6; + return 6; } QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { - *iface = 0; - if ( uuid == IID_QUnknown ) - *iface = this; - else if ( uuid == IID_TaskbarApplet ) - *iface = this; + *iface = 0; + if ( uuid == IID_QUnknown ) + *iface = this; + else if ( uuid == IID_TaskbarApplet ) + *iface = this; - if ( *iface ) - (*iface)->addRef(); - return QS_OK; + if ( *iface ) + (*iface)->addRef(); + return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( VolumeAppletImpl ) } |