author | zecke <zecke> | 2004-09-12 20:28:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-12 20:28:36 (UTC) |
commit | 90aaa298cc69522e88e1f81ade7d5259131b1544 (patch) (unidiff) | |
tree | 86bdb0a2bb94938754ba94f2ded9dc6ec5fb5207 | |
parent | 00952f16786dcd069820e45df83a00b6c477893b (diff) | |
download | opie-90aaa298cc69522e88e1f81ade7d5259131b1544.zip opie-90aaa298cc69522e88e1f81ade7d5259131b1544.tar.gz opie-90aaa298cc69522e88e1f81ade7d5259131b1544.tar.bz2 |
Follow the defined Ownership and have a maybe not needed
sanity check
-rw-r--r-- | core/pim/today/plugins/addressbook/addressplugin.cpp | 6 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.h | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookevent.h | 1 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.h | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 5 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 9 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 2 | ||||
-rw-r--r-- | examples/todayplugin/exampleplugin.cpp | 10 | ||||
-rw-r--r-- | examples/todayplugin/exampleplugin.h | 8 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortuneplugin.cpp | 2 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortuneplugin.h | 3 |
13 files changed, 22 insertions, 44 deletions
diff --git a/core/pim/today/plugins/addressbook/addressplugin.cpp b/core/pim/today/plugins/addressbook/addressplugin.cpp index 5d5d34c..263a0c5 100644 --- a/core/pim/today/plugins/addressbook/addressplugin.cpp +++ b/core/pim/today/plugins/addressbook/addressplugin.cpp | |||
@@ -1,74 +1,76 @@ | |||
1 | /* | 1 | /* |
2 | * addressplugin.cpp | 2 | * addressplugin.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2003 by Stefan Eilers | 4 | * copyright : (c) 2003 by Stefan Eilers |
5 | * email : eilers.stefan@epost.de | 5 | * email : eilers.stefan@epost.de |
6 | * | 6 | * |
7 | * This implementation was derived from the todolist plugin implementation | 7 | * This implementation was derived from the todolist plugin implementation |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*************************************************************************** | 10 | /*************************************************************************** |
11 | * * | 11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * | 12 | * This program is free software; you can redistribute it and/or modify * |
13 | * it under the terms of the GNU General Public License as published by * | 13 | * it under the terms of the GNU General Public License as published by * |
14 | * the Free Software Foundation; either version 2 of the License, or * | 14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | 19 | ||
20 | 20 | ||
21 | #include "addressplugin.h" | 21 | #include "addressplugin.h" |
22 | #include "addresspluginconfig.h" | 22 | #include "addresspluginconfig.h" |
23 | 23 | ||
24 | AddressBookPlugin::AddressBookPlugin(): | 24 | AddressBookPlugin::AddressBookPlugin(): |
25 | m_abWidget( 0l ) | 25 | m_abWidget( 0l ) |
26 | { | 26 | { |
27 | } | 27 | } |
28 | 28 | ||
29 | AddressBookPlugin::~AddressBookPlugin() { | 29 | AddressBookPlugin::~AddressBookPlugin() { |
30 | } | 30 | } |
31 | 31 | ||
32 | QString AddressBookPlugin::pluginName() const { | 32 | QString AddressBookPlugin::pluginName() const { |
33 | return QObject::tr( "AddressBook plugin" ); | 33 | return QObject::tr( "AddressBook plugin" ); |
34 | } | 34 | } |
35 | 35 | ||
36 | double AddressBookPlugin::versionNumber() const { | 36 | double AddressBookPlugin::versionNumber() const { |
37 | return 0.3; | 37 | return 0.3; |
38 | } | 38 | } |
39 | 39 | ||
40 | QString AddressBookPlugin::pixmapNameWidget() const { | 40 | QString AddressBookPlugin::pixmapNameWidget() const { |
41 | return "addressbook/AddressBook"; | 41 | return "addressbook/AddressBook"; |
42 | } | 42 | } |
43 | 43 | ||
44 | QWidget* AddressBookPlugin::widget( QWidget *wid ) { | 44 | QWidget* AddressBookPlugin::widget( QWidget *wid ) { |
45 | m_abWidget = new AddressBookPluginWidget( wid, "AddressBook" ); | 45 | m_abWidget = new AddressBookPluginWidget( wid, "AddressBook" ); |
46 | return m_abWidget; | 46 | return m_abWidget; |
47 | } | 47 | } |
48 | 48 | ||
49 | QString AddressBookPlugin::pixmapNameConfig() const { | 49 | QString AddressBookPlugin::pixmapNameConfig() const { |
50 | return "addressbook/AddressBook"; | 50 | return "addressbook/AddressBook"; |
51 | } | 51 | } |
52 | 52 | ||
53 | TodayConfigWidget* AddressBookPlugin::configWidget( QWidget* wid ) { | 53 | TodayConfigWidget* AddressBookPlugin::configWidget( QWidget* wid ) { |
54 | return new AddressBookPluginConfig( wid , "AddressBook" ); | 54 | return new AddressBookPluginConfig( wid , "AddressBook" ); |
55 | } | 55 | } |
56 | 56 | ||
57 | QString AddressBookPlugin::appName() const { | 57 | QString AddressBookPlugin::appName() const { |
58 | return "addressbook"; | 58 | return "addressbook"; |
59 | } | 59 | } |
60 | 60 | ||
61 | 61 | ||
62 | bool AddressBookPlugin::excludeFromRefresh() const { | 62 | bool AddressBookPlugin::excludeFromRefresh() const { |
63 | return false; | 63 | return false; |
64 | } | 64 | } |
65 | 65 | ||
66 | void AddressBookPlugin::refresh() | 66 | void AddressBookPlugin::refresh() |
67 | { | 67 | { |
68 | m_abWidget->refresh( NULL ); | 68 | if(m_abWidget) |
69 | m_abWidget->refresh( 0l ); | ||
69 | } | 70 | } |
70 | 71 | ||
71 | void AddressBookPlugin::reinitialize() | 72 | void AddressBookPlugin::reinitialize() |
72 | { | 73 | { |
73 | m_abWidget->reinitialize(); | 74 | if(m_abWidget) |
75 | m_abWidget->reinitialize(); | ||
74 | } | 76 | } |
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.h b/core/pim/today/plugins/addressbook/addresspluginwidget.h index 25b3098..b42f252 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.h +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.h | |||
@@ -1,65 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | * addresspluginwidget.h | 2 | * addresspluginwidget.h |
3 | * | 3 | * |
4 | * copyright : (c) 2003 by Stefan Eilers | 4 | * copyright : (c) 2003 by Stefan Eilers |
5 | * email : eilers.stefan@epost.de | 5 | * email : eilers.stefan@epost.de |
6 | * | 6 | * |
7 | * This implementation was derived from the todolist plugin implementation | 7 | * This implementation was derived from the todolist plugin implementation |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*************************************************************************** | 10 | /*************************************************************************** |
11 | * * | 11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * | 12 | * This program is free software; you can redistribute it and/or modify * |
13 | * it under the terms of the GNU General Public License as published by * | 13 | * it under the terms of the GNU General Public License as published by * |
14 | * the Free Software Foundation; either version 2 of the License, or * | 14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | #ifndef ADDRESSBOOK_PLUGIN_WIDGET_H | 19 | #ifndef ADDRESSBOOK_PLUGIN_WIDGET_H |
20 | #define ADDRESSBOOK_PLUGIN_WIDGET_H | 20 | #define ADDRESSBOOK_PLUGIN_WIDGET_H |
21 | 21 | ||
22 | #include <opie2/ocontactaccess.h> | 22 | #include <opie2/ocontactaccess.h> |
23 | #include <opie2/oclickablelabel.h> | 23 | #include <opie2/oclickablelabel.h> |
24 | 24 | ||
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | 28 | ||
29 | 29 | ||
30 | class AddressBookPluginWidget : public QWidget { | 30 | class AddressBookPluginWidget : public QWidget { |
31 | Q_OBJECT | 31 | Q_OBJECT |
32 | 32 | ||
33 | public: | 33 | public: |
34 | AddressBookPluginWidget( QWidget *parent, const char *name ); | 34 | AddressBookPluginWidget( QWidget *parent, const char *name ); |
35 | ~AddressBookPluginWidget(); | 35 | ~AddressBookPluginWidget(); |
36 | 36 | ||
37 | void reinitialize(); | ||
38 | public slots: | 37 | public slots: |
38 | void reinitialize(); | ||
39 | void refresh( const Opie::OPimContactAccess* db ); | 39 | void refresh( const Opie::OPimContactAccess* db ); |
40 | 40 | ||
41 | protected slots: | 41 | protected slots: |
42 | void startAddressBook(); | 42 | void startAddressBook(); |
43 | 43 | ||
44 | private: | 44 | private: |
45 | Opie::Ui::OClickableLabel* addressLabel; | 45 | Opie::Ui::OClickableLabel* addressLabel; |
46 | QVBoxLayout* layoutTodo; | 46 | QVBoxLayout* layoutTodo; |
47 | Opie::OPimContactAccess * m_contactdb; | 47 | Opie::OPimContactAccess * m_contactdb; |
48 | 48 | ||
49 | Opie::OPimContactAccess::List m_list; | 49 | Opie::OPimContactAccess::List m_list; |
50 | Opie::OPimContactAccess::List::Iterator m_it; | 50 | Opie::OPimContactAccess::List::Iterator m_it; |
51 | 51 | ||
52 | void readConfig(); | 52 | void readConfig(); |
53 | void getAddress(); | 53 | void getAddress(); |
54 | int m_maxLinesTask; | 54 | int m_maxLinesTask; |
55 | int m_maxCharClip; | 55 | int m_maxCharClip; |
56 | int m_daysLookAhead; | 56 | int m_daysLookAhead; |
57 | int m_urgentDays; | 57 | int m_urgentDays; |
58 | QString m_entryColor; | 58 | QString m_entryColor; |
59 | QString m_headlineColor; | 59 | QString m_headlineColor; |
60 | QString m_urgentColor; | 60 | QString m_urgentColor; |
61 | bool m_showBirthdays; | 61 | bool m_showBirthdays; |
62 | bool m_showAnniversaries; | 62 | bool m_showAnniversaries; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | #endif | 65 | #endif |
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h index 973efe4..7a5843f 100644 --- a/core/pim/today/plugins/datebook/datebookevent.h +++ b/core/pim/today/plugins/datebook/datebookevent.h | |||
@@ -1,55 +1,54 @@ | |||
1 | /* | 1 | /* |
2 | * datebookplugin.h | 2 | * datebookplugin.h |
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 | #ifndef DATEBOOKEVENT_PLUGIN_H | 17 | #ifndef DATEBOOKEVENT_PLUGIN_H |
18 | #define DATEBOOKEVENT_PLUGIN_H | 18 | #define DATEBOOKEVENT_PLUGIN_H |
19 | 19 | ||
20 | #include <opie2/oclickablelabel.h> | 20 | #include <opie2/oclickablelabel.h> |
21 | 21 | ||
22 | #include <qpe/datebookdb.h> | 22 | #include <qpe/datebookdb.h> |
23 | 23 | ||
24 | 24 | ||
25 | class DateBookEvent: public Opie::Ui::OClickableLabel { | 25 | class DateBookEvent: public Opie::Ui::OClickableLabel { |
26 | |||
27 | Q_OBJECT | 26 | Q_OBJECT |
28 | 27 | ||
29 | public: | 28 | public: |
30 | DateBookEvent( const EffectiveEvent &ev, | 29 | DateBookEvent( const EffectiveEvent &ev, |
31 | QWidget* parent = 0, | 30 | QWidget* parent = 0, |
32 | bool show_location = 0, | 31 | bool show_location = 0, |
33 | bool show_notes = 0, | 32 | bool show_notes = 0, |
34 | bool timeExtraLine = 0, | 33 | bool timeExtraLine = 0, |
35 | int maxCharClip = 0, | 34 | int maxCharClip = 0, |
36 | const char* name = 0, | 35 | const char* name = 0, |
37 | WFlags fl = 0 ); | 36 | WFlags fl = 0 ); |
38 | ~DateBookEvent(); | 37 | ~DateBookEvent(); |
39 | 38 | ||
40 | signals: | 39 | signals: |
41 | void editEvent( const Event &e ); | 40 | void editEvent( const Event &e ); |
42 | 41 | ||
43 | private slots: | 42 | private slots: |
44 | void editEventSlot( const Event &e ); | 43 | void editEventSlot( const Event &e ); |
45 | void editMe(); | 44 | void editMe(); |
46 | 45 | ||
47 | private: | 46 | private: |
48 | 47 | ||
49 | QString ampmTime( QTime ); | 48 | QString ampmTime( QTime ); |
50 | QString differDate( QDate date ); | 49 | QString differDate( QDate date ); |
51 | const EffectiveEvent event; | 50 | const EffectiveEvent event; |
52 | bool ampm; | 51 | bool ampm; |
53 | }; | 52 | }; |
54 | 53 | ||
55 | #endif | 54 | #endif |
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,74 +1,71 @@ | |||
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 | } |
68 | 65 | ||
69 | void DatebookPlugin::reinitialize() { | 66 | void DatebookPlugin::reinitialize() { |
70 | if ( m_widget ) { | 67 | if ( m_widget ) { |
71 | m_widget->reinitialize(); | 68 | m_widget->reinitialize(); |
72 | } | 69 | } |
73 | } | 70 | } |
74 | 71 | ||
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h index 631d6a3..990c413 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.h +++ b/core/pim/today/plugins/datebook/datebookplugin.h | |||
@@ -1,49 +1,47 @@ | |||
1 | /* | 1 | /* |
2 | * datebookplugin.h | 2 | * datebookplugin.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003 by Maximilian Reiß | 4 | * copyright : (c) 2002,2003 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 | #ifndef DATEBOOK_PLUGIN_H | 17 | #ifndef DATEBOOK_PLUGIN_H |
18 | #define DATEBOOK_PLUGIN_H | 18 | #define DATEBOOK_PLUGIN_H |
19 | 19 | ||
20 | #include "datebookpluginwidget.h" | 20 | #include "datebookpluginwidget.h" |
21 | 21 | ||
22 | #include <opie2/oclickablelabel.h> | 22 | #include <opie2/oclickablelabel.h> |
23 | #include <opie2/todayplugininterface.h> | 23 | #include <opie2/todayplugininterface.h> |
24 | 24 | ||
25 | #include <qguardedptr.h> | ||
26 | |||
27 | class DatebookPlugin : public TodayPluginObject { | 25 | class DatebookPlugin : public TodayPluginObject { |
28 | 26 | ||
29 | public: | 27 | public: |
30 | DatebookPlugin(); | 28 | DatebookPlugin(); |
31 | ~DatebookPlugin(); | 29 | ~DatebookPlugin(); |
32 | 30 | ||
33 | QString pluginName() const; | 31 | QString pluginName() const; |
34 | double versionNumber() const; | 32 | double versionNumber() const; |
35 | QString pixmapNameWidget() const; | 33 | QString pixmapNameWidget() const; |
36 | QWidget* widget( QWidget *); | 34 | QWidget* widget( QWidget *); |
37 | QString pixmapNameConfig() const; | 35 | QString pixmapNameConfig() const; |
38 | TodayConfigWidget* configWidget( QWidget *); | 36 | TodayConfigWidget* configWidget( QWidget *); |
39 | QString appName() const; | 37 | QString appName() const; |
40 | bool excludeFromRefresh() const; | 38 | bool excludeFromRefresh() const; |
41 | void refresh(); | 39 | void refresh(); |
42 | void reinitialize(); | 40 | void reinitialize(); |
43 | 41 | ||
44 | private: | 42 | private: |
45 | QGuardedPtr<DatebookPluginWidget> m_widget; | 43 | DatebookPluginWidget *m_widget; |
46 | }; | 44 | }; |
47 | 45 | ||
48 | 46 | ||
49 | #endif | 47 | #endif |
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index b30d2a2..f590ebb 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | * mailplugin.cpp | 2 | * mailplugin.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 | 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 (MailPluginWidget*)m_widget; | ||
26 | } | 25 | } |
27 | 26 | ||
28 | QString MailPlugin::pluginName() const { | 27 | QString MailPlugin::pluginName() const { |
29 | return QObject::tr( "Mail plugin" ); | 28 | return QObject::tr( "Mail plugin" ); |
30 | } | 29 | } |
31 | 30 | ||
32 | double MailPlugin::versionNumber() const { | 31 | double MailPlugin::versionNumber() const { |
33 | return 0.6; | 32 | return 0.6; |
34 | } | 33 | } |
35 | 34 | ||
36 | QString MailPlugin::pixmapNameWidget() const { | 35 | QString MailPlugin::pixmapNameWidget() const { |
37 | return "opiemail/desktopicon"; | 36 | return "opiemail/desktopicon"; |
38 | } | 37 | } |
39 | 38 | ||
40 | QWidget* MailPlugin::widget( QWidget * wid ) { | 39 | QWidget* MailPlugin::widget( QWidget * wid ) { |
41 | if(!m_widget) { | 40 | m_widget = new MailPluginWidget( wid, "Datebook" ); |
42 | m_widget = new MailPluginWidget( wid, "Datebook" ); | ||
43 | } | ||
44 | return m_widget; | 41 | return m_widget; |
45 | } | 42 | } |
46 | 43 | ||
47 | 44 | ||
48 | QString MailPlugin::pixmapNameConfig() const { | 45 | QString MailPlugin::pixmapNameConfig() const { |
49 | return 0l; | 46 | return 0l; |
50 | } | 47 | } |
51 | 48 | ||
52 | TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { | 49 | TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { |
53 | return 0l; | 50 | return 0l; |
54 | } | 51 | } |
55 | 52 | ||
56 | QString MailPlugin::appName() const { | 53 | QString MailPlugin::appName() const { |
57 | return "opiemail"; | 54 | return "opiemail"; |
58 | } | 55 | } |
59 | 56 | ||
60 | 57 | ||
61 | bool MailPlugin::excludeFromRefresh() const { | 58 | bool MailPlugin::excludeFromRefresh() const { |
62 | return false; | 59 | return false; |
63 | } | 60 | } |
64 | 61 | ||
65 | void MailPlugin::refresh() { | 62 | void MailPlugin::refresh() { |
66 | if ( m_widget ) { | 63 | if ( m_widget ) { |
67 | m_widget->refresh(); | 64 | m_widget->refresh(); |
68 | } | 65 | } |
69 | } | 66 | } |
70 | 67 | ||
71 | void MailPlugin::reinitialize() { | 68 | void MailPlugin::reinitialize() { |
72 | } | 69 | } |
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h index 1edffef..1e694bc 100644 --- a/core/pim/today/plugins/mail/mailplugin.h +++ b/core/pim/today/plugins/mail/mailplugin.h | |||
@@ -1,53 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | * mailplugin.h | 2 | * mailplugin.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2004 by Maximilian Reiß | 4 | * copyright : (c) 2002,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 | 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 "mailpluginwidget.h" | 21 | #include "mailpluginwidget.h" |
22 | 22 | ||
23 | #include <opie2/todayplugininterface.h> | 23 | #include <opie2/todayplugininterface.h> |
24 | #include <opie2/todayconfigwidget.h> | 24 | #include <opie2/todayconfigwidget.h> |
25 | 25 | ||
26 | #include <qwidget.h> | ||
27 | #include <qguardedptr.h> | ||
28 | |||
29 | |||
30 | |||
31 | 26 | ||
32 | class MailPlugin : public TodayPluginObject { | 27 | class MailPlugin : public TodayPluginObject { |
33 | 28 | ||
34 | public: | 29 | public: |
35 | MailPlugin(); | 30 | MailPlugin(); |
36 | ~MailPlugin(); | 31 | ~MailPlugin(); |
37 | 32 | ||
38 | QString pluginName() const; | 33 | QString pluginName() const; |
39 | double versionNumber() const; | 34 | double versionNumber() const; |
40 | QString pixmapNameWidget() const; | 35 | QString pixmapNameWidget() const; |
41 | QWidget* widget(QWidget *); | 36 | QWidget* widget(QWidget *); |
42 | QString pixmapNameConfig() const; | 37 | QString pixmapNameConfig() const; |
43 | TodayConfigWidget* configWidget(QWidget *); | 38 | TodayConfigWidget* configWidget(QWidget *); |
44 | QString appName() const; | 39 | QString appName() const; |
45 | bool excludeFromRefresh() const; | 40 | bool excludeFromRefresh() const; |
46 | void refresh(); | 41 | void refresh(); |
47 | void reinitialize(); | 42 | void reinitialize(); |
48 | 43 | ||
49 | private: | 44 | private: |
50 | QGuardedPtr<MailPluginWidget> m_widget; | 45 | MailPluginWidget* m_widget; |
51 | }; | 46 | }; |
52 | 47 | ||
53 | #endif | 48 | #endif |
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index 5783814..6cfcbe0 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp | |||
@@ -1,73 +1,72 @@ | |||
1 | /* | 1 | /* |
2 | * todoplugin.cpp | 2 | * todoplugin.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 "todoplugin.h" | 17 | #include "todoplugin.h" |
18 | #include "todopluginconfig.h" | 18 | #include "todopluginconfig.h" |
19 | 19 | ||
20 | TodolistPlugin::TodolistPlugin() { | 20 | TodolistPlugin::TodolistPlugin() |
21 | : m_widget(0l) | ||
22 | { | ||
21 | } | 23 | } |
22 | 24 | ||
23 | TodolistPlugin::~TodolistPlugin() { | 25 | TodolistPlugin::~TodolistPlugin() { |
24 | delete (TodolistPluginWidget*)m_widget; | ||
25 | } | 26 | } |
26 | 27 | ||
27 | QString TodolistPlugin::pluginName() const { | 28 | QString TodolistPlugin::pluginName() const { |
28 | return QObject::tr( "Todolist plugin" ); | 29 | return QObject::tr( "Todolist plugin" ); |
29 | } | 30 | } |
30 | 31 | ||
31 | double TodolistPlugin::versionNumber() const { | 32 | double TodolistPlugin::versionNumber() const { |
32 | return 0.9; | 33 | return 0.9; |
33 | } | 34 | } |
34 | 35 | ||
35 | QString TodolistPlugin::pixmapNameWidget() const { | 36 | QString TodolistPlugin::pixmapNameWidget() const { |
36 | return "todo/TodoList"; | 37 | return "todo/TodoList"; |
37 | } | 38 | } |
38 | 39 | ||
39 | QWidget* TodolistPlugin::widget( QWidget *wid ) { | 40 | QWidget* TodolistPlugin::widget( QWidget *wid ) { |
40 | if(!m_widget) { | 41 | m_widget = new TodolistPluginWidget( wid, "Todolist" ); |
41 | m_widget = new TodolistPluginWidget( wid, "Todolist" ); | ||
42 | } | ||
43 | return m_widget; | 42 | return m_widget; |
44 | } | 43 | } |
45 | 44 | ||
46 | QString TodolistPlugin::pixmapNameConfig() const { | 45 | QString TodolistPlugin::pixmapNameConfig() const { |
47 | return "todo/TodoList"; | 46 | return "todo/TodoList"; |
48 | } | 47 | } |
49 | 48 | ||
50 | TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { | 49 | TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { |
51 | return new TodolistPluginConfig( wid , "Todolist" ); | 50 | return new TodolistPluginConfig( wid , "Todolist" ); |
52 | } | 51 | } |
53 | 52 | ||
54 | QString TodolistPlugin::appName() const { | 53 | QString TodolistPlugin::appName() const { |
55 | return "todolist"; | 54 | return "todolist"; |
56 | } | 55 | } |
57 | 56 | ||
58 | 57 | ||
59 | bool TodolistPlugin::excludeFromRefresh() const { | 58 | bool TodolistPlugin::excludeFromRefresh() const { |
60 | return false; | 59 | return false; |
61 | } | 60 | } |
62 | 61 | ||
63 | void TodolistPlugin::refresh() { | 62 | void TodolistPlugin::refresh() { |
64 | if ( m_widget ) { | 63 | if ( m_widget ) { |
65 | m_widget->refresh(); | 64 | m_widget->refresh(); |
66 | } | 65 | } |
67 | } | 66 | } |
68 | 67 | ||
69 | void TodolistPlugin::reinitialize() { | 68 | void TodolistPlugin::reinitialize() { |
70 | if ( m_widget ) { | 69 | if ( m_widget ) { |
71 | m_widget->reinitialize(); | 70 | m_widget->reinitialize(); |
72 | } | 71 | } |
73 | } | 72 | } |
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index 976dbf7..6add53e 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h | |||
@@ -1,52 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | * todoplugin.h | 2 | * todoplugin.h |
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 | #ifndef TODOLIST_PLUGIN_H | 17 | #ifndef TODOLIST_PLUGIN_H |
18 | #define TODOLIST_PLUGIN_H | 18 | #define TODOLIST_PLUGIN_H |
19 | 19 | ||
20 | 20 | ||
21 | #include "todopluginwidget.h" | 21 | #include "todopluginwidget.h" |
22 | 22 | ||
23 | #include <opie2/oclickablelabel.h> | 23 | #include <opie2/oclickablelabel.h> |
24 | #include <opie2/todayplugininterface.h> | 24 | #include <opie2/todayplugininterface.h> |
25 | 25 | ||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qguardedptr.h> | 27 | #include <qguardedptr.h> |
28 | #include <qwidget.h> | 28 | #include <qwidget.h> |
29 | 29 | ||
30 | 30 | ||
31 | class TodolistPlugin : public TodayPluginObject { | 31 | class TodolistPlugin : public TodayPluginObject { |
32 | 32 | ||
33 | public: | 33 | public: |
34 | TodolistPlugin(); | 34 | TodolistPlugin(); |
35 | ~TodolistPlugin(); | 35 | ~TodolistPlugin(); |
36 | 36 | ||
37 | QString pluginName() const; | 37 | QString pluginName() const; |
38 | double versionNumber() const; | 38 | double versionNumber() const; |
39 | QString pixmapNameWidget() const; | 39 | QString pixmapNameWidget() const; |
40 | QWidget* widget(QWidget *); | 40 | QWidget* widget(QWidget *); |
41 | QString pixmapNameConfig() const; | 41 | QString pixmapNameConfig() const; |
42 | TodayConfigWidget* configWidget(QWidget *); | 42 | TodayConfigWidget* configWidget(QWidget *); |
43 | QString appName() const; | 43 | QString appName() const; |
44 | bool excludeFromRefresh() const; | 44 | bool excludeFromRefresh() const; |
45 | void refresh(); | 45 | void refresh(); |
46 | void reinitialize(); | 46 | void reinitialize(); |
47 | 47 | ||
48 | private: | 48 | private: |
49 | QGuardedPtr<TodolistPluginWidget> m_widget; | 49 | TodolistPluginWidget* m_widget; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #endif | 52 | #endif |
diff --git a/examples/todayplugin/exampleplugin.cpp b/examples/todayplugin/exampleplugin.cpp index 94a5836..41bbfe2 100644 --- a/examples/todayplugin/exampleplugin.cpp +++ b/examples/todayplugin/exampleplugin.cpp | |||
@@ -1,65 +1,63 @@ | |||
1 | /* | 1 | /* |
2 | * exampleplugin.cpp | 2 | * exampleplugin.cpp |
3 | * | 3 | * |
4 | * email : harlekin@handhelds.org | 4 | * email : harlekin@handhelds.org |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include "exampleplugin.h" | 7 | #include "exampleplugin.h" |
8 | 8 | ||
9 | ExamplePlugin::ExamplePlugin() { | 9 | ExamplePlugin::ExamplePlugin() |
10 | m_widget = 0l; | 10 | : m_widget(0l) |
11 | { | ||
11 | } | 12 | } |
12 | 13 | ||
13 | ExamplePlugin::~ExamplePlugin() { | 14 | ExamplePlugin::~ExamplePlugin() { |
14 | delete (ExamplePluginWidget*)m_widget; | ||
15 | } | 15 | } |
16 | 16 | ||
17 | QString ExamplePlugin::pluginName() const { | 17 | QString ExamplePlugin::pluginName() const { |
18 | return QObject::tr( "Example plugin" ); | 18 | return QObject::tr( "Example plugin" ); |
19 | } | 19 | } |
20 | 20 | ||
21 | double ExamplePlugin::versionNumber() const { | 21 | double ExamplePlugin::versionNumber() const { |
22 | return 0.1; | 22 | return 0.1; |
23 | } | 23 | } |
24 | 24 | ||
25 | // this sets the image that will be shown on the left side of the plugin | 25 | // this sets the image that will be shown on the left side of the plugin |
26 | QString ExamplePlugin::pixmapNameWidget() const { | 26 | QString ExamplePlugin::pixmapNameWidget() const { |
27 | return QString::fromLatin1("Tux"); | 27 | return QString::fromLatin1("Tux"); |
28 | } | 28 | } |
29 | 29 | ||
30 | QWidget* ExamplePlugin::widget( QWidget * wid ) { | 30 | QWidget* ExamplePlugin::widget( QWidget * wid ) { |
31 | if(!m_widget) { | 31 | m_widget = new ExamplePluginWidget( wid, "Example" ); |
32 | m_widget = new ExamplePluginWidget( wid, "Example" ); | ||
33 | } | ||
34 | return m_widget; | 32 | return m_widget; |
35 | } | 33 | } |
36 | 34 | ||
37 | 35 | ||
38 | // that would be the icon of the config widget in todays config view | 36 | // that would be the icon of the config widget in todays config view |
39 | QString ExamplePlugin::pixmapNameConfig() const { | 37 | QString ExamplePlugin::pixmapNameConfig() const { |
40 | return 0l; | 38 | return 0l; |
41 | } | 39 | } |
42 | 40 | ||
43 | // No config widget yet, look at the datebook plugin for an example of that | 41 | // No config widget yet, look at the datebook plugin for an example of that |
44 | TodayConfigWidget* ExamplePlugin::configWidget( QWidget* /*parent*/ ) { | 42 | TodayConfigWidget* ExamplePlugin::configWidget( QWidget* /*parent*/ ) { |
45 | return 0l; | 43 | return 0l; |
46 | } | 44 | } |
47 | 45 | ||
48 | // add the binary name of the app to launch here | 46 | // add the binary name of the app to launch here |
49 | QString ExamplePlugin::appName() const { | 47 | QString ExamplePlugin::appName() const { |
50 | return QString::null; | 48 | return QString::null; |
51 | } | 49 | } |
52 | 50 | ||
53 | // if the plugin should be excluded form the refresh cycles that can be set in the today app | 51 | // if the plugin should be excluded form the refresh cycles that can be set in the today app |
54 | bool ExamplePlugin::excludeFromRefresh() const { | 52 | bool ExamplePlugin::excludeFromRefresh() const { |
55 | return false; | 53 | return false; |
56 | } | 54 | } |
57 | 55 | ||
58 | void ExamplePlugin::refresh() { | 56 | void ExamplePlugin::refresh() { |
59 | if ( m_widget ) { | 57 | if ( m_widget ) { |
60 | m_widget->refresh(); | 58 | m_widget->refresh(); |
61 | } | 59 | } |
62 | } | 60 | } |
63 | 61 | ||
64 | void ExamplePlugin::reinitialize() { | 62 | void ExamplePlugin::reinitialize() { |
65 | } | 63 | } |
diff --git a/examples/todayplugin/exampleplugin.h b/examples/todayplugin/exampleplugin.h index 94f5b37..90d3485 100644 --- a/examples/todayplugin/exampleplugin.h +++ b/examples/todayplugin/exampleplugin.h | |||
@@ -1,42 +1,38 @@ | |||
1 | /* | 1 | /* |
2 | * exampleplugin.h | 2 | * exampleplugin.h |
3 | * | 3 | * |
4 | * email : harlekin@handhelds.org | 4 | * email : harlekin@handhelds.org |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | 8 | ||
9 | #ifndef EXAMPLE_PLUGIN_H | 9 | #ifndef EXAMPLE_PLUGIN_H |
10 | #define EXAMPLE_PLUGIN_H | 10 | #define EXAMPLE_PLUGIN_H |
11 | 11 | ||
12 | #include <qwidget.h> | ||
13 | #include <qguardedptr.h> | ||
14 | |||
15 | #include <opie2/todayplugininterface.h> | 12 | #include <opie2/todayplugininterface.h> |
16 | #include <opie2/todayconfigwidget.h> | 13 | #include <opie2/todayconfigwidget.h> |
17 | 14 | ||
18 | #include "examplepluginwidget.h" | 15 | #include "examplepluginwidget.h" |
19 | 16 | ||
20 | // implementation of the today plugin interface | 17 | // implementation of the today plugin interface |
21 | class ExamplePlugin : public TodayPluginObject { | 18 | class ExamplePlugin : public TodayPluginObject { |
22 | 19 | ||
23 | public: | 20 | public: |
24 | ExamplePlugin(); | 21 | ExamplePlugin(); |
25 | ~ExamplePlugin(); | 22 | ~ExamplePlugin(); |
26 | 23 | ||
27 | QString pluginName() const; | 24 | QString pluginName() const; |
28 | double versionNumber() const; | 25 | double versionNumber() const; |
29 | QString pixmapNameWidget() const; | 26 | QString pixmapNameWidget() const; |
30 | QWidget* widget(QWidget *); | 27 | QWidget* widget(QWidget *); |
31 | QString pixmapNameConfig() const; | 28 | QString pixmapNameConfig() const; |
32 | TodayConfigWidget* configWidget(QWidget *); | 29 | TodayConfigWidget* configWidget(QWidget *); |
33 | QString appName() const; | 30 | QString appName() const; |
34 | bool excludeFromRefresh() const; | 31 | bool excludeFromRefresh() const; |
35 | void refresh(); | 32 | void refresh(); |
36 | void reinitialize(); | 33 | void reinitialize(); |
37 | 34 | private: | |
38 | private: | 35 | ExamplePluginWidget *m_widget; |
39 | QGuardedPtr<ExamplePluginWidget> m_widget; | ||
40 | }; | 36 | }; |
41 | 37 | ||
42 | #endif | 38 | #endif |
diff --git a/noncore/todayplugins/fortune/fortuneplugin.cpp b/noncore/todayplugins/fortune/fortuneplugin.cpp index 69d2c45..4461219 100644 --- a/noncore/todayplugins/fortune/fortuneplugin.cpp +++ b/noncore/todayplugins/fortune/fortuneplugin.cpp | |||
@@ -1,71 +1,71 @@ | |||
1 | /* | 1 | /* |
2 | * fortuneplugin.cpp | 2 | * fortuneplugin.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Chris Larson | 4 | * copyright : (c) 2002 by Chris Larson |
5 | * email : kergoth@handhelds.org | 5 | * email : kergoth@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 | 18 | ||
19 | #include "fortuneplugin.h" | 19 | #include "fortuneplugin.h" |
20 | #include "fortunepluginwidget.h" | 20 | #include "fortunepluginwidget.h" |
21 | 21 | ||
22 | 22 | ||
23 | FortunePlugin::FortunePlugin() | 23 | FortunePlugin::FortunePlugin() |
24 | { | 24 | { |
25 | } | 25 | } |
26 | 26 | ||
27 | FortunePlugin::~FortunePlugin() | 27 | FortunePlugin::~FortunePlugin() |
28 | { | 28 | { |
29 | } | 29 | } |
30 | 30 | ||
31 | QString FortunePlugin::pluginName() const | 31 | QString FortunePlugin::pluginName() const |
32 | { | 32 | { |
33 | return QObject::tr( "Fortune plugin" ); | 33 | return QObject::tr( "Fortune plugin" ); |
34 | } | 34 | } |
35 | 35 | ||
36 | double FortunePlugin::versionNumber() const | 36 | double FortunePlugin::versionNumber() const |
37 | { | 37 | { |
38 | return 0.1; | 38 | return 0.1; |
39 | } | 39 | } |
40 | 40 | ||
41 | QString FortunePlugin::pixmapNameWidget() const | 41 | QString FortunePlugin::pixmapNameWidget() const |
42 | { | 42 | { |
43 | return "Fortune"; | 43 | return "Fortune"; |
44 | } | 44 | } |
45 | 45 | ||
46 | QWidget* FortunePlugin::widget( QWidget *wid ) | 46 | QWidget* FortunePlugin::widget( QWidget *wid ) |
47 | { | 47 | { |
48 | return new FortunePluginWidget( wid, "Fortune" ); | 48 | return new FortunePluginWidget( wid, "Fortune" ); |
49 | } | 49 | } |
50 | 50 | ||
51 | QString FortunePlugin::pixmapNameConfig() const | 51 | QString FortunePlugin::pixmapNameConfig() const |
52 | { | 52 | { |
53 | return "Fortune"; | 53 | return "Fortune"; |
54 | } | 54 | } |
55 | 55 | ||
56 | TodayConfigWidget* FortunePlugin::configWidget( QWidget* /*wid*/ ) | 56 | TodayConfigWidget* FortunePlugin::configWidget( QWidget* /*wid*/ ) |
57 | { | 57 | { |
58 | // return new FortunePluginConfig( wid , "Fortune" ); | 58 | // return new FortunePluginConfig( wid , "Fortune" ); |
59 | return NULL; | 59 | return 0l; |
60 | } | 60 | } |
61 | 61 | ||
62 | QString FortunePlugin::appName() const | 62 | QString FortunePlugin::appName() const |
63 | { | 63 | { |
64 | return "fortune"; | 64 | return "fortune"; |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||
68 | bool FortunePlugin::excludeFromRefresh() const | 68 | bool FortunePlugin::excludeFromRefresh() const |
69 | { | 69 | { |
70 | return false; | 70 | return false; |
71 | } | 71 | } |
diff --git a/noncore/todayplugins/fortune/fortuneplugin.h b/noncore/todayplugins/fortune/fortuneplugin.h index 9b590ad..91bd981 100644 --- a/noncore/todayplugins/fortune/fortuneplugin.h +++ b/noncore/todayplugins/fortune/fortuneplugin.h | |||
@@ -1,43 +1,40 @@ | |||
1 | /* | 1 | /* |
2 | * fortuneplugin.h | 2 | * fortuneplugin.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Chris Larson | 4 | * copyright : (c) 2002 by Chris Larson |
5 | * email : kergoth@handhelds.org | 5 | * email : kergoth@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 | #ifndef FORTUNE_PLUGIN_H | 17 | #ifndef FORTUNE_PLUGIN_H |
18 | #define FORTUNE_PLUGIN_H | 18 | #define FORTUNE_PLUGIN_H |
19 | 19 | ||
20 | #include <opie2/oclickablelabel.h> | 20 | #include <opie2/oclickablelabel.h> |
21 | #include <opie2/todayplugininterface.h> | 21 | #include <opie2/todayplugininterface.h> |
22 | 22 | ||
23 | #include <qstring.h> | ||
24 | #include <qwidget.h> | ||
25 | |||
26 | class FortunePlugin : public TodayPluginObject | 23 | class FortunePlugin : public TodayPluginObject |
27 | { | 24 | { |
28 | 25 | ||
29 | public: | 26 | public: |
30 | FortunePlugin(); | 27 | FortunePlugin(); |
31 | ~FortunePlugin(); | 28 | ~FortunePlugin(); |
32 | 29 | ||
33 | QString pluginName() const; | 30 | QString pluginName() const; |
34 | double versionNumber() const; | 31 | double versionNumber() const; |
35 | QString pixmapNameWidget() const; | 32 | QString pixmapNameWidget() const; |
36 | QWidget* widget( QWidget * ); | 33 | QWidget* widget( QWidget * ); |
37 | QString pixmapNameConfig() const; | 34 | QString pixmapNameConfig() const; |
38 | TodayConfigWidget* configWidget( QWidget * ); | 35 | TodayConfigWidget* configWidget( QWidget * ); |
39 | QString appName() const; | 36 | QString appName() const; |
40 | bool excludeFromRefresh() const; | 37 | bool excludeFromRefresh() const; |
41 | }; | 38 | }; |
42 | 39 | ||
43 | #endif | 40 | #endif |