-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index a37d506..2a2efd2 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp | |||
@@ -1,69 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | * mailplugin.cpp | 2 | * mailplugin.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002 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 | 17 | ||
18 | #include "mailplugin.h" | 18 | #include "mailplugin.h" |
19 | 19 | ||
20 | MailPlugin::MailPlugin() { | 20 | MailPlugin::MailPlugin() { |
21 | m_widget = 0l; | 21 | m_widget = 0l; |
22 | } | 22 | } |
23 | 23 | ||
24 | MailPlugin::~MailPlugin() { | 24 | MailPlugin::~MailPlugin() { |
25 | delete m_widget; | 25 | delete (MailPluginWidget*)m_widget; |
26 | } | 26 | } |
27 | 27 | ||
28 | QString MailPlugin::pluginName() const { | 28 | QString MailPlugin::pluginName() const { |
29 | return QObject::tr( "Mail plugin" ); | 29 | return QObject::tr( "Mail plugin" ); |
30 | } | 30 | } |
31 | 31 | ||
32 | double MailPlugin::versionNumber() const { | 32 | double MailPlugin::versionNumber() const { |
33 | return 0.6; | 33 | return 0.6; |
34 | } | 34 | } |
35 | 35 | ||
36 | QString MailPlugin::pixmapNameWidget() const { | 36 | QString MailPlugin::pixmapNameWidget() const { |
37 | return "mail/desktopicon"; | 37 | return "mail/desktopicon"; |
38 | } | 38 | } |
39 | 39 | ||
40 | QWidget* MailPlugin::widget( QWidget * wid ) { | 40 | QWidget* MailPlugin::widget( QWidget * wid ) { |
41 | if(!m_widget) { | 41 | if(!m_widget) { |
42 | m_widget = new MailPluginWidget( wid, "Datebook" ); | 42 | m_widget = new MailPluginWidget( wid, "Datebook" ); |
43 | } | 43 | } |
44 | return m_widget; | 44 | return m_widget; |
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | QString MailPlugin::pixmapNameConfig() const { | 48 | QString MailPlugin::pixmapNameConfig() const { |
49 | return 0l; | 49 | return 0l; |
50 | } | 50 | } |
51 | 51 | ||
52 | TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { | 52 | TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { |
53 | return 0l; | 53 | return 0l; |
54 | } | 54 | } |
55 | 55 | ||
56 | QString MailPlugin::appName() const { | 56 | QString MailPlugin::appName() const { |
57 | return "mail"; | 57 | return "mail"; |
58 | } | 58 | } |
59 | 59 | ||
60 | 60 | ||
61 | bool MailPlugin::excludeFromRefresh() const { | 61 | bool MailPlugin::excludeFromRefresh() const { |
62 | return false; | 62 | return false; |
63 | } | 63 | } |
64 | 64 | ||
65 | void MailPlugin::refresh() { | 65 | void MailPlugin::refresh() { |
66 | if ( m_widget ) { | 66 | if ( m_widget ) { |
67 | m_widget->refresh(); | 67 | m_widget->refresh(); |
68 | } | 68 | } |
69 | } | 69 | } |
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h index 67fac0c..a0f009b 100644 --- a/core/pim/today/plugins/mail/mailplugin.h +++ b/core/pim/today/plugins/mail/mailplugin.h | |||
@@ -1,52 +1,53 @@ | |||
1 | /* | 1 | /* |
2 | * mailplugin.h | 2 | * mailplugin.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002 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 | 17 | ||
18 | #ifndef MAIL_PLUGIN_H | 18 | #ifndef MAIL_PLUGIN_H |
19 | #define MAIL_PLUGIN_H | 19 | #define MAIL_PLUGIN_H |
20 | 20 | ||
21 | #include <qstring.h> | 21 | #include <qstring.h> |
22 | #include <qwidget.h> | 22 | #include <qwidget.h> |
23 | #include <qguardedptr.h> | ||
23 | 24 | ||
24 | #include <opie/tododb.h> | 25 | #include <opie/tododb.h> |
25 | #include <opie/oclickablelabel.h> | 26 | #include <opie/oclickablelabel.h> |
26 | 27 | ||
27 | #include <opie/todayplugininterface.h> | 28 | #include <opie/todayplugininterface.h> |
28 | #include <opie/todayconfigwidget.h> | 29 | #include <opie/todayconfigwidget.h> |
29 | 30 | ||
30 | #include "mailpluginwidget.h" | 31 | #include "mailpluginwidget.h" |
31 | 32 | ||
32 | class MailPlugin : public TodayPluginObject { | 33 | class MailPlugin : public TodayPluginObject { |
33 | 34 | ||
34 | public: | 35 | public: |
35 | MailPlugin(); | 36 | MailPlugin(); |
36 | ~MailPlugin(); | 37 | ~MailPlugin(); |
37 | 38 | ||
38 | QString pluginName() const; | 39 | QString pluginName() const; |
39 | double versionNumber() const; | 40 | double versionNumber() const; |
40 | QString pixmapNameWidget() const; | 41 | QString pixmapNameWidget() const; |
41 | QWidget* widget(QWidget *); | 42 | QWidget* widget(QWidget *); |
42 | QString pixmapNameConfig() const; | 43 | QString pixmapNameConfig() const; |
43 | TodayConfigWidget* configWidget(QWidget *); | 44 | TodayConfigWidget* configWidget(QWidget *); |
44 | QString appName() const; | 45 | QString appName() const; |
45 | bool excludeFromRefresh() const; | 46 | bool excludeFromRefresh() const; |
46 | void refresh(); | 47 | void refresh(); |
47 | 48 | ||
48 | private: | 49 | private: |
49 | MailPluginWidget *m_widget; | 50 | QGuardedPtr<MailPluginWidget> m_widget; |
50 | }; | 51 | }; |
51 | 52 | ||
52 | #endif | 53 | #endif |