-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 @@ -17,35 +17,36 @@ ***************************************************************************/ #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"; } @@ -56,8 +57,13 @@ TodayConfigWidget* AddressBookPlugin::configWidget( QWidget* wid ) { 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 @@ -22,12 +22,14 @@ #include <qstring.h> #include <qwidget.h> #include <opie/oclickablelabel.h> #include <opie/todayplugininterface.h> +#include "addresspluginwidget.h" + class AddressBookPlugin : public TodayPluginObject { public: AddressBookPlugin(); ~AddressBookPlugin(); @@ -36,9 +38,13 @@ public: 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 @@ -32,15 +32,17 @@ 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; |