Diffstat (limited to 'core/applets/multikeyapplet/multikeyappletimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/multikeyapplet/multikeyappletimpl.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/core/applets/multikeyapplet/multikeyappletimpl.cpp b/core/applets/multikeyapplet/multikeyappletimpl.cpp new file mode 100644 index 0000000..4644556 --- a/dev/null +++ b/core/applets/multikeyapplet/multikeyappletimpl.cpp | |||
@@ -0,0 +1,57 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2004 Anton Kachalov mouse@altlinux.ru | ||
3 | ** All rights reserved. | ||
4 | ** | ||
5 | ** This file may be distributed and/or modified under the terms of the | ||
6 | ** GNU General Public License version 2 as published by the Free Software | ||
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
8 | ** packaging of this file. | ||
9 | ** | ||
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | ** | ||
13 | **********************************************************************/ | ||
14 | #include "multikey.h" | ||
15 | #include "multikeyappletimpl.h" | ||
16 | |||
17 | MultikeyAppletImpl::MultikeyAppletImpl() | ||
18 | : kbd(0), ref(0) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | MultikeyAppletImpl::~MultikeyAppletImpl() | ||
23 | { | ||
24 | delete kbd; | ||
25 | } | ||
26 | |||
27 | QWidget *MultikeyAppletImpl::applet( QWidget *parent ) | ||
28 | { | ||
29 | if ( !kbd ) | ||
30 | kbd = new Multikey(parent); | ||
31 | return kbd; | ||
32 | } | ||
33 | |||
34 | int MultikeyAppletImpl::position() const | ||
35 | { | ||
36 | return 10; | ||
37 | } | ||
38 | |||
39 | #ifndef QT_NO_COMPONENT | ||
40 | QRESULT MultikeyAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | ||
41 | { | ||
42 | *iface = 0; | ||
43 | if ( uuid == IID_QUnknown ) | ||
44 | *iface = this; | ||
45 | else if ( uuid == IID_TaskbarApplet ) | ||
46 | *iface = this; | ||
47 | |||
48 | if ( *iface ) | ||
49 | (*iface)->addRef(); | ||
50 | return QS_OK; | ||
51 | } | ||
52 | |||
53 | Q_EXPORT_INTERFACE() | ||
54 | { | ||
55 | Q_CREATE_INSTANCE( MultikeyAppletImpl ) | ||
56 | } | ||
57 | #endif | ||