author | harlekin <harlekin> | 2002-09-22 22:29:34 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-22 22:29:34 (UTC) |
commit | a26d188b7b91f9bdce1e6a44c40ce874cd50abde (patch) (side-by-side diff) | |
tree | 26a7efeca0a0778d3a96f876cb030dd414a177be | |
parent | e49230a12104b718c46a34c81b6c0e608c9d40be (diff) | |
download | opie-a26d188b7b91f9bdce1e6a44c40ce874cd50abde.zip opie-a26d188b7b91f9bdce1e6a44c40ce874cd50abde.tar.gz opie-a26d188b7b91f9bdce1e6a44c40ce874cd50abde.tar.bz2 |
interface updates
-rw-r--r-- | core/pim/today/configwidget.h | 17 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 10 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.h | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginconfig.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginconfig.h | 6 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 11 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 9 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 5 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.h | 4 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 11 | ||||
-rw-r--r-- | core/pim/today/todayconfigwidget.h | 21 | ||||
-rw-r--r-- | core/pim/today/todayplugininterface.h | 13 |
14 files changed, 49 insertions, 73 deletions
diff --git a/core/pim/today/configwidget.h b/core/pim/today/configwidget.h deleted file mode 100644 index 02ce37a..0000000 --- a/core/pim/today/configwidget.h +++ b/dev/null @@ -1,17 +0,0 @@ - -#ifndef CONFIG_WIDGET_H -#define CONFIG_WIDGET_H - - -class ConfigWidget : public QWidget { - - -public: - - ConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ; - virtual ~ConfigWidget() {}; - - virtual void writeConfig() = 0; -}; - -#endif diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index a1721f6..4ebb178 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp @@ -51,3 +51,3 @@ QString DatebookPlugin::pixmapNameConfig() const { -ConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { +TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { return new DatebookPluginConfig( wid , "Datebook" ); @@ -59,9 +59 @@ QString DatebookPlugin::appName() const { -int DatebookPlugin::minHeight() const { - return 10; -} - -int DatebookPlugin::maxHeight() const { - return 100; -} - diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h index 61dc9f3..625c7cd 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.h +++ b/core/pim/today/plugins/datebook/datebookplugin.h @@ -37,6 +37,4 @@ public: QString pixmapNameConfig() const; - ConfigWidget* configWidget( QWidget *); + TodayConfigWidget* configWidget( QWidget *); QString appName() const; - virtual int minHeight() const; - virtual int maxHeight() const; diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp index 0f60c28..606916b 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp @@ -13,3 +13,3 @@ DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) - : ConfigWidget( parent, name ) { + : TodayConfigWidget( parent, name ) { diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h index 9505a2d..99aa76c 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.h +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h @@ -4,3 +4,3 @@ -//#include <qwidget.h> + #include <qcheckbox.h> @@ -8,5 +8,5 @@ -#include "../../configwidget.h" +#include "../../todayconfigwidget.h" -class DatebookPluginConfig : public ConfigWidget { +class DatebookPluginConfig : public TodayConfigWidget { diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index 4241228..3ddf16e 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp @@ -32,3 +32,3 @@ QString MailPlugin::pluginName() const { double MailPlugin::versionNumber() const { - return 0.1; + return 0.5; } @@ -47,3 +47,3 @@ QString MailPlugin::pixmapNameConfig() const { -ConfigWidget* MailPlugin::configWidget( QWidget* wid ) { +TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) { return 0l; @@ -55,9 +55,2 @@ QString MailPlugin::appName() const { -int MailPlugin::minHeight() const { - return 10; -} - -int MailPlugin::maxHeight() const { - return 10; -} diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h index 96c73ed..a27f4c7 100644 --- a/core/pim/today/plugins/mail/mailplugin.h +++ b/core/pim/today/plugins/mail/mailplugin.h @@ -27,3 +27,3 @@ #include "../../todayplugininterface.h" -#include "../../configwidget.h" +#include "../../todayconfigwidget.h" @@ -40,6 +40,5 @@ public: QString pixmapNameConfig() const; - ConfigWidget* configWidget(QWidget *); + TodayConfigWidget* configWidget(QWidget *); QString appName() const; - virtual int minHeight() const; - virtual int maxHeight() const; + diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index 7ab27a0..19d9f37 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp @@ -49,3 +49,3 @@ QString TodolistPlugin::pixmapNameConfig() const { -ConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { +TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { return new TodolistPluginConfig( wid , "Todolist" ); @@ -57,9 +57,2 @@ QString TodolistPlugin::appName() const { -int TodolistPlugin::minHeight() const { - return 10; -} - -int TodolistPlugin::maxHeight() const { - return 100; -} diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index 7e5006f..2c03389 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h @@ -38,6 +38,5 @@ public: QString pixmapNameConfig() const; - ConfigWidget* configWidget(QWidget *); + TodayConfigWidget* configWidget(QWidget *); QString appName() const; - virtual int minHeight() const; - virtual int maxHeight() const; + }; diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index 69ad727..110b2e0 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp @@ -28,3 +28,3 @@ TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) - : ConfigWidget(parent, name ) { + : TodayConfigWidget(parent, name ) { diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index 934b319..26557d5 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h @@ -22,5 +22,5 @@ -#include "../../configwidget.h" +#include "../../todayconfigwidget.h" -class TodolistPluginConfig : public ConfigWidget { +class TodolistPluginConfig : public TodayConfigWidget { diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 7673df5..f5f88f8 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -18,3 +18,3 @@ #include "today.h" -#include "configwidget.h" +#include "todayconfigwidget.h" @@ -171,3 +171,4 @@ void Today::loadPlugins() { QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); - sv->setMinimumHeight( plugin.guiPart->minHeight() ); + // not sure if that is good .-) + sv->setMinimumHeight( 10 ); sv->setResizePolicy( QScrollView::AutoOneFit ); @@ -253,3 +254,3 @@ void Today::startConfig() { TodayPlugin plugin; - QList<ConfigWidget> configWidgetList; + QList<TodayConfigWidget> configWidgetList; @@ -260,3 +261,3 @@ void Today::startConfig() { if ( plugin.guiPart->configWidget( this ) != 0l ) { - ConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); + TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); configWidgetList.append( widget ); @@ -272,3 +273,3 @@ void Today::startConfig() { conf.writeConfig(); - ConfigWidget *confWidget; + TodayConfigWidget *confWidget; for ( confWidget = configWidgetList.first(); confWidget != 0; diff --git a/core/pim/today/todayconfigwidget.h b/core/pim/today/todayconfigwidget.h new file mode 100644 index 0000000..48cf379 --- a/dev/null +++ b/core/pim/today/todayconfigwidget.h @@ -0,0 +1,21 @@ + +#ifndef CONFIG_WIDGET_H +#define CONFIG_WIDGET_H + + +class TodayConfigWidget : public QWidget { + + +public: + + TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ; + 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/core/pim/today/todayplugininterface.h b/core/pim/today/todayplugininterface.h index 01e7d58..becb79c 100644 --- a/core/pim/today/todayplugininterface.h +++ b/core/pim/today/todayplugininterface.h @@ -5,3 +5,3 @@ #include <qpe/qcom.h> -#include "configwidget.h" +#include "todayconfigwidget.h" @@ -37,6 +37,3 @@ public: - /** - * the path and name of the identifer icon that should be shown - * in "Resource" notation, that means only subdir/picname form $QPEDIR/pics - */ + virtual QString pixmapNameWidget() const = 0; @@ -57,3 +54,3 @@ public: */ - virtual ConfigWidget* configWidget( QWidget * ) = 0; + virtual TodayConfigWidget* configWidget( QWidget * ) = 0; @@ -67,3 +64,3 @@ public: */ - virtual int minHeight() const = 0; + // virtual int minHeight() const = 0; @@ -72,3 +69,3 @@ public: */ - virtual int maxHeight() const = 0; + // virtual int maxHeight() const = 0; |