Diffstat (limited to 'core/pim/today/plugins/datebook/datebookplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index f46806f..892a0ad 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp | |||
@@ -1,67 +1,64 @@ | |||
1 | /* | 1 | /* |
2 | * datebookplugin.cpp | 2 | * datebookplugin.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003, 2004 by Maximilian Reiß | 4 | * copyright : (c) 2002,2003, 2004 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "datebookplugin.h" | 17 | #include "datebookplugin.h" |
18 | #include "datebookpluginconfig.h" | 18 | #include "datebookpluginconfig.h" |
19 | 19 | ||
20 | 20 | ||
21 | DatebookPlugin::DatebookPlugin() { | 21 | DatebookPlugin::DatebookPlugin() { |
22 | } | 22 | } |
23 | 23 | ||
24 | DatebookPlugin::~DatebookPlugin() { | 24 | DatebookPlugin::~DatebookPlugin() { |
25 | delete (DatebookPluginWidget*)m_widget; | ||
26 | } | 25 | } |
27 | 26 | ||
28 | QString DatebookPlugin::pluginName() const { | 27 | QString DatebookPlugin::pluginName() const { |
29 | return QObject::tr( "Datebook plugin"); | 28 | return QObject::tr( "Datebook plugin"); |
30 | } | 29 | } |
31 | 30 | ||
32 | double DatebookPlugin::versionNumber() const { | 31 | double DatebookPlugin::versionNumber() const { |
33 | return 1.0; | 32 | return 1.0; |
34 | } | 33 | } |
35 | 34 | ||
36 | QString DatebookPlugin::pixmapNameWidget() const { | 35 | QString DatebookPlugin::pixmapNameWidget() const { |
37 | return "datebook/DateBook"; | 36 | return "datebook/DateBook"; |
38 | } | 37 | } |
39 | 38 | ||
40 | QWidget* DatebookPlugin::widget( QWidget* wid ) { | 39 | QWidget* DatebookPlugin::widget( QWidget* wid ) { |
41 | if(!m_widget) { | 40 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); |
42 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); | ||
43 | } | ||
44 | return m_widget; | 41 | return m_widget; |
45 | } | 42 | } |
46 | 43 | ||
47 | QString DatebookPlugin::pixmapNameConfig() const { | 44 | QString DatebookPlugin::pixmapNameConfig() const { |
48 | return "datebook/DateBook"; | 45 | return "datebook/DateBook"; |
49 | } | 46 | } |
50 | 47 | ||
51 | TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { | 48 | TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { |
52 | return new DatebookPluginConfig( wid , "Datebook" ); | 49 | return new DatebookPluginConfig( wid , "Datebook" ); |
53 | } | 50 | } |
54 | 51 | ||
55 | QString DatebookPlugin::appName() const { | 52 | QString DatebookPlugin::appName() const { |
56 | return "datebook"; | 53 | return "datebook"; |
57 | } | 54 | } |
58 | 55 | ||
59 | bool DatebookPlugin::excludeFromRefresh() const { | 56 | bool DatebookPlugin::excludeFromRefresh() const { |
60 | return false; | 57 | return false; |
61 | } | 58 | } |
62 | 59 | ||
63 | void DatebookPlugin::refresh() { | 60 | void DatebookPlugin::refresh() { |
64 | if ( m_widget ) { | 61 | if ( m_widget ) { |
65 | m_widget->refresh(); | 62 | m_widget->refresh(); |
66 | } | 63 | } |
67 | } | 64 | } |