summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-05-13 20:03:14 (UTC)
committer kergoth <kergoth>2003-05-13 20:03:14 (UTC)
commit2c26bb12add88b531ef49f725d0c48f421cb4d83 (patch) (unidiff)
tree5d29b6f022eba93fea101745f3711a15ed464f14
parent4dd58bba07b8bf3a52c3a0464675c39cc5153c85 (diff)
downloadopie-2c26bb12add88b531ef49f725d0c48f421cb4d83.zip
opie-2c26bb12add88b531ef49f725d0c48f421cb4d83.tar.gz
opie-2c26bb12add88b531ef49f725d0c48f421cb4d83.tar.bz2
Example of the use of new plugin interface, disabled by default.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugin.cpp17
-rw-r--r--core/pim/today/today.pro20
2 files changed, 33 insertions, 4 deletions
diff --git a/core/pim/today/plugin.cpp b/core/pim/today/plugin.cpp
new file mode 100644
index 0000000..349413b
--- a/dev/null
+++ b/core/pim/today/plugin.cpp
@@ -0,0 +1,17 @@
1#include "today.h"
2#include <qwidget.h>
3#include <qcombobox.h>
4#include <oappplugin.h>
5
6#define Q_BASEINSTANCE( i ) \
7 QUnknownInterface* iface = 0; \
8 i->queryInterface( IID_QUnknown, &iface ); \
9 return iface
10
11Q_EXPORT_INTERFACE()
12{
13 Today *t = new Today;
14 t->setCaption( Today::tr("Today") );
15 OAppPlugin *comp = new OAppPlugin(t);
16 Q_BASEINSTANCE( comp );
17}
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro
index f93b5bf..218cab8 100644
--- a/core/pim/today/today.pro
+++ b/core/pim/today/today.pro
@@ -1,14 +1,13 @@
1 TEMPLATE= app
2 CONFIG = qt warn_on 1 CONFIG = qt warn_on
3 #CONFIG = qt warn_on release 2 #CONFIG = qt warn_on release
3
4 HEADERS = today.h todaybase.h todayconfig.h 4 HEADERS = today.h todaybase.h todayconfig.h
5 SOURCES = main.cpp today.cpp todaybase.cpp todayconfig.cpp 5 SOURCES = today.cpp todaybase.cpp todayconfig.cpp
6 INCLUDEPATH+= $(OPIEDIR)/include 6 INCLUDEPATH+= $(OPIEDIR)/include
7 DEPENDPATH+= $(OPIEDIR)/include 7 DEPENDPATH+= $(OPIEDIR)/include
8LIBS += -lqpe -lopie 8LIBS += -lqpe -lopie
9 INTERFACES= 9 INTERFACES=
10 TARGET = today 10 TARGET = today
11 DESTDIR = $(OPIEDIR)/bin
12 11
13TRANSLATIONS = ../../../i18n/de/today.ts \ 12TRANSLATIONS = ../../../i18n/de/today.ts \
14 ../../../i18n/nl/today.ts \ 13 ../../../i18n/nl/today.ts \
@@ -29,6 +28,19 @@ TRANSLATIONS = ../../../i18n/de/today.ts \
29 ../../../i18n/it/today.ts \ 28 ../../../i18n/it/today.ts \
30 ../../../i18n/da/today.ts 29 ../../../i18n/da/today.ts
31 30
31include ( $(OPIEDIR)/include.pro )
32 32
33oapp {
34 TEMPLATE= lib
35 SOURCES += plugin.cpp
36 LIBS += -loapp
33 37
34include ( $(OPIEDIR)/include.pro ) 38 DESTDIR = $(OPIEDIR)/plugins/app
39 INCLUDEPATH+= $(OPIEDIR)/core/apps/oapp
40 DEPENDPATH+= $(OPIEDIR)/core/apps/oapp
41}
42else {
43 TEMPLATE= app
44 SOURCES += main.cpp
45 DESTDIR = $(OPIEDIR)/bin
46}