summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-05-13 20:03:14 (UTC)
committer kergoth <kergoth>2003-05-13 20:03:14 (UTC)
commit2c26bb12add88b531ef49f725d0c48f421cb4d83 (patch) (side-by-side diff)
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 @@
+#include "today.h"
+#include <qwidget.h>
+#include <qcombobox.h>
+#include <oappplugin.h>
+
+#define Q_BASEINSTANCE( i ) \
+ QUnknownInterface* iface = 0; \
+ i->queryInterface( IID_QUnknown, &iface ); \
+ return iface
+
+Q_EXPORT_INTERFACE()
+{
+ Today *t = new Today;
+ t->setCaption( Today::tr("Today") );
+ OAppPlugin *comp = new OAppPlugin(t);
+ Q_BASEINSTANCE( comp );
+}
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,19 +1,18 @@
-TEMPLATE = app
CONFIG = qt warn_on
#CONFIG = qt warn_on release
+
HEADERS = today.h todaybase.h todayconfig.h
-SOURCES = main.cpp today.cpp todaybase.cpp todayconfig.cpp
+SOURCES = today.cpp todaybase.cpp todayconfig.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
INTERFACES =
TARGET = today
-DESTDIR = $(OPIEDIR)/bin
TRANSLATIONS = ../../../i18n/de/today.ts \
../../../i18n/nl/today.ts \
../../../i18n/xx/today.ts \
../../../i18n/en/today.ts \
../../../i18n/es/today.ts \
../../../i18n/fr/today.ts \
../../../i18n/hu/today.ts \
@@ -24,11 +23,24 @@ TRANSLATIONS = ../../../i18n/de/today.ts \
../../../i18n/pt/today.ts \
../../../i18n/pt_BR/today.ts \
../../../i18n/sl/today.ts \
../../../i18n/zh_CN/today.ts \
../../../i18n/zh_TW/today.ts \
../../../i18n/it/today.ts \
../../../i18n/da/today.ts
+include ( $(OPIEDIR)/include.pro )
+oapp {
+ TEMPLATE = lib
+ SOURCES += plugin.cpp
+ LIBS += -loapp
-include ( $(OPIEDIR)/include.pro )
+ DESTDIR = $(OPIEDIR)/plugins/app
+ INCLUDEPATH += $(OPIEDIR)/core/apps/oapp
+ DEPENDPATH += $(OPIEDIR)/core/apps/oapp
+}
+else {
+ TEMPLATE = app
+ SOURCES += main.cpp
+ DESTDIR = $(OPIEDIR)/bin
+}