summaryrefslogtreecommitdiff
path: root/core/pim/datebook/holiday
authoralwin <alwin>2005-03-16 13:14:26 (UTC)
committer alwin <alwin>2005-03-16 13:14:26 (UTC)
commit3d43b9e40e562957e1a3fcbe9268634db45951ce (patch) (side-by-side diff)
tree637f67a6768f6a90e7834b96100f6c70bb66950b /core/pim/datebook/holiday
parent4fef85eb55dbef5f8546caee084e4f0ce51081d3 (diff)
downloadopie-3d43b9e40e562957e1a3fcbe9268634db45951ce.zip
opie-3d43b9e40e562957e1a3fcbe9268634db45951ce.tar.gz
opie-3d43b9e40e562957e1a3fcbe9268634db45951ce.tar.bz2
ho.
in dayview a holiday will displayed (if plugin found) generated a straight forward dummy-holiday-plugin for testing the stuff.
Diffstat (limited to 'core/pim/datebook/holiday') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/holiday/dummy/config.in8
-rw-r--r--core/pim/datebook/holiday/dummy/dummy.pro20
-rw-r--r--core/pim/datebook/holiday/dummy/dummyholiday.cpp20
-rw-r--r--core/pim/datebook/holiday/dummy/dummyholiday.h19
4 files changed, 67 insertions, 0 deletions
diff --git a/core/pim/datebook/holiday/dummy/config.in b/core/pim/datebook/holiday/dummy/config.in
new file mode 100644
index 0000000..caa90bc
--- a/dev/null
+++ b/core/pim/datebook/holiday/dummy/config.in
@@ -0,0 +1,8 @@
+ config DATEBOOK_DUMMY_HOLIDAY
+ boolean "opie-datebook-dummyholidayplugin"
+ default "n"
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM
+
+ comment "opie-datebook-dummyholidayplugin requires libopie2core, libopie2ui, libopie2pim"
+ depends !( ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM )
+
diff --git a/core/pim/datebook/holiday/dummy/dummy.pro b/core/pim/datebook/holiday/dummy/dummy.pro
new file mode 100644
index 0000000..768bb77
--- a/dev/null
+++ b/core/pim/datebook/holiday/dummy/dummy.pro
@@ -0,0 +1,20 @@
+TEMPLATE = lib
+CONFIG -= moc
+CONFIG += qt plugin
+
+# Input
+HEADERS = dummyholiday.h
+SOURCES = dummyholiday.cpp
+INTERFACES=
+
+INCLUDEPATH += $(OPIEDIR)/include \
+ ../ ../library
+DEPENDPATH += $(OPIEDIR)/include \
+ ../ ../library
+
+LIBS+= -lqpe -lopiecore2 -lopieui2
+
+DESTDIR = $(OPIEDIR)/plugins/datebook/holiday
+TARGET = dummyholidayplugin
+
+include( $(OPIEDIR)/include.pro )
diff --git a/core/pim/datebook/holiday/dummy/dummyholiday.cpp b/core/pim/datebook/holiday/dummy/dummyholiday.cpp
new file mode 100644
index 0000000..dd00b9b
--- a/dev/null
+++ b/core/pim/datebook/holiday/dummy/dummyholiday.cpp
@@ -0,0 +1,20 @@
+#include "dummyholiday.h"
+
+#include <qobject.h>
+
+QString DummyHoliday::description()
+{
+ return QObject::tr("Test holiday plugin","dummyholiday");
+}
+
+QStringList DummyHoliday::entries(const QDate&aDate)
+{
+ return entries(0,0,aDate.day());
+}
+
+QStringList DummyHoliday::entries(unsigned year, unsigned month, unsigned day)
+{
+ QStringList ret;
+ if (day%2==0) ret.append(QObject::tr("You have a holiday!","dummyholiday"));
+ return ret;
+}
diff --git a/core/pim/datebook/holiday/dummy/dummyholiday.h b/core/pim/datebook/holiday/dummy/dummyholiday.h
new file mode 100644
index 0000000..9b28f24
--- a/dev/null
+++ b/core/pim/datebook/holiday/dummy/dummyholiday.h
@@ -0,0 +1,19 @@
+#ifndef __DUMMY_HOLIDAY_H
+#define __DUMMY_HOLIDAY_H
+
+#include <opie2/oholidayplugin.h>
+#include <opie2/oholidaypluginif.h>
+
+class DummyHoliday:public Opie::Datebook::HolidayPlugin
+{
+public:
+ DummyHoliday():Opie::Datebook::HolidayPlugin(){}
+ virtual ~DummyHoliday(){}
+
+ virtual QString description();
+ virtual QStringList entries(const QDate&);
+ virtual QStringList entries(unsigned year, unsigned month, unsigned day);
+};
+
+EXPORT_HOLIDAY_PLUGIN(DummyHoliday);
+#endif