-rw-r--r-- | libopie2/opiepim/ui/oholidayplugin.h | 6 | ||||
-rw-r--r-- | libopie2/opiepim/ui/oholidayplugincfgwidget.cpp | 14 | ||||
-rw-r--r-- | libopie2/opiepim/ui/oholidayplugincfgwidget.h | 30 | ||||
-rw-r--r-- | libopie2/opiepim/ui/oholidaypluginif.h | 8 | ||||
-rw-r--r-- | libopie2/opiepim/ui/ui.pro | 8 |
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 | |||
@@ -5,12 +5,15 @@ | |||
5 | #include <qstringlist.h> | 5 | #include <qstringlist.h> |
6 | #include <qdatetime.h> | 6 | #include <qdatetime.h> |
7 | #include <qmap.h> | 7 | #include <qmap.h> |
8 | #include <qwidget.h> | ||
8 | 9 | ||
9 | class EffectiveEvent; | 10 | class EffectiveEvent; |
10 | 11 | ||
11 | namespace Opie { | 12 | namespace Opie { |
12 | namespace Datebook { | 13 | namespace Datebook { |
13 | 14 | ||
15 | class HolidayPluginConfigWidget; | ||
16 | |||
14 | class HolidayPlugin | 17 | class HolidayPlugin |
15 | { | 18 | { |
16 | public: | 19 | public: |
@@ -21,8 +24,9 @@ public: | |||
21 | virtual QStringList entries(unsigned year, unsigned month, unsigned day)=0; | 24 | virtual QStringList entries(unsigned year, unsigned month, unsigned day)=0; |
22 | virtual QMap<QDate,QStringList> entries(const QDate&,const QDate&)=0; | 25 | virtual QMap<QDate,QStringList> entries(const QDate&,const QDate&)=0; |
23 | virtual QValueList<EffectiveEvent> events(const QDate&,const QDate&)=0; | 26 | virtual QValueList<EffectiveEvent> events(const QDate&,const QDate&)=0; |
24 | }; | ||
25 | 27 | ||
28 | virtual HolidayPluginConfigWidget*configWidget(QWidget *parent=0, const char *name = 0, QWidget::WFlags fl = 0 ){return 0;} | ||
29 | }; | ||
26 | } | 30 | } |
27 | } | 31 | } |
28 | #endif | 32 | #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 @@ | |||
1 | #include "oholidayplugincfgwidget.h" | ||
2 | |||
3 | namespace Opie { | ||
4 | namespace Datebook { | ||
5 | HolidayPluginConfigWidget::HolidayPluginConfigWidget( QWidget* parent, const char* name, WFlags fl ) | ||
6 | : QWidget( parent, name, fl ) | ||
7 | {} | ||
8 | |||
9 | HolidayPluginConfigWidget::~HolidayPluginConfigWidget() | ||
10 | {} | ||
11 | |||
12 | } | ||
13 | } | ||
14 | |||
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 @@ | |||
1 | #ifndef _HOLIDAY_PLUGIN_CFG_WIDGET | ||
2 | #define _HOLIDAY_PLUGIN_CFG_WIDGET | ||
3 | #include <qwidget.h> | ||
4 | |||
5 | namespace Opie { | ||
6 | namespace Datebook { | ||
7 | class HolidayPluginConfigWidget:public QWidget | ||
8 | { | ||
9 | Q_OBJECT | ||
10 | public: | ||
11 | /** | ||
12 | * This will construct the widget. The widget gets deleted once the parent | ||
13 | * gets deleted as in any Qt application | ||
14 | * | ||
15 | * A Parent is required! | ||
16 | * | ||
17 | * @param parent The parent of the widget | ||
18 | * @param name The name of the object | ||
19 | */ | ||
20 | HolidayPluginConfigWidget(QWidget *parent, const char *name = 0, WFlags fl = 0 ); | ||
21 | virtual ~HolidayPluginConfigWidget(); | ||
22 | |||
23 | virtual void saveConfig()=0; | ||
24 | }; | ||
25 | |||
26 | } | ||
27 | } | ||
28 | |||
29 | #endif | ||
30 | |||
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 | |||
@@ -4,8 +4,8 @@ | |||
4 | #include <qpe/qcom.h> | 4 | #include <qpe/qcom.h> |
5 | 5 | ||
6 | #ifndef QT_NO_COMPONENT | 6 | #ifndef QT_NO_COMPONENT |
7 | //017f90d4-34fc-4dc5-aed7-498c6da6571e | 7 | //c0a5f73f-975e-4492-9285-af555284c4ab |
8 | #define IID_HOLIDAY_PLUGIN QUuid(0x017f90d4,0x34fc,0x4dc5,0xae,0xd7,0x49,0x8c,0x6d,0xa6,0x57,0x1e) | 8 | #define IID_HOLIDAY_PLUGIN QUuid(0xc0a5f73f,0x975e,0x4492,0x92,0x85,0xaf,0x55,0x52,0x84,0xc4,0xab) |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | namespace Opie { | 11 | namespace Opie { |
@@ -18,7 +18,7 @@ class HolidayPluginIf:public QUnknownInterface | |||
18 | public: | 18 | public: |
19 | HolidayPluginIf():QUnknownInterface(){} | 19 | HolidayPluginIf():QUnknownInterface(){} |
20 | virtual ~HolidayPluginIf(){} | 20 | virtual ~HolidayPluginIf(){} |
21 | 21 | ||
22 | virtual HolidayPlugin*plugin()=0; | 22 | virtual HolidayPlugin*plugin()=0; |
23 | }; | 23 | }; |
24 | 24 | ||
@@ -29,7 +29,6 @@ public: | |||
29 | virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;} | 29 | virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;} |
30 | 30 | ||
31 | QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) { | 31 | QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) { |
32 | odebug << "HolidayPluginWrapper::queryInterface()" << oendl; | ||
33 | *iface = 0; | 32 | *iface = 0; |
34 | if (uuid == IID_HOLIDAY_PLUGIN || uuid == IID_QUnknown) { | 33 | if (uuid == IID_HOLIDAY_PLUGIN || uuid == IID_QUnknown) { |
35 | *iface = this; | 34 | *iface = this; |
@@ -55,7 +54,6 @@ protected: | |||
55 | Q_EXPORT_INTERFACE() { \ | 54 | Q_EXPORT_INTERFACE() { \ |
56 | Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \ | 55 | Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \ |
57 | } | 56 | } |
58 | |||
59 | } | 57 | } |
60 | } | 58 | } |
61 | #endif | 59 | #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 @@ | |||
1 | HEADERS += ui/opimmainwindow.h \ | 1 | HEADERS += ui/opimmainwindow.h \ |
2 | ui/opimrecurrencewidget.h \ | 2 | ui/opimrecurrencewidget.h \ |
3 | ui/todayconfigwidget.h \ | 3 | ui/todayconfigwidget.h \ |
4 | ui/todayplugininterface.h | 4 | ui/todayplugininterface.h \ |
5 | ui/oholidayplugin.h \ | ||
6 | ui/oholidayplugincfgwidget.h \ | ||
7 | ui/oholidaypluginif.h | ||
5 | 8 | ||
6 | SOURCES += ui/opimmainwindow.cpp \ | 9 | SOURCES += ui/opimmainwindow.cpp \ |
7 | ui/opimrecurrencewidget.cpp \ | 10 | ui/opimrecurrencewidget.cpp \ |
8 | ui/todayconfigwidget.cpp | 11 | ui/todayconfigwidget.cpp \ |
12 | ui/oholidayplugincfgwidget.cpp | ||
9 | 13 | ||
10 | INTERFACES += ui/opimrecurrencebase.ui | 14 | INTERFACES += ui/opimrecurrencebase.ui |