Diffstat (limited to 'core/pim/today/plugins/datebook/datebookplugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index eda84be..2ac7d01 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp | |||
@@ -19,14 +19,15 @@ | |||
19 | 19 | ||
20 | #include "datebookevent.h" | 20 | #include "datebookevent.h" |
21 | #include "datebookplugin.h" | 21 | #include "datebookplugin.h" |
22 | #include "datebookpluginwidget.h" | ||
23 | #include "datebookpluginconfig.h" | 22 | #include "datebookpluginconfig.h" |
24 | 23 | ||
25 | 24 | ||
26 | DatebookPlugin::DatebookPlugin() { | 25 | DatebookPlugin::DatebookPlugin() { |
26 | m_widget = 0; | ||
27 | } | 27 | } |
28 | 28 | ||
29 | DatebookPlugin::~DatebookPlugin() { | 29 | DatebookPlugin::~DatebookPlugin() { |
30 | delete m_widget; | ||
30 | } | 31 | } |
31 | 32 | ||
32 | QString DatebookPlugin::pluginName() const { | 33 | QString DatebookPlugin::pluginName() const { |
@@ -42,7 +43,10 @@ QString DatebookPlugin::pixmapNameWidget() const { | |||
42 | } | 43 | } |
43 | 44 | ||
44 | QWidget* DatebookPlugin::widget( QWidget* wid ) { | 45 | QWidget* DatebookPlugin::widget( QWidget* wid ) { |
45 | return new DatebookPluginWidget( wid, "Datebook" ); | 46 | if(!m_widget) { |
47 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); | ||
48 | } | ||
49 | return m_widget; | ||
46 | } | 50 | } |
47 | 51 | ||
48 | QString DatebookPlugin::pixmapNameConfig() const { | 52 | QString DatebookPlugin::pixmapNameConfig() const { |
@@ -60,3 +64,9 @@ QString DatebookPlugin::appName() const { | |||
60 | bool DatebookPlugin::excludeFromRefresh() const { | 64 | bool DatebookPlugin::excludeFromRefresh() const { |
61 | return false; | 65 | return false; |
62 | } | 66 | } |
67 | |||
68 | void DatebookPlugin::refresh() { | ||
69 | if ( m_widget ) { | ||
70 | m_widget->refresh(); | ||
71 | } | ||
72 | } | ||