-rw-r--r-- | core/applets/volumeapplet/volumeappletimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/volumeapplet/volumeappletimpl.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp index 80b3e74..4cbab31 100644 --- a/core/applets/volumeapplet/volumeappletimpl.cpp +++ b/core/applets/volumeapplet/volumeappletimpl.cpp | |||
@@ -1,67 +1,67 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "volume.h" | 20 | #include "volume.h" |
21 | #include "volumeappletimpl.h" | 21 | #include "volumeappletimpl.h" |
22 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
24 | 24 | ||
25 | VolumeAppletImpl::VolumeAppletImpl() | 25 | VolumeAppletImpl::VolumeAppletImpl() |
26 | : volume(0), ref(0) | 26 | : volume(0) |
27 | { | 27 | { |
28 | } | 28 | } |
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 | return volume; | 39 | return volume; |
40 | } | 40 | } |
41 | 41 | ||
42 | int VolumeAppletImpl::position() const | 42 | int VolumeAppletImpl::position() const |
43 | { | 43 | { |
44 | return 6; | 44 | return 6; |
45 | } | 45 | } |
46 | 46 | ||
47 | QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 47 | QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
48 | { | 48 | { |
49 | *iface = 0; | 49 | *iface = 0; |
50 | if ( uuid == IID_QUnknown ) | 50 | if ( uuid == IID_QUnknown ) |
51 | *iface = this; | 51 | *iface = this; |
52 | else if ( uuid == IID_TaskbarApplet ) | 52 | else if ( uuid == IID_TaskbarApplet ) |
53 | *iface = this; | 53 | *iface = this; |
54 | else | 54 | else |
55 | return QS_FALSE; | 55 | return QS_FALSE; |
56 | 56 | ||
57 | if ( *iface ) | 57 | if ( *iface ) |
58 | (*iface)->addRef(); | 58 | (*iface)->addRef(); |
59 | return QS_OK; | 59 | return QS_OK; |
60 | } | 60 | } |
61 | 61 | ||
62 | Q_EXPORT_INTERFACE() | 62 | Q_EXPORT_INTERFACE() |
63 | { | 63 | { |
64 | Q_CREATE_INSTANCE( VolumeAppletImpl ) | 64 | Q_CREATE_INSTANCE( VolumeAppletImpl ) |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||
diff --git a/core/applets/volumeapplet/volumeappletimpl.h b/core/applets/volumeapplet/volumeappletimpl.h index 9b2952a..a9221c6 100644 --- a/core/applets/volumeapplet/volumeappletimpl.h +++ b/core/applets/volumeapplet/volumeappletimpl.h | |||
@@ -1,44 +1,43 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef VOLUMEAPPLETIMPL_H | 20 | #ifndef VOLUMEAPPLETIMPL_H |
21 | #define VOLUMEAPPLETIMPL_H | 21 | #define VOLUMEAPPLETIMPL_H |
22 | 22 | ||
23 | #include <qpe/taskbarappletinterface.h> | 23 | #include <qpe/taskbarappletinterface.h> |
24 | 24 | ||
25 | class VolumeApplet; | 25 | class VolumeApplet; |
26 | 26 | ||
27 | class VolumeAppletImpl : public TaskbarAppletInterface | 27 | class VolumeAppletImpl : public TaskbarAppletInterface |
28 | { | 28 | { |
29 | public: | 29 | public: |
30 | VolumeAppletImpl(); | 30 | VolumeAppletImpl(); |
31 | virtual ~VolumeAppletImpl(); | 31 | virtual ~VolumeAppletImpl(); |
32 | 32 | ||
33 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 33 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
34 | Q_REFCOUNT | 34 | Q_REFCOUNT |
35 | 35 | ||
36 | virtual QWidget *applet( QWidget *parent ); | 36 | virtual QWidget *applet( QWidget *parent ); |
37 | virtual int position() const; | 37 | virtual int position() const; |
38 | 38 | ||
39 | private: | 39 | private: |
40 | VolumeApplet *volume; | 40 | VolumeApplet *volume; |
41 | ulong ref; | ||
42 | }; | 41 | }; |
43 | 42 | ||
44 | #endif | 43 | #endif |