author | zecke <zecke> | 2004-09-12 20:27:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-12 20:27:35 (UTC) |
commit | 00952f16786dcd069820e45df83a00b6c477893b (patch) (side-by-side diff) | |
tree | ceb7ec8add37ea596c4953eab704ec24890cbb31 /libopie2/opiepim | |
parent | b78e2e2486cdb69a173cb6ff1910c69f5381d850 (diff) | |
download | opie-00952f16786dcd069820e45df83a00b6c477893b.zip opie-00952f16786dcd069820e45df83a00b6c477893b.tar.gz opie-00952f16786dcd069820e45df83a00b6c477893b.tar.bz2 |
-Define ownership of widget and configwidget
-Implement C'tor and D'tor of TodayConfigWidget
-rw-r--r-- | libopie2/opiepim/ui/todayconfigwidget.cpp | 9 | ||||
-rw-r--r-- | libopie2/opiepim/ui/todayconfigwidget.h | 6 | ||||
-rw-r--r-- | libopie2/opiepim/ui/todayplugininterface.h | 11 | ||||
-rw-r--r-- | libopie2/opiepim/ui/ui.pro | 5 |
4 files changed, 25 insertions, 6 deletions
diff --git a/libopie2/opiepim/ui/todayconfigwidget.cpp b/libopie2/opiepim/ui/todayconfigwidget.cpp new file mode 100644 index 0000000..cc98556 --- a/dev/null +++ b/libopie2/opiepim/ui/todayconfigwidget.cpp @@ -0,0 +1,9 @@ +#include "todayconfigwidget.h" + + +TodayConfigWidget::TodayConfigWidget( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{} + +TodayConfigWidget::~TodayConfigWidget() +{} diff --git a/libopie2/opiepim/ui/todayconfigwidget.h b/libopie2/opiepim/ui/todayconfigwidget.h index 134fbdf..5048998 100644 --- a/libopie2/opiepim/ui/todayconfigwidget.h +++ b/libopie2/opiepim/ui/todayconfigwidget.h @@ -16,7 +16,7 @@ * @short base class of all today config widgets */ class TodayConfigWidget : public QWidget { - + Q_OBJECT public: @@ -27,8 +27,8 @@ public: * @param parent The parent of the widget * @param name The name of the object */ - TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ; - virtual ~TodayConfigWidget() {}; + TodayConfigWidget( QWidget *parent, const char *name = 0, WFlags fl = 0 ); + virtual ~TodayConfigWidget(); /** * Plugins need to reimplement this in the config widget diff --git a/libopie2/opiepim/ui/todayplugininterface.h b/libopie2/opiepim/ui/todayplugininterface.h index 5dfeaa8..2b7f1e5 100644 --- a/libopie2/opiepim/ui/todayplugininterface.h +++ b/libopie2/opiepim/ui/todayplugininterface.h @@ -80,6 +80,12 @@ public: * widget for the today view * It _needs_ a parent here. * Plugin authors need to take parent as parent! + * + * Note that you always need to create a new QWidget + * on this call and the ownership is transfered to the + * caller. + * + * @param The parent of your to be created widget */ virtual QWidget* widget( QWidget *parent ) = 0; @@ -92,8 +98,11 @@ public: * Config plugin widget - optional * If the plugin has a config widget, it _needs_ a parent here. * may return 0 if no config widget is needed + * + * Note: Always create a new Widget on this call and ownership + * is transfered */ - virtual TodayConfigWidget* configWidget( QWidget * ) = 0; + virtual TodayConfigWidget* configWidget( QWidget *parent ) = 0; /** * The application that should be assigned to the button (pixmap) diff --git a/libopie2/opiepim/ui/ui.pro b/libopie2/opiepim/ui/ui.pro index 6aa01a7..53c7ae2 100644 --- a/libopie2/opiepim/ui/ui.pro +++ b/libopie2/opiepim/ui/ui.pro @@ -4,6 +4,7 @@ HEADERS += ui/opimmainwindow.h \ ui/todayplugininterface.h SOURCES += ui/opimmainwindow.cpp \ - ui/opimrecurrencewidget.cpp + ui/opimrecurrencewidget.cpp \ + ui/todayconfigwidget.cpp -INTERFACES += ui/opimrecurrencebase.ui
\ No newline at end of file +INTERFACES += ui/opimrecurrencebase.ui |