author | eilers <eilers> | 2003-03-03 15:40:14 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-03-03 15:40:14 (UTC) |
commit | fa8d1cc0721068b814f152d60f853600e42ef6e3 (patch) (side-by-side diff) | |
tree | 53241d41ba43e79b761719ac24e5026ce824c8d0 | |
parent | 22d353f6b27e06d02f652c064083ad41ab5bf977 (diff) | |
download | opie-fa8d1cc0721068b814f152d60f853600e42ef6e3.zip opie-fa8d1cc0721068b814f152d60f853600e42ef6e3.tar.gz opie-fa8d1cc0721068b814f152d60f853600e42ef6e3.tar.bz2 |
Added refresh. Otherwise it is not updating correctly if today is running
in fastload-mode..
Is there any possibility to get a signal after resume ?
-rw-r--r-- | core/pim/today/plugins/addressbook/addressplugin.cpp | 18 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addressplugin.h | 6 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.h | 4 |
3 files changed, 21 insertions, 7 deletions
diff --git a/core/pim/today/plugins/addressbook/addressplugin.cpp b/core/pim/today/plugins/addressbook/addressplugin.cpp index b78a54c..cb1683b 100644 --- a/core/pim/today/plugins/addressbook/addressplugin.cpp +++ b/core/pim/today/plugins/addressbook/addressplugin.cpp @@ -1,63 +1,69 @@ /* * addressplugin.cpp * * copyright : (c) 2003 by Stefan Eilers * email : eilers.stefan@epost.de * * This implementation was derived from the todolist plugin implementation * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "addressplugin.h" #include "addresspluginconfig.h" -#include "addresspluginwidget.h" - -AddressBookPlugin::AddressBookPlugin() { +AddressBookPlugin::AddressBookPlugin(): + m_abWidget( 0l ) +{ } AddressBookPlugin::~AddressBookPlugin() { } QString AddressBookPlugin::pluginName() const { return QObject::tr( "AddressBook plugin" ); } double AddressBookPlugin::versionNumber() const { - return 0.1; + return 0.2; } QString AddressBookPlugin::pixmapNameWidget() const { return "AddressBook"; } QWidget* AddressBookPlugin::widget( QWidget *wid ) { - return new AddressBookPluginWidget( wid, "AddressBook" ); + m_abWidget = new AddressBookPluginWidget( wid, "AddressBook" ); + return m_abWidget; } QString AddressBookPlugin::pixmapNameConfig() const { return "AddressBook"; } TodayConfigWidget* AddressBookPlugin::configWidget( QWidget* wid ) { return new AddressBookPluginConfig( wid , "AddressBook" ); } QString AddressBookPlugin::appName() const { return "addressbook"; } bool AddressBookPlugin::excludeFromRefresh() const { - return true; + return false; +} + +void AddressBookPlugin::refresh() +{ + m_abWidget->refresh( NULL ); } diff --git a/core/pim/today/plugins/addressbook/addressplugin.h b/core/pim/today/plugins/addressbook/addressplugin.h index 5b655f5..04e4faf 100644 --- a/core/pim/today/plugins/addressbook/addressplugin.h +++ b/core/pim/today/plugins/addressbook/addressplugin.h @@ -4,41 +4,47 @@ * copyright : (c) 2003 by Stefan Eilers * email : eilers.stefan@epost.de * * This implementation was derived from the todolist plugin implementation * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef ADDRESSBOOK_PLUGIN_H #define ADDRESSBOOK_PLUGIN_H #include <qstring.h> #include <qwidget.h> #include <opie/oclickablelabel.h> #include <opie/todayplugininterface.h> +#include "addresspluginwidget.h" + class AddressBookPlugin : public TodayPluginObject { public: AddressBookPlugin(); ~AddressBookPlugin(); QString pluginName() const; double versionNumber() const; QString pixmapNameWidget() const; QWidget* widget(QWidget *); QString pixmapNameConfig() const; TodayConfigWidget* configWidget(QWidget *); QString appName() const; bool excludeFromRefresh() const; + void refresh(); + + private: + AddressBookPluginWidget* m_abWidget; }; #endif diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.h b/core/pim/today/plugins/addressbook/addresspluginwidget.h index 89ffe7f..63f2a2b 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.h +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.h @@ -14,48 +14,50 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef ADDRESSBOOK_PLUGIN_WIDGET_H #define ADDRESSBOOK_PLUGIN_WIDGET_H #include <qstring.h> #include <qwidget.h> #include <qlayout.h> #include <opie/ocontactaccess.h> #include <opie/oclickablelabel.h> class AddressBookPluginWidget : public QWidget { Q_OBJECT public: AddressBookPluginWidget( QWidget *parent, const char *name ); ~AddressBookPluginWidget(); +public slots: + void refresh( const OContactAccess* db ); + protected slots: void startAddressBook(); - void refresh( const OContactAccess* db ); private: OClickableLabel* addressLabel; QVBoxLayout* layoutTodo; OContactAccess * m_contactdb; OContactAccess::List m_list; OContactAccess::List::Iterator m_it; void readConfig(); void getAddress(); int m_maxLinesTask; int m_maxCharClip; int m_daysLookAhead; int m_urgentDays; QString m_entryColor; QString m_headlineColor; QString m_urgentColor; }; #endif |