From bbb3cdf8f91d567f6c2e786bd144b64bd679ff9a Mon Sep 17 00:00:00 2001 From: harlekin Date: Mon, 10 Feb 2003 21:28:14 +0000 Subject: adapted to new refresh, datebookplugin still need some work --- (limited to 'core/pim/today/plugins/todolist/todoplugin.cpp') diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index b5abbd3..1238f92 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp @@ -18,13 +18,14 @@ #include "todoplugin.h" #include "todopluginconfig.h" -#include "todopluginwidget.h" TodolistPlugin::TodolistPlugin() { + m_widget = 0l; } TodolistPlugin::~TodolistPlugin() { + delete m_widget; } QString TodolistPlugin::pluginName() const { @@ -32,7 +33,7 @@ QString TodolistPlugin::pluginName() const { } double TodolistPlugin::versionNumber() const { - return 0.8; + return 0.9; } QString TodolistPlugin::pixmapNameWidget() const { @@ -40,7 +41,10 @@ QString TodolistPlugin::pixmapNameWidget() const { } QWidget* TodolistPlugin::widget( QWidget *wid ) { - return new TodolistPluginWidget( wid, "Todolist" ); + if(!m_widget) { + m_widget = new TodolistPluginWidget( wid, "Todolist" ); + } + return m_widget; } QString TodolistPlugin::pixmapNameConfig() const { @@ -59,3 +63,9 @@ QString TodolistPlugin::appName() const { bool TodolistPlugin::excludeFromRefresh() const { return false; } + +void TodolistPlugin::refresh() { + if ( m_widget ) { + m_widget->refresh(); + } +} -- cgit v0.9.0.2