summaryrefslogtreecommitdiff
path: root/examples/todayplugin/examplepluginimpl.cpp
Unidiff
Diffstat (limited to 'examples/todayplugin/examplepluginimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/todayplugin/examplepluginimpl.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/todayplugin/examplepluginimpl.cpp b/examples/todayplugin/examplepluginimpl.cpp
new file mode 100644
index 0000000..9ab6164
--- a/dev/null
+++ b/examples/todayplugin/examplepluginimpl.cpp
@@ -0,0 +1,48 @@
1/*
2 * examplepluginimpl.cpp
3 *
4 * copyright : (c) 2004 by Maximilian Reiß
5 * email : harlekin@handhelds.org
6 *
7 */
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17
18
19#include "exampleplugin.h"
20#include "examplepluginimpl.h"
21
22ExamplePluginImpl::ExamplePluginImpl() {
23 examplePlugin = new ExamplePlugin();
24}
25
26ExamplePluginImpl::~ExamplePluginImpl() {
27 delete examplePlugin;
28}
29
30
31TodayPluginObject* ExamplePluginImpl::guiPart() {
32 return examplePlugin;
33}
34
35QRESULT ExamplePluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) {
36 *iface = 0;
37 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) {
38 *iface = this, (*iface)->addRef();
39 }else
40 return QS_FALSE;
41
42 return QS_OK;
43
44}
45
46Q_EXPORT_INTERFACE() {
47 Q_CREATE_INSTANCE( ExamplePluginImpl );
48}