author | llornkcor <llornkcor> | 2002-09-22 00:36:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-22 00:36:02 (UTC) |
commit | af1e2665f9d7b6ad8b10142e6a432fd1e6aa0c9d (patch) (unidiff) | |
tree | 1c1f388a8b2ae4f81fc60469688e851d4509312b /noncore/applets/notesapplet/notesappletimpl.cpp | |
parent | d60625b5551f26cdc35f7b2497ab538de859537d (diff) | |
download | opie-af1e2665f9d7b6ad8b10142e6a432fd1e6aa0c9d.zip opie-af1e2665f9d7b6ad8b10142e6a432fd1e6aa0c9d.tar.gz opie-af1e2665f9d7b6ad8b10142e6a432fd1e6aa0c9d.tar.bz2 |
opienotes
Diffstat (limited to 'noncore/applets/notesapplet/notesappletimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/notesapplet/notesappletimpl.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/noncore/applets/notesapplet/notesappletimpl.cpp b/noncore/applets/notesapplet/notesappletimpl.cpp new file mode 100644 index 0000000..93e1e97 --- a/dev/null +++ b/noncore/applets/notesapplet/notesappletimpl.cpp | |||
@@ -0,0 +1,50 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org> | ||
3 | ** | ||
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 | ** | ||
11 | **********************************************************************/ | ||
12 | #include "notes.h" | ||
13 | #include "notesappletimpl.h" | ||
14 | |||
15 | |||
16 | NotesAppletImpl::NotesAppletImpl() | ||
17 | : notes(0), ref(0) { | ||
18 | } | ||
19 | |||
20 | NotesAppletImpl::~NotesAppletImpl() { | ||
21 | delete notes; | ||
22 | } | ||
23 | |||
24 | QWidget *NotesAppletImpl::applet( QWidget *parent ) { | ||
25 | if ( !notes ) | ||
26 | notes = new NotesApplet( parent ); | ||
27 | return notes; | ||
28 | } | ||
29 | |||
30 | int NotesAppletImpl::position() const { | ||
31 | return 6; | ||
32 | } | ||
33 | |||
34 | QRESULT NotesAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { | ||
35 | *iface = 0; | ||
36 | if ( uuid == IID_QUnknown ) | ||
37 | *iface = this; | ||
38 | else if ( uuid == IID_TaskbarApplet ) | ||
39 | *iface = this; | ||
40 | |||
41 | if ( *iface ) | ||
42 | (*iface)->addRef(); | ||
43 | return QS_OK; | ||
44 | } | ||
45 | |||
46 | Q_EXPORT_INTERFACE() { | ||
47 | Q_CREATE_INSTANCE( NotesAppletImpl ) | ||
48 | } | ||
49 | |||
50 | |||