author | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
commit | 793a63d9cce0502616cad6999643b1a61836a3db (patch) (unidiff) | |
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 | |||
@@ -29,41 +29,32 @@ VolumeAppletImpl::VolumeAppletImpl() | |||
29 | 29 | ||
30 | VolumeAppletImpl::~VolumeAppletImpl() | 30 | VolumeAppletImpl::~VolumeAppletImpl() |
31 | { | 31 | { |
32 | delete volume; | 32 | delete volume; |
33 | } | 33 | } |
34 | 34 | ||
35 | QWidget *VolumeAppletImpl::applet( QWidget *parent ) | 35 | QWidget *VolumeAppletImpl::applet( QWidget *parent ) |
36 | { | 36 | { |
37 | if ( !volume ) | 37 | if ( !volume ) |
38 | volume = new VolumeApplet( parent ); | 38 | volume = new VolumeApplet( parent ); |
39 | 39 | return volume; | |
40 | Config cfg("qpe"); | ||
41 | cfg.setGroup("Volume"); | ||
42 | QString foo = cfg.readEntry("Mute","TRUE"); | ||
43 | bool muted; | ||
44 | if(foo.find("TRUE",0,TRUE) != -1) | ||
45 | muted = TRUE; | ||
46 | else muted = FALSE; | ||
47 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted; //mute | ||
48 | return volume; | ||
49 | } | 40 | } |
50 | 41 | ||
51 | int VolumeAppletImpl::position() const | 42 | int VolumeAppletImpl::position() const |
52 | { | 43 | { |
53 | return 6; | 44 | return 6; |
54 | } | 45 | } |
55 | 46 | ||
56 | QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 47 | QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
57 | { | 48 | { |
58 | *iface = 0; | 49 | *iface = 0; |
59 | if ( uuid == IID_QUnknown ) | 50 | if ( uuid == IID_QUnknown ) |
60 | *iface = this; | 51 | *iface = this; |
61 | else if ( uuid == IID_TaskbarApplet ) | 52 | else if ( uuid == IID_TaskbarApplet ) |
62 | *iface = this; | 53 | *iface = this; |
63 | 54 | ||
64 | if ( *iface ) | 55 | if ( *iface ) |
65 | (*iface)->addRef(); | 56 | (*iface)->addRef(); |
66 | return QS_OK; | 57 | return QS_OK; |
67 | } | 58 | } |
68 | 59 | ||
69 | Q_EXPORT_INTERFACE() | 60 | Q_EXPORT_INTERFACE() |