author | alwin <alwin> | 2005-03-18 16:57:24 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-18 16:57:24 (UTC) |
commit | 977193cc46768da220ddb01aca74286b28e6b7ee (patch) (side-by-side diff) | |
tree | eff59fc4011b0b3a6fd610b2b04e934eb21a0687 /libopie2/opiepim | |
parent | f32b76432aeb554204f06ca15ed1ec8d5387fb12 (diff) | |
download | opie-977193cc46768da220ddb01aca74286b28e6b7ee.zip opie-977193cc46768da220ddb01aca74286b28e6b7ee.tar.gz opie-977193cc46768da220ddb01aca74286b28e6b7ee.tar.bz2 |
work on plugins finished.
these plugins now may have a config-widget (sorry guys - I had to change the
plugininterface and so the UUID again.)
the plugin for nationalholidays now has such a widget, the datebook will insert
configwidgets into its settingsdialog.
corrected the .pro file of opiepim2/ui so it contains the header/cpp files
for that pluginsystem.
-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 @@ -7,2 +7,3 @@ #include <qmap.h> +#include <qwidget.h> @@ -13,2 +14,4 @@ namespace Datebook { +class HolidayPluginConfigWidget; + class HolidayPlugin @@ -23,4 +26,5 @@ public: 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;} +}; } 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 @@ -6,4 +6,4 @@ #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 @@ -20,3 +20,3 @@ public: virtual ~HolidayPluginIf(){} - + virtual HolidayPlugin*plugin()=0; @@ -31,3 +31,2 @@ public: QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) { - odebug << "HolidayPluginWrapper::queryInterface()" << oendl; *iface = 0; @@ -57,3 +56,2 @@ protected: } - } 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 @@ -3,3 +3,6 @@ HEADERS += ui/opimmainwindow.h \ ui/todayconfigwidget.h \ - ui/todayplugininterface.h + ui/todayplugininterface.h \ + ui/oholidayplugin.h \ + ui/oholidayplugincfgwidget.h \ + ui/oholidaypluginif.h @@ -7,3 +10,4 @@ SOURCES += ui/opimmainwindow.cpp \ ui/opimrecurrencewidget.cpp \ - ui/todayconfigwidget.cpp + ui/todayconfigwidget.cpp \ + ui/oholidayplugincfgwidget.cpp |