summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ui/todayconfigwidget.cpp9
-rw-r--r--libopie2/opiepim/ui/todayconfigwidget.h6
-rw-r--r--libopie2/opiepim/ui/todayplugininterface.h11
-rw-r--r--libopie2/opiepim/ui/ui.pro5
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
@@ -1,40 +1,40 @@
#ifndef CONFIG_WIDGET_H
#define CONFIG_WIDGET_H
#include <qwidget.h>
/**
* A base class for all Today Config Widgets.
* This will let a Today plugin to add the possibility of configuration.
* Plugins need to inherit from this class and need to implement
* the pure virtual method to control configuration.
* The Plugin should read its configuration during creation of the Widget
*
*
* @author Maximilian Reiß
* @short base class of all today config widgets
*/
class TodayConfigWidget : public QWidget {
-
+ Q_OBJECT
public:
/**
* This will construct the widget. The widget gets deleted once the parent
* gets deleted as in any Qt application
*
* @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
* Used when the config dialog is closed to write config stuff
*/
virtual void writeConfig() = 0;
};
#endif
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
@@ -59,62 +59,71 @@ public:
virtual ~TodayPluginObject() {};
/**
* The name if the plugin
* @return The plugin should return its name here
*/
virtual QString pluginName() const = 0;
/**
* Version numbering
* @return The plugin should return the version number
*/
virtual double versionNumber() const = 0;
/**
* @return the pixmap name widget?! -- FIXME
*/
virtual QString pixmapNameWidget() const = 0;
/**
* 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;
/**
* Pixmap used in the config widget
*/
virtual QString pixmapNameConfig() const = 0;
/**
* 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)
* Today will show the plugin icon. On click it tries to execute the
* plugin related application.
*/
virtual QString appName() const = 0;
/**
* If the plugin should take part in the periodic refresh
*/
virtual bool excludeFromRefresh() const = 0;
/**
* Refresh that plugins view. For updating the plugins
*/
virtual void refresh() {};
/**
* reread the plugins config and act apropiate
* This is for example used when returning from the config dialog
*/
virtual void reinitialize() {};
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
@@ -1,9 +1,10 @@
HEADERS += ui/opimmainwindow.h \
ui/opimrecurrencewidget.h \
ui/todayconfigwidget.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