summaryrefslogtreecommitdiff
path: root/libopie2/opiepim
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ui/oholidayplugin.h6
-rw-r--r--libopie2/opiepim/ui/oholidayplugincfgwidget.cpp14
-rw-r--r--libopie2/opiepim/ui/oholidayplugincfgwidget.h30
-rw-r--r--libopie2/opiepim/ui/oholidaypluginif.h8
-rw-r--r--libopie2/opiepim/ui/ui.pro8
5 files changed, 58 insertions, 8 deletions
diff --git a/libopie2/opiepim/ui/oholidayplugin.h b/libopie2/opiepim/ui/oholidayplugin.h
index 52db0eb..192a020 100644
--- a/libopie2/opiepim/ui/oholidayplugin.h
+++ b/libopie2/opiepim/ui/oholidayplugin.h
@@ -4,14 +4,17 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qdatetime.h>
#include <qmap.h>
+#include <qwidget.h>
class EffectiveEvent;
namespace Opie {
namespace Datebook {
+class HolidayPluginConfigWidget;
+
class HolidayPlugin
{
public:
HolidayPlugin(){};
@@ -20,10 +23,11 @@ public:
virtual QStringList entries(const QDate&)=0;
virtual QStringList entries(unsigned year, unsigned month, unsigned day)=0;
virtual QMap<QDate,QStringList> entries(const QDate&,const QDate&)=0;
virtual QValueList<EffectiveEvent> events(const QDate&,const QDate&)=0;
-};
+ virtual HolidayPluginConfigWidget*configWidget(QWidget *parent=0, const char *name = 0, QWidget::WFlags fl = 0 ){return 0;}
+};
}
}
#endif
diff --git a/libopie2/opiepim/ui/oholidayplugincfgwidget.cpp b/libopie2/opiepim/ui/oholidayplugincfgwidget.cpp
new file mode 100644
index 0000000..43380bb
--- a/dev/null
+++ b/libopie2/opiepim/ui/oholidayplugincfgwidget.cpp
@@ -0,0 +1,14 @@
+#include "oholidayplugincfgwidget.h"
+
+namespace Opie {
+namespace Datebook {
+HolidayPluginConfigWidget::HolidayPluginConfigWidget( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{}
+
+HolidayPluginConfigWidget::~HolidayPluginConfigWidget()
+{}
+
+}
+}
+
diff --git a/libopie2/opiepim/ui/oholidayplugincfgwidget.h b/libopie2/opiepim/ui/oholidayplugincfgwidget.h
new file mode 100644
index 0000000..17af467
--- a/dev/null
+++ b/libopie2/opiepim/ui/oholidayplugincfgwidget.h
@@ -0,0 +1,30 @@
+#ifndef _HOLIDAY_PLUGIN_CFG_WIDGET
+#define _HOLIDAY_PLUGIN_CFG_WIDGET
+#include <qwidget.h>
+
+namespace Opie {
+namespace Datebook {
+class HolidayPluginConfigWidget:public QWidget
+{
+ Q_OBJECT
+public:
+ /**
+ * This will construct the widget. The widget gets deleted once the parent
+ * gets deleted as in any Qt application
+ *
+ * A Parent is required!
+ *
+ * @param parent The parent of the widget
+ * @param name The name of the object
+ */
+ HolidayPluginConfigWidget(QWidget *parent, const char *name = 0, WFlags fl = 0 );
+ virtual ~HolidayPluginConfigWidget();
+
+ virtual void saveConfig()=0;
+};
+
+}
+}
+
+#endif
+
diff --git a/libopie2/opiepim/ui/oholidaypluginif.h b/libopie2/opiepim/ui/oholidaypluginif.h
index 825d3ad..618d371 100644
--- a/libopie2/opiepim/ui/oholidaypluginif.h
+++ b/libopie2/opiepim/ui/oholidaypluginif.h
@@ -3,10 +3,10 @@
#include <opie2/odebug.h>
#include <qpe/qcom.h>
#ifndef QT_NO_COMPONENT
-//017f90d4-34fc-4dc5-aed7-498c6da6571e
-#define IID_HOLIDAY_PLUGIN QUuid(0x017f90d4,0x34fc,0x4dc5,0xae,0xd7,0x49,0x8c,0x6d,0xa6,0x57,0x1e)
+//c0a5f73f-975e-4492-9285-af555284c4ab
+#define IID_HOLIDAY_PLUGIN QUuid(0xc0a5f73f,0x975e,0x4492,0x92,0x85,0xaf,0x55,0x52,0x84,0xc4,0xab)
#endif
namespace Opie {
namespace Datebook {
@@ -17,9 +17,9 @@ class HolidayPluginIf:public QUnknownInterface
{
public:
HolidayPluginIf():QUnknownInterface(){}
virtual ~HolidayPluginIf(){}
-
+
virtual HolidayPlugin*plugin()=0;
};
template<class T> class HolidayPluginWrapper:public HolidayPluginIf
@@ -28,9 +28,8 @@ public:
HolidayPluginWrapper():HolidayPluginIf(),_plugin(0){}
virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;}
QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) {
- odebug << "HolidayPluginWrapper::queryInterface()" << oendl;
*iface = 0;
if (uuid == IID_HOLIDAY_PLUGIN || uuid == IID_QUnknown) {
*iface = this;
} else {
@@ -54,9 +53,8 @@ protected:
#define EXPORT_HOLIDAY_PLUGIN( Plugin ) \
Q_EXPORT_INTERFACE() { \
Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \
}
-
}
}
#endif
diff --git a/libopie2/opiepim/ui/ui.pro b/libopie2/opiepim/ui/ui.pro
index 53c7ae2..97c8d81 100644
--- a/libopie2/opiepim/ui/ui.pro
+++ b/libopie2/opiepim/ui/ui.pro
@@ -1,10 +1,14 @@
HEADERS += ui/opimmainwindow.h \
ui/opimrecurrencewidget.h \
ui/todayconfigwidget.h \
- ui/todayplugininterface.h
+ ui/todayplugininterface.h \
+ ui/oholidayplugin.h \
+ ui/oholidayplugincfgwidget.h \
+ ui/oholidaypluginif.h
SOURCES += ui/opimmainwindow.cpp \
ui/opimrecurrencewidget.cpp \
- ui/todayconfigwidget.cpp
+ ui/todayconfigwidget.cpp \
+ ui/oholidayplugincfgwidget.cpp
INTERFACES += ui/opimrecurrencebase.ui