summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/configwidget.h17
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp10
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.h4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp2
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h6
-rw-r--r--core/pim/today/plugins/mail/mailplugin.cpp11
-rw-r--r--core/pim/today/plugins/mail/mailplugin.h7
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp9
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.h5
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.cpp2
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.h4
-rw-r--r--core/pim/today/today.cpp11
-rw-r--r--core/pim/today/todayconfigwidget.h21
-rw-r--r--core/pim/today/todayplugininterface.h13
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
@@ -46,22 +46,14 @@ QWidget* DatebookPlugin::widget( QWidget* wid ) {
}
QString DatebookPlugin::pixmapNameConfig() const {
return "DateBook";
}
-ConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) {
+TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) {
return new DatebookPluginConfig( wid , "Datebook" );
}
QString DatebookPlugin::appName() const {
return QObject::tr( "Datebook" );
}
-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
@@ -32,15 +32,13 @@ public:
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget( QWidget *);
QString pixmapNameConfig() const;
- ConfigWidget* configWidget( QWidget *);
+ TodayConfigWidget* configWidget( QWidget *);
QString appName() const;
- virtual int minHeight() const;
- virtual int maxHeight() const;
};
#endif
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
@@ -8,13 +8,13 @@
#include <qtoolbutton.h>
#include <qlabel.h>
#include <qhbox.h>
#include <qvbox.h>
DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name)
- : ConfigWidget( parent, name ) {
+ : TodayConfigWidget( parent, name ) {
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 20 );
QHBox *box1 = new QHBox( this );
QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" );
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
@@ -1,17 +1,17 @@
#ifndef DATEBOOK_PLUGIN_CONFIG_H
#define DATEBOOK_PLUGIN_CONFIG_H
-//#include <qwidget.h>
+
#include <qcheckbox.h>
#include <qspinbox.h>
-#include "../../configwidget.h"
+#include "../../todayconfigwidget.h"
-class DatebookPluginConfig : public ConfigWidget {
+class DatebookPluginConfig : public TodayConfigWidget {
public:
DatebookPluginConfig( QWidget *parent, const char *name );
~DatebookPluginConfig();
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
@@ -27,13 +27,13 @@ MailPlugin::~MailPlugin() {
QString MailPlugin::pluginName() const {
return "Mail plugin";
}
double MailPlugin::versionNumber() const {
- return 0.1;
+ return 0.5;
}
QString MailPlugin::pixmapNameWidget() const {
return "mail/desktopicon";
}
@@ -42,22 +42,15 @@ QWidget* MailPlugin::widget( QWidget * wid ) {
}
QString MailPlugin::pixmapNameConfig() const {
return 0l;
}
-ConfigWidget* MailPlugin::configWidget( QWidget* wid ) {
+TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) {
return 0l;
}
QString MailPlugin::appName() const {
return "Mail";
}
-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
@@ -22,27 +22,26 @@
#include <qwidget.h>
#include <opie/tododb.h>
#include <opie/oclickablelabel.h>
#include "../../todayplugininterface.h"
-#include "../../configwidget.h"
+#include "../../todayconfigwidget.h"
class MailPlugin : public TodayPluginObject {
public:
MailPlugin();
~MailPlugin();
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget(QWidget *);
QString pixmapNameConfig() const;
- ConfigWidget* configWidget(QWidget *);
+ TodayConfigWidget* configWidget(QWidget *);
QString appName() const;
- virtual int minHeight() const;
- virtual int maxHeight() const;
+
};
#endif
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
@@ -44,22 +44,15 @@ QWidget* TodolistPlugin::widget( QWidget *wid ) {
}
QString TodolistPlugin::pixmapNameConfig() const {
return "TodoList";
}
-ConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) {
+TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) {
return new TodolistPluginConfig( wid , "Todolist" );
}
QString TodolistPlugin::appName() const {
return QObject::tr( "Todolist" );
}
-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
@@ -33,13 +33,12 @@ public:
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget(QWidget *);
QString pixmapNameConfig() const;
- ConfigWidget* configWidget(QWidget *);
+ TodayConfigWidget* configWidget(QWidget *);
QString appName() const;
- virtual int minHeight() const;
- virtual int maxHeight() const;
+
};
#endif
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
@@ -23,13 +23,13 @@
#include <qtoolbutton.h>
#include <qlabel.h>
TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name)
- : ConfigWidget(parent, name ) {
+ : TodayConfigWidget(parent, name ) {
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 20 );
QHBox *box1 = new QHBox( this );
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
@@ -17,15 +17,15 @@
#ifndef TODOLIST_PLUGIN_CONFIG_H
#define TODOLIST_PLUGIN_CONFIG_H
#include <qwidget.h>
#include <qspinbox.h>
-#include "../../configwidget.h"
+#include "../../todayconfigwidget.h"
-class TodolistPluginConfig : public ConfigWidget {
+class TodolistPluginConfig : public TodayConfigWidget {
public:
TodolistPluginConfig( QWidget *parent, const char *name );
~TodolistPluginConfig();
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
@@ -13,13 +13,13 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include "today.h"
-#include "configwidget.h"
+#include "todayconfigwidget.h"
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
@@ -166,13 +166,14 @@ void Today::loadPlugins() {
plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 );
OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
plugIcon->setPixmap( plugPix );
// a scrollview for each plugin
QScrollView* sv = new QScrollView( plugin.guiBox );
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 );
sv->setHScrollBarMode( QScrollView::AlwaysOff );
sv->setFrameShape( QFrame::NoFrame );
sv->addChild( plugWidget );
// make sure the icon is on the top alligned
boxLayout->addWidget( plugIcon, 0, AlignTop );
@@ -248,32 +249,32 @@ void Today::draw() {
*/
void Today::startConfig() {
TodayConfig conf( this, "dialog", true );
TodayPlugin plugin;
- QList<ConfigWidget> configWidgetList;
+ QList<TodayConfigWidget> configWidgetList;
for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) {
plugin = pluginList[i];
// load the config widgets in the tabs
if ( plugin.guiPart->configWidget( this ) != 0l ) {
- ConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 );
+ TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 );
configWidgetList.append( widget );
conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig()
, plugin.guiPart->appName() );
}
// set the order/activate tab
conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(),
Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) );
}
if ( conf.exec() == QDialog::Accepted ) {
conf.writeConfig();
- ConfigWidget *confWidget;
+ TodayConfigWidget *confWidget;
for ( confWidget = configWidgetList.first(); confWidget != 0;
confWidget = configWidgetList.next() ) {
confWidget->writeConfig();
}
refresh();
}
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
@@ -1,12 +1,12 @@
#ifndef TODAY_PLUGIN_INTERFACE
#define TODAY_PLUGIN_INTERFACE
#include <qpe/qcom.h>
-#include "configwidget.h"
+#include "todayconfigwidget.h"
class QString;
class QWidget;
#ifndef IID_TodayPluginInterface
#define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14)
@@ -32,16 +32,13 @@ public:
/**
* Version numbering
*/
virtual double versionNumber() const = 0;
- /**
- * 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;
/** widget for the today view
* It _needs_ a parent here.
*/
virtual QWidget* widget( QWidget * ) = 0;
@@ -52,28 +49,28 @@ public:
virtual QString pixmapNameConfig() const = 0;
/**
* Config plugin widget - optional
* If the plugin has a config widget, it _needs_ a parent here.
*/
- virtual ConfigWidget* configWidget( QWidget * ) = 0;
+ virtual TodayConfigWidget* configWidget( QWidget * ) = 0;
/**
* The application that should be assigned to the button (pixmap)
*/
virtual QString appName() const = 0;
/**
* minimum height the plugin at least should have
*/
- virtual int minHeight() const = 0;
+ // virtual int minHeight() const = 0;
/**
* maximum height that should be used before starting scrolling
*/
- virtual int maxHeight() const = 0;
+ // virtual int maxHeight() const = 0;
};
struct TodayPluginInterface : public QUnknownInterface {
virtual TodayPluginObject *guiPart() = 0;