author | harlekin <harlekin> | 2002-09-22 23:00:48 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-22 23:00:48 (UTC) |
commit | 452a124385fbc8162e03ee6cc9020ebeb2133a7f (patch) (unidiff) | |
tree | bbd5264d551ecf3652bf1b7e3ea3754b9d0ccde2 | |
parent | a26d188b7b91f9bdce1e6a44c40ce874cd50abde (diff) | |
download | opie-452a124385fbc8162e03ee6cc9020ebeb2133a7f.zip opie-452a124385fbc8162e03ee6cc9020ebeb2133a7f.tar.gz opie-452a124385fbc8162e03ee6cc9020ebeb2133a7f.tar.bz2 |
interfaces now in libopie
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.h | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginconfig.h | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginimpl.h | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailpluginimpl.h | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.h | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginimpl.h | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/today.h | 2 | ||||
-rw-r--r-- | libopie/todayconfigwidget.h (renamed from core/pim/today/todayconfigwidget.h) | 0 | ||||
-rw-r--r-- | libopie/todayplugininterface.h (renamed from core/pim/today/todayplugininterface.h) | 0 |
12 files changed, 11 insertions, 13 deletions
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h index 625c7cd..4d0f8e6 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.h +++ b/core/pim/today/plugins/datebook/datebookplugin.h | |||
@@ -1,44 +1,43 @@ | |||
1 | /* | 1 | /* |
2 | * datebookplugin.h | 2 | * datebookplugin.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 | #ifndef DATEBOOK_PLUGIN_H | 17 | #ifndef DATEBOOK_PLUGIN_H |
18 | #define DATEBOOK_PLUGIN_H | 18 | #define DATEBOOK_PLUGIN_H |
19 | 19 | ||
20 | #include <qstring.h> | 20 | #include <qstring.h> |
21 | #include <qwidget.h> | 21 | #include <qwidget.h> |
22 | 22 | ||
23 | #include <opie/oclickablelabel.h> | 23 | #include <opie/oclickablelabel.h> |
24 | 24 | #include <opie/todayplugininterface.h> | |
25 | #include "../../todayplugininterface.h" | ||
26 | 25 | ||
27 | class DatebookPlugin : public TodayPluginObject { | 26 | class DatebookPlugin : public TodayPluginObject { |
28 | 27 | ||
29 | public: | 28 | public: |
30 | DatebookPlugin(); | 29 | DatebookPlugin(); |
31 | ~DatebookPlugin(); | 30 | ~DatebookPlugin(); |
32 | 31 | ||
33 | QString pluginName() const; | 32 | QString pluginName() const; |
34 | double versionNumber() const; | 33 | double versionNumber() const; |
35 | QString pixmapNameWidget() const; | 34 | QString pixmapNameWidget() const; |
36 | QWidget* widget( QWidget *); | 35 | QWidget* widget( QWidget *); |
37 | QString pixmapNameConfig() const; | 36 | QString pixmapNameConfig() const; |
38 | TodayConfigWidget* configWidget( QWidget *); | 37 | TodayConfigWidget* configWidget( QWidget *); |
39 | QString appName() const; | 38 | QString appName() const; |
40 | 39 | ||
41 | }; | 40 | }; |
42 | 41 | ||
43 | 42 | ||
44 | #endif | 43 | #endif |
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h index 99aa76c..feba9ee 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.h +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h | |||
@@ -1,48 +1,48 @@ | |||
1 | 1 | ||
2 | #ifndef DATEBOOK_PLUGIN_CONFIG_H | 2 | #ifndef DATEBOOK_PLUGIN_CONFIG_H |
3 | #define DATEBOOK_PLUGIN_CONFIG_H | 3 | #define DATEBOOK_PLUGIN_CONFIG_H |
4 | 4 | ||
5 | 5 | ||
6 | #include <qcheckbox.h> | 6 | #include <qcheckbox.h> |
7 | #include <qspinbox.h> | 7 | #include <qspinbox.h> |
8 | 8 | ||
9 | #include "../../todayconfigwidget.h" | 9 | #include <opie/todayconfigwidget.h> |
10 | 10 | ||
11 | class DatebookPluginConfig : public TodayConfigWidget { | 11 | class DatebookPluginConfig : public TodayConfigWidget { |
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | public: | 15 | public: |
16 | DatebookPluginConfig( QWidget *parent, const char *name ); | 16 | DatebookPluginConfig( QWidget *parent, const char *name ); |
17 | ~DatebookPluginConfig(); | 17 | ~DatebookPluginConfig(); |
18 | 18 | ||
19 | void writeConfig(); | 19 | void writeConfig(); |
20 | private: | 20 | private: |
21 | /** | 21 | /** |
22 | * if changed then save | 22 | * if changed then save |
23 | */ | 23 | */ |
24 | bool changed(); | 24 | bool changed(); |
25 | void readConfig(); | 25 | void readConfig(); |
26 | 26 | ||
27 | QCheckBox* CheckBox2; | 27 | QCheckBox* CheckBox2; |
28 | QCheckBox* CheckBox1; | 28 | QCheckBox* CheckBox1; |
29 | QCheckBox* CheckBox3; | 29 | QCheckBox* CheckBox3; |
30 | QSpinBox* SpinBox1; | 30 | QSpinBox* SpinBox1; |
31 | 31 | ||
32 | // how many lines should be showed in the datebook section | 32 | // how many lines should be showed in the datebook section |
33 | int m_max_lines_meet; | 33 | int m_max_lines_meet; |
34 | // If location is to be showed too, 1 to activate it. | 34 | // If location is to be showed too, 1 to activate it. |
35 | int m_show_location; | 35 | int m_show_location; |
36 | // if notes should be shown | 36 | // if notes should be shown |
37 | int m_show_notes; | 37 | int m_show_notes; |
38 | // should only later appointments be shown or all for the current day. | 38 | // should only later appointments be shown or all for the current day. |
39 | int m_only_later; | 39 | int m_only_later; |
40 | 40 | ||
41 | 41 | ||
42 | }; | 42 | }; |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | #endif | 48 | #endif |
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.h b/core/pim/today/plugins/datebook/datebookpluginimpl.h index 037dff4..4dbb318 100644 --- a/core/pim/today/plugins/datebook/datebookpluginimpl.h +++ b/core/pim/today/plugins/datebook/datebookpluginimpl.h | |||
@@ -1,42 +1,42 @@ | |||
1 | /* | 1 | /* |
2 | * datebookpluginimpl.h | 2 | * datebookpluginimpl.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 | #ifndef DATEBOOK_PLUGIN_IMPL_H | 17 | #ifndef DATEBOOK_PLUGIN_IMPL_H |
18 | #define DATEBOOK_PLUGIN_IMPL_H | 18 | #define DATEBOOK_PLUGIN_IMPL_H |
19 | 19 | ||
20 | #include "../../todayplugininterface.h" | 20 | #include <opie/todayplugininterface.h> |
21 | 21 | ||
22 | class DatebookPlugin; | 22 | class DatebookPlugin; |
23 | 23 | ||
24 | class DatebookPluginImpl : public TodayPluginInterface{ | 24 | class DatebookPluginImpl : public TodayPluginInterface{ |
25 | 25 | ||
26 | public: | 26 | public: |
27 | DatebookPluginImpl(); | 27 | DatebookPluginImpl(); |
28 | virtual ~DatebookPluginImpl(); | 28 | virtual ~DatebookPluginImpl(); |
29 | 29 | ||
30 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | 30 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); |
31 | Q_REFCOUNT | 31 | Q_REFCOUNT |
32 | 32 | ||
33 | virtual TodayPluginObject *guiPart(); | 33 | virtual TodayPluginObject *guiPart(); |
34 | 34 | ||
35 | private: | 35 | private: |
36 | DatebookPlugin *datebookPlugin; | 36 | DatebookPlugin *datebookPlugin; |
37 | ulong ref; | 37 | ulong ref; |
38 | 38 | ||
39 | 39 | ||
40 | }; | 40 | }; |
41 | 41 | ||
42 | #endif | 42 | #endif |
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h index a27f4c7..d2a3dcb 100644 --- a/core/pim/today/plugins/mail/mailplugin.h +++ b/core/pim/today/plugins/mail/mailplugin.h | |||
@@ -1,47 +1,47 @@ | |||
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 | 23 | ||
24 | #include <opie/tododb.h> | 24 | #include <opie/tododb.h> |
25 | #include <opie/oclickablelabel.h> | 25 | #include <opie/oclickablelabel.h> |
26 | 26 | ||
27 | #include "../../todayplugininterface.h" | 27 | #include <opie/todayplugininterface.h> |
28 | #include "../../todayconfigwidget.h" | 28 | #include <opie/todayconfigwidget.h> |
29 | 29 | ||
30 | class MailPlugin : public TodayPluginObject { | 30 | class MailPlugin : public TodayPluginObject { |
31 | 31 | ||
32 | public: | 32 | public: |
33 | MailPlugin(); | 33 | MailPlugin(); |
34 | ~MailPlugin(); | 34 | ~MailPlugin(); |
35 | 35 | ||
36 | QString pluginName() const; | 36 | QString pluginName() const; |
37 | double versionNumber() const; | 37 | double versionNumber() const; |
38 | QString pixmapNameWidget() const; | 38 | QString pixmapNameWidget() const; |
39 | QWidget* widget(QWidget *); | 39 | QWidget* widget(QWidget *); |
40 | QString pixmapNameConfig() const; | 40 | QString pixmapNameConfig() const; |
41 | TodayConfigWidget* configWidget(QWidget *); | 41 | TodayConfigWidget* configWidget(QWidget *); |
42 | QString appName() const; | 42 | QString appName() const; |
43 | 43 | ||
44 | 44 | ||
45 | }; | 45 | }; |
46 | 46 | ||
47 | #endif | 47 | #endif |
diff --git a/core/pim/today/plugins/mail/mailpluginimpl.h b/core/pim/today/plugins/mail/mailpluginimpl.h index 9930e6e..54412b2 100644 --- a/core/pim/today/plugins/mail/mailpluginimpl.h +++ b/core/pim/today/plugins/mail/mailpluginimpl.h | |||
@@ -1,40 +1,40 @@ | |||
1 | /* | 1 | /* |
2 | * mailpluginimpl.h | 2 | * mailpluginimpl.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 | #ifndef MAIL_PLUGIN_IMPL_H | 17 | #ifndef MAIL_PLUGIN_IMPL_H |
18 | #define MAIL_PLUGIN_IMPL_H | 18 | #define MAIL_PLUGIN_IMPL_H |
19 | 19 | ||
20 | #include "../../todayplugininterface.h" | 20 | #include <opie/todayplugininterface.h> |
21 | 21 | ||
22 | class MailPlugin; | 22 | class MailPlugin; |
23 | 23 | ||
24 | class MailPluginImpl : public TodayPluginInterface{ | 24 | class MailPluginImpl : public TodayPluginInterface{ |
25 | 25 | ||
26 | public: | 26 | public: |
27 | MailPluginImpl(); | 27 | MailPluginImpl(); |
28 | virtual ~MailPluginImpl(); | 28 | virtual ~MailPluginImpl(); |
29 | 29 | ||
30 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | 30 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); |
31 | Q_REFCOUNT | 31 | Q_REFCOUNT |
32 | 32 | ||
33 | virtual TodayPluginObject *guiPart(); | 33 | virtual TodayPluginObject *guiPart(); |
34 | 34 | ||
35 | private: | 35 | private: |
36 | MailPlugin *mailPlugin; | 36 | MailPlugin *mailPlugin; |
37 | ulong ref; | 37 | ulong ref; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #endif | 40 | #endif |
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index 2c03389..0a6669f 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h | |||
@@ -1,44 +1,43 @@ | |||
1 | /* | 1 | /* |
2 | * todoplugin.h | 2 | * todoplugin.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 | #ifndef TODOLIST_PLUGIN_H | 17 | #ifndef TODOLIST_PLUGIN_H |
18 | #define TODOLIST_PLUGIN_H | 18 | #define TODOLIST_PLUGIN_H |
19 | 19 | ||
20 | #include <qstring.h> | 20 | #include <qstring.h> |
21 | #include <qwidget.h> | 21 | #include <qwidget.h> |
22 | 22 | ||
23 | #include <opie/tododb.h> | 23 | #include <opie/tododb.h> |
24 | #include <opie/oclickablelabel.h> | 24 | #include <opie/oclickablelabel.h> |
25 | 25 | #include <opie/todayplugininterface.h> | |
26 | #include "../../todayplugininterface.h" | ||
27 | 26 | ||
28 | class TodolistPlugin : public TodayPluginObject { | 27 | class TodolistPlugin : public TodayPluginObject { |
29 | 28 | ||
30 | public: | 29 | public: |
31 | TodolistPlugin(); | 30 | TodolistPlugin(); |
32 | ~TodolistPlugin(); | 31 | ~TodolistPlugin(); |
33 | 32 | ||
34 | QString pluginName() const; | 33 | QString pluginName() const; |
35 | double versionNumber() const; | 34 | double versionNumber() const; |
36 | QString pixmapNameWidget() const; | 35 | QString pixmapNameWidget() const; |
37 | QWidget* widget(QWidget *); | 36 | QWidget* widget(QWidget *); |
38 | QString pixmapNameConfig() const; | 37 | QString pixmapNameConfig() const; |
39 | TodayConfigWidget* configWidget(QWidget *); | 38 | TodayConfigWidget* configWidget(QWidget *); |
40 | QString appName() const; | 39 | QString appName() const; |
41 | 40 | ||
42 | }; | 41 | }; |
43 | 42 | ||
44 | #endif | 43 | #endif |
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index 26557d5..4584ebe 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h | |||
@@ -1,57 +1,57 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginconfig.h | 2 | * todopluginconfig.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 | #ifndef TODOLIST_PLUGIN_CONFIG_H | 17 | #ifndef TODOLIST_PLUGIN_CONFIG_H |
18 | #define TODOLIST_PLUGIN_CONFIG_H | 18 | #define TODOLIST_PLUGIN_CONFIG_H |
19 | 19 | ||
20 | #include <qwidget.h> | 20 | #include <qwidget.h> |
21 | #include <qspinbox.h> | 21 | #include <qspinbox.h> |
22 | 22 | ||
23 | #include "../../todayconfigwidget.h" | 23 | #include <opie/todayconfigwidget.h> |
24 | 24 | ||
25 | class TodolistPluginConfig : public TodayConfigWidget { | 25 | class TodolistPluginConfig : public TodayConfigWidget { |
26 | 26 | ||
27 | 27 | ||
28 | public: | 28 | public: |
29 | 29 | ||
30 | TodolistPluginConfig( QWidget *parent, const char *name ); | 30 | TodolistPluginConfig( QWidget *parent, const char *name ); |
31 | ~TodolistPluginConfig(); | 31 | ~TodolistPluginConfig(); |
32 | 32 | ||
33 | private: | 33 | private: |
34 | /** | 34 | /** |
35 | * if changed then save | 35 | * if changed then save |
36 | */ | 36 | */ |
37 | bool changed(); | 37 | bool changed(); |
38 | void readConfig(); | 38 | void readConfig(); |
39 | void writeConfig(); | 39 | void writeConfig(); |
40 | 40 | ||
41 | QSpinBox* SpinBox2; | 41 | QSpinBox* SpinBox2; |
42 | QSpinBox* SpinBoxClip; | 42 | QSpinBox* SpinBoxClip; |
43 | 43 | ||
44 | // how many lines should be showed in the todolist section | 44 | // how many lines should be showed in the todolist section |
45 | int m_max_lines_task; | 45 | int m_max_lines_task; |
46 | // clip the lines after X chars | 46 | // clip the lines after X chars |
47 | int m_maxCharClip; | 47 | int m_maxCharClip; |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | }; | 51 | }; |
52 | 52 | ||
53 | 53 | ||
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | #endif | 57 | #endif |
diff --git a/core/pim/today/plugins/todolist/todopluginimpl.h b/core/pim/today/plugins/todolist/todopluginimpl.h index 29e0294..c119be2 100644 --- a/core/pim/today/plugins/todolist/todopluginimpl.h +++ b/core/pim/today/plugins/todolist/todopluginimpl.h | |||
@@ -1,40 +1,40 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginimpl.h | 2 | * todopluginimpl.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 | #ifndef TODOLIST_PLUGIN_IMPL_H | 17 | #ifndef TODOLIST_PLUGIN_IMPL_H |
18 | #define TODOLIST_PLUGIN_IMPL_H | 18 | #define TODOLIST_PLUGIN_IMPL_H |
19 | 19 | ||
20 | #include "../../todayplugininterface.h" | 20 | #include <opie/todayplugininterface.h> |
21 | 21 | ||
22 | class TodolistPlugin; | 22 | class TodolistPlugin; |
23 | 23 | ||
24 | class TodolistPluginImpl : public TodayPluginInterface{ | 24 | class TodolistPluginImpl : public TodayPluginInterface{ |
25 | 25 | ||
26 | public: | 26 | public: |
27 | TodolistPluginImpl(); | 27 | TodolistPluginImpl(); |
28 | virtual ~TodolistPluginImpl(); | 28 | virtual ~TodolistPluginImpl(); |
29 | 29 | ||
30 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | 30 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); |
31 | Q_REFCOUNT | 31 | Q_REFCOUNT |
32 | 32 | ||
33 | virtual TodayPluginObject *guiPart(); | 33 | virtual TodayPluginObject *guiPart(); |
34 | 34 | ||
35 | private: | 35 | private: |
36 | TodolistPlugin *todolistPlugin; | 36 | TodolistPlugin *todolistPlugin; |
37 | ulong ref; | 37 | ulong ref; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #endif | 40 | #endif |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index f5f88f8..35758d5 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -1,327 +1,327 @@ | |||
1 | /* | 1 | /* |
2 | * today.cpp | 2 | * today.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 "today.h" | 18 | #include "today.h" |
19 | #include "todayconfigwidget.h" | 19 | #include <opie/todayconfigwidget.h> |
20 | 20 | ||
21 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
22 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | #include <qpe/resource.h> | 23 | #include <qpe/resource.h> |
24 | #include <qpe/global.h> | 24 | #include <qpe/global.h> |
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/contact.h> | 26 | #include <qpe/contact.h> |
27 | 27 | ||
28 | #include <qdir.h> | 28 | #include <qdir.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | #include <qlabel.h> | 31 | #include <qlabel.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qpixmap.h> | 33 | #include <qpixmap.h> |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <opie/otabwidget.h> | 36 | #include <opie/otabwidget.h> |
37 | #include <qdialog.h> | 37 | #include <qdialog.h> |
38 | 38 | ||
39 | 39 | ||
40 | struct TodayPlugin { | 40 | struct TodayPlugin { |
41 | QLibrary *library; | 41 | QLibrary *library; |
42 | TodayPluginInterface *iface; | 42 | TodayPluginInterface *iface; |
43 | TodayPluginObject *guiPart; | 43 | TodayPluginObject *guiPart; |
44 | QWidget *guiBox; | 44 | QWidget *guiBox; |
45 | QString name; | 45 | QString name; |
46 | bool active; | 46 | bool active; |
47 | int pos; | 47 | int pos; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static QValueList<TodayPlugin> pluginList; | 50 | static QValueList<TodayPlugin> pluginList; |
51 | 51 | ||
52 | Today::Today( QWidget* parent, const char* name, WFlags fl ) | 52 | Today::Today( QWidget* parent, const char* name, WFlags fl ) |
53 | : TodayBase( parent, name, fl ) { | 53 | : TodayBase( parent, name, fl ) { |
54 | 54 | ||
55 | QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); | 55 | QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); |
56 | QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); | 56 | QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); |
57 | 57 | ||
58 | #if defined(Q_WS_QWS) | 58 | #if defined(Q_WS_QWS) |
59 | #if !defined(QT_NO_COP) | 59 | #if !defined(QT_NO_COP) |
60 | QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); | 60 | QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); |
61 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), | 61 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), |
62 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); | 62 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); |
63 | #endif | 63 | #endif |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | setOwnerField(); | 66 | setOwnerField(); |
67 | refresh(); | 67 | refresh(); |
68 | showMaximized(); | 68 | showMaximized(); |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Qcop receive method. | 72 | * Qcop receive method. |
73 | */ | 73 | */ |
74 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | 74 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { |
75 | QDataStream stream( data, IO_ReadOnly ); | 75 | QDataStream stream( data, IO_ReadOnly ); |
76 | if ( msg == "message(QString)" ) { | 76 | if ( msg == "message(QString)" ) { |
77 | QString message; | 77 | QString message; |
78 | stream >> message; | 78 | stream >> message; |
79 | setOwnerField( message ); | 79 | setOwnerField( message ); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * Initialises the owner field with the default value, the username | 84 | * Initialises the owner field with the default value, the username |
85 | */ | 85 | */ |
86 | void Today::setOwnerField() { | 86 | void Today::setOwnerField() { |
87 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); | 87 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); |
88 | if ( QFile::exists( file ) ) { | 88 | if ( QFile::exists( file ) ) { |
89 | Contact cont = Contact::readVCard( file )[0]; | 89 | Contact cont = Contact::readVCard( file )[0]; |
90 | QString returnString = cont.fullName(); | 90 | QString returnString = cont.fullName(); |
91 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); | 91 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); |
92 | } else { | 92 | } else { |
93 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); | 93 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Set the owner field with a given QString, for example per qcop. | 98 | * Set the owner field with a given QString, for example per qcop. |
99 | */ | 99 | */ |
100 | void Today::setOwnerField( QString &message ) { | 100 | void Today::setOwnerField( QString &message ) { |
101 | if ( !message.isEmpty() ) { | 101 | if ( !message.isEmpty() ) { |
102 | OwnerField->setText( "<b>" + message + "</b>" ); | 102 | OwnerField->setText( "<b>" + message + "</b>" ); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Init stuff needed for today. Reads the config file. | 108 | * Init stuff needed for today. Reads the config file. |
109 | */ | 109 | */ |
110 | void Today::init() { | 110 | void Today::init() { |
111 | // read config | 111 | // read config |
112 | Config cfg( "today" ); | 112 | Config cfg( "today" ); |
113 | cfg.setGroup( "Plugins" ); | 113 | cfg.setGroup( "Plugins" ); |
114 | 114 | ||
115 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 115 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
116 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); | 116 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); |
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Load the plugins | 121 | * Load the plugins |
122 | */ | 122 | */ |
123 | void Today::loadPlugins() { | 123 | void Today::loadPlugins() { |
124 | 124 | ||
125 | QValueList<TodayPlugin>::Iterator tit; | 125 | QValueList<TodayPlugin>::Iterator tit; |
126 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { | 126 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { |
127 | (*tit).library->unload(); | 127 | (*tit).library->unload(); |
128 | delete (*tit).library; | 128 | delete (*tit).library; |
129 | } | 129 | } |
130 | pluginList.clear(); | 130 | pluginList.clear(); |
131 | 131 | ||
132 | QString path = QPEApplication::qpeDir() + "/plugins/today"; | 132 | QString path = QPEApplication::qpeDir() + "/plugins/today"; |
133 | QDir dir( path, "lib*.so" ); | 133 | QDir dir( path, "lib*.so" ); |
134 | 134 | ||
135 | QStringList list = dir.entryList(); | 135 | QStringList list = dir.entryList(); |
136 | QStringList::Iterator it; | 136 | QStringList::Iterator it; |
137 | 137 | ||
138 | 138 | ||
139 | QMap<QString, TodayPlugin> tempList; | 139 | QMap<QString, TodayPlugin> tempList; |
140 | 140 | ||
141 | for ( it = list.begin(); it != list.end(); ++it ) { | 141 | for ( it = list.begin(); it != list.end(); ++it ) { |
142 | TodayPluginInterface *iface = 0; | 142 | TodayPluginInterface *iface = 0; |
143 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 143 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
144 | 144 | ||
145 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 145 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); |
146 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 146 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
147 | qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); | 147 | qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); |
148 | qDebug( QString(*it) ); | 148 | qDebug( QString(*it) ); |
149 | TodayPlugin plugin; | 149 | TodayPlugin plugin; |
150 | plugin.library = lib; | 150 | plugin.library = lib; |
151 | plugin.iface = iface; | 151 | plugin.iface = iface; |
152 | plugin.name = QString(*it); | 152 | plugin.name = QString(*it); |
153 | 153 | ||
154 | // find out if plugins should be shown | 154 | // find out if plugins should be shown |
155 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { | 155 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { |
156 | plugin.active = true; | 156 | plugin.active = true; |
157 | } else { | 157 | } else { |
158 | plugin.active = false; | 158 | plugin.active = false; |
159 | } | 159 | } |
160 | plugin.guiPart = plugin.iface->guiPart(); | 160 | plugin.guiPart = plugin.iface->guiPart(); |
161 | 161 | ||
162 | // package the whole thing into a qwidget so it can be shown and hidden | 162 | // package the whole thing into a qwidget so it can be shown and hidden |
163 | plugin.guiBox = new QWidget( this ); | 163 | plugin.guiBox = new QWidget( this ); |
164 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); | 164 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); |
165 | QPixmap plugPix; | 165 | QPixmap plugPix; |
166 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 ); | 166 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 ); |
167 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); | 167 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); |
168 | plugIcon->setPixmap( plugPix ); | 168 | plugIcon->setPixmap( plugPix ); |
169 | // a scrollview for each plugin | 169 | // a scrollview for each plugin |
170 | QScrollView* sv = new QScrollView( plugin.guiBox ); | 170 | QScrollView* sv = new QScrollView( plugin.guiBox ); |
171 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); | 171 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); |
172 | // not sure if that is good .-) | 172 | // not sure if that is good .-) |
173 | sv->setMinimumHeight( 10 ); | 173 | sv->setMinimumHeight( 10 ); |
174 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 174 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
175 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 175 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
176 | sv->setFrameShape( QFrame::NoFrame ); | 176 | sv->setFrameShape( QFrame::NoFrame ); |
177 | sv->addChild( plugWidget ); | 177 | sv->addChild( plugWidget ); |
178 | // make sure the icon is on the top alligned | 178 | // make sure the icon is on the top alligned |
179 | boxLayout->addWidget( plugIcon, 0, AlignTop ); | 179 | boxLayout->addWidget( plugIcon, 0, AlignTop ); |
180 | boxLayout->addWidget( sv, 0, AlignTop ); | 180 | boxLayout->addWidget( sv, 0, AlignTop ); |
181 | boxLayout->setStretchFactor( plugIcon, 1 ); | 181 | boxLayout->setStretchFactor( plugIcon, 1 ); |
182 | boxLayout->setStretchFactor( sv, 9 ); | 182 | boxLayout->setStretchFactor( sv, 9 ); |
183 | // "prebuffer" it in one more list, to get the sorting done | 183 | // "prebuffer" it in one more list, to get the sorting done |
184 | tempList.insert( plugin.name, plugin ); | 184 | tempList.insert( plugin.name, plugin ); |
185 | 185 | ||
186 | // on first start the list is off course empty | 186 | // on first start the list is off course empty |
187 | if ( m_allApplets.isEmpty() ) { | 187 | if ( m_allApplets.isEmpty() ) { |
188 | layout->addWidget( plugin.guiBox ); | 188 | layout->addWidget( plugin.guiBox ); |
189 | pluginList.append( plugin ); | 189 | pluginList.append( plugin ); |
190 | } | 190 | } |
191 | } else { | 191 | } else { |
192 | qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); | 192 | qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); |
193 | delete lib; | 193 | delete lib; |
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | if ( !m_allApplets.isEmpty() ) { | 197 | if ( !m_allApplets.isEmpty() ) { |
198 | TodayPlugin tempPlugin; | 198 | TodayPlugin tempPlugin; |
199 | QStringList::Iterator stringit; | 199 | QStringList::Iterator stringit; |
200 | for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { | 200 | for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { |
201 | tempPlugin = ( tempList.find( *stringit ) ).data(); | 201 | tempPlugin = ( tempList.find( *stringit ) ).data(); |
202 | if ( !( (tempPlugin.name).isEmpty() ) ) { | 202 | if ( !( (tempPlugin.name).isEmpty() ) ) { |
203 | layout->addWidget( tempPlugin.guiBox ); | 203 | layout->addWidget( tempPlugin.guiBox ); |
204 | pluginList.append( tempPlugin ); | 204 | pluginList.append( tempPlugin ); |
205 | } | 205 | } |
206 | } | 206 | } |
207 | } | 207 | } |
208 | } | 208 | } |
209 | 209 | ||
210 | 210 | ||
211 | /** | 211 | /** |
212 | * Repaint method. Reread all fields. | 212 | * Repaint method. Reread all fields. |
213 | */ | 213 | */ |
214 | void Today::draw() { | 214 | void Today::draw() { |
215 | 215 | ||
216 | if ( pluginList.count() == 0 ) { | 216 | if ( pluginList.count() == 0 ) { |
217 | QLabel *noPlugins = new QLabel( this ); | 217 | QLabel *noPlugins = new QLabel( this ); |
218 | noPlugins->setText( tr( "No plugins found" ) ); | 218 | noPlugins->setText( tr( "No plugins found" ) ); |
219 | layout->addWidget( noPlugins ); | 219 | layout->addWidget( noPlugins ); |
220 | return; | 220 | return; |
221 | } | 221 | } |
222 | 222 | ||
223 | uint count = 0; | 223 | uint count = 0; |
224 | TodayPlugin plugin; | 224 | TodayPlugin plugin; |
225 | for ( uint i = 0; i < pluginList.count(); i++ ) { | 225 | for ( uint i = 0; i < pluginList.count(); i++ ) { |
226 | plugin = pluginList[i]; | 226 | plugin = pluginList[i]; |
227 | 227 | ||
228 | if ( plugin.active ) { | 228 | if ( plugin.active ) { |
229 | // qDebug( plugin.name + " is ACTIVE " ); | 229 | // qDebug( plugin.name + " is ACTIVE " ); |
230 | plugin.guiBox->show(); | 230 | plugin.guiBox->show(); |
231 | } else { | 231 | } else { |
232 | // qDebug( plugin.name + " is INACTIVE" ); | 232 | // qDebug( plugin.name + " is INACTIVE" ); |
233 | plugin.guiBox->hide(); | 233 | plugin.guiBox->hide(); |
234 | } | 234 | } |
235 | count++; | 235 | count++; |
236 | } | 236 | } |
237 | 237 | ||
238 | if ( count == 0 ) { | 238 | if ( count == 0 ) { |
239 | QLabel *noPluginsActive = new QLabel( this ); | 239 | QLabel *noPluginsActive = new QLabel( this ); |
240 | noPluginsActive->setText( tr( "No plugins activated" ) ); | 240 | noPluginsActive->setText( tr( "No plugins activated" ) ); |
241 | layout->addWidget( noPluginsActive ); | 241 | layout->addWidget( noPluginsActive ); |
242 | } | 242 | } |
243 | layout->addStretch(0); | 243 | layout->addStretch(0); |
244 | } | 244 | } |
245 | 245 | ||
246 | 246 | ||
247 | /** | 247 | /** |
248 | * The method for the configuration dialog. | 248 | * The method for the configuration dialog. |
249 | */ | 249 | */ |
250 | void Today::startConfig() { | 250 | void Today::startConfig() { |
251 | 251 | ||
252 | TodayConfig conf( this, "dialog", true ); | 252 | TodayConfig conf( this, "dialog", true ); |
253 | 253 | ||
254 | TodayPlugin plugin; | 254 | TodayPlugin plugin; |
255 | QList<TodayConfigWidget> configWidgetList; | 255 | QList<TodayConfigWidget> configWidgetList; |
256 | 256 | ||
257 | for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) { | 257 | for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) { |
258 | plugin = pluginList[i]; | 258 | plugin = pluginList[i]; |
259 | 259 | ||
260 | // load the config widgets in the tabs | 260 | // load the config widgets in the tabs |
261 | if ( plugin.guiPart->configWidget( this ) != 0l ) { | 261 | if ( plugin.guiPart->configWidget( this ) != 0l ) { |
262 | TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); | 262 | TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); |
263 | configWidgetList.append( widget ); | 263 | configWidgetList.append( widget ); |
264 | conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig() | 264 | conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig() |
265 | , plugin.guiPart->appName() ); | 265 | , plugin.guiPart->appName() ); |
266 | } | 266 | } |
267 | // set the order/activate tab | 267 | // set the order/activate tab |
268 | conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(), | 268 | conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(), |
269 | Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) ); | 269 | Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) ); |
270 | } | 270 | } |
271 | 271 | ||
272 | if ( conf.exec() == QDialog::Accepted ) { | 272 | if ( conf.exec() == QDialog::Accepted ) { |
273 | conf.writeConfig(); | 273 | conf.writeConfig(); |
274 | TodayConfigWidget *confWidget; | 274 | TodayConfigWidget *confWidget; |
275 | for ( confWidget = configWidgetList.first(); confWidget != 0; | 275 | for ( confWidget = configWidgetList.first(); confWidget != 0; |
276 | confWidget = configWidgetList.next() ) { | 276 | confWidget = configWidgetList.next() ) { |
277 | confWidget->writeConfig(); | 277 | confWidget->writeConfig(); |
278 | } | 278 | } |
279 | refresh(); | 279 | refresh(); |
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
283 | 283 | ||
284 | /** | 284 | /** |
285 | * Refresh for the view. Reload all applets | 285 | * Refresh for the view. Reload all applets |
286 | * | 286 | * |
287 | */ | 287 | */ |
288 | void Today::refresh() { | 288 | void Today::refresh() { |
289 | init(); | 289 | init(); |
290 | 290 | ||
291 | // set the date in top label | 291 | // set the date in top label |
292 | QDate date = QDate::currentDate(); | 292 | QDate date = QDate::currentDate(); |
293 | QString time = ( tr( date.toString() ) ); | 293 | QString time = ( tr( date.toString() ) ); |
294 | 294 | ||
295 | DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); | 295 | DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); |
296 | 296 | ||
297 | if ( layout ) { | 297 | if ( layout ) { |
298 | delete layout; | 298 | delete layout; |
299 | } | 299 | } |
300 | layout = new QVBoxLayout( this ); | 300 | layout = new QVBoxLayout( this ); |
301 | layout->addWidget( Frame ); | 301 | layout->addWidget( Frame ); |
302 | layout->addWidget( OwnerField ); | 302 | layout->addWidget( OwnerField ); |
303 | 303 | ||
304 | loadPlugins(); | 304 | loadPlugins(); |
305 | draw(); | 305 | draw(); |
306 | } | 306 | } |
307 | 307 | ||
308 | void Today::startAddressbook() { | 308 | void Today::startAddressbook() { |
309 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 309 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
310 | e << QString( "addressbook" ); | 310 | e << QString( "addressbook" ); |
311 | } | 311 | } |
312 | 312 | ||
313 | 313 | ||
314 | /** | 314 | /** |
315 | * launch addressbook (personal card) | 315 | * launch addressbook (personal card) |
316 | */ | 316 | */ |
317 | void Today::editCard() { | 317 | void Today::editCard() { |
318 | startAddressbook(); | 318 | startAddressbook(); |
319 | while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) { | 319 | while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) { |
320 | qApp->processEvents(); | 320 | qApp->processEvents(); |
321 | } | 321 | } |
322 | QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" ); | 322 | QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" ); |
323 | } | 323 | } |
324 | 324 | ||
325 | Today::~Today() { | 325 | Today::~Today() { |
326 | } | 326 | } |
327 | 327 | ||
diff --git a/core/pim/today/today.h b/core/pim/today/today.h index b35c9b1..92512b9 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h | |||
@@ -1,73 +1,73 @@ | |||
1 | /* | 1 | /* |
2 | * today.h | 2 | * today.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 TODAY_H | 18 | #ifndef TODAY_H |
19 | #define TODAY_H | 19 | #define TODAY_H |
20 | 20 | ||
21 | #include <opie/tododb.h> | 21 | #include <opie/tododb.h> |
22 | 22 | ||
23 | #include <qdatetime.h> | 23 | #include <qdatetime.h> |
24 | #include <qlist.h> | 24 | #include <qlist.h> |
25 | #include <qhbox.h> | 25 | #include <qhbox.h> |
26 | 26 | ||
27 | #include <qpe/qlibrary.h> | 27 | #include <qpe/qlibrary.h> |
28 | #include <qpe/event.h> | 28 | #include <qpe/event.h> |
29 | 29 | ||
30 | #include "todayconfig.h" | 30 | #include "todayconfig.h" |
31 | #include "todaybase.h" | 31 | #include "todaybase.h" |
32 | #include "todayplugininterface.h" | 32 | #include <opie/todayplugininterface.h> |
33 | 33 | ||
34 | class QVBoxLayout; | 34 | class QVBoxLayout; |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | class Today : public TodayBase { | 38 | class Today : public TodayBase { |
39 | 39 | ||
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | 41 | ||
42 | public: | 42 | public: |
43 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 43 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
44 | ~Today(); | 44 | ~Today(); |
45 | 45 | ||
46 | private slots: | 46 | private slots: |
47 | void startConfig(); | 47 | void startConfig(); |
48 | void startAddressbook(); | 48 | void startAddressbook(); |
49 | void editCard(); | 49 | void editCard(); |
50 | void refresh(); | 50 | void refresh(); |
51 | 51 | ||
52 | private: | 52 | private: |
53 | void init(); | 53 | void init(); |
54 | void setOwnerField(); | 54 | void setOwnerField(); |
55 | void setOwnerField(QString &string); | 55 | void setOwnerField(QString &string); |
56 | void loadPlugins(); | 56 | void loadPlugins(); |
57 | void draw(); | 57 | void draw(); |
58 | 58 | ||
59 | private slots: | 59 | private slots: |
60 | void channelReceived(const QCString &msg, const QByteArray & data); | 60 | void channelReceived(const QCString &msg, const QByteArray & data); |
61 | 61 | ||
62 | private: | 62 | private: |
63 | TodayConfig *conf; | 63 | TodayConfig *conf; |
64 | QStringList m_excludeApplets; | 64 | QStringList m_excludeApplets; |
65 | QStringList m_allApplets; | 65 | QStringList m_allApplets; |
66 | 66 | ||
67 | // QString m_autoStartTimer; | 67 | // QString m_autoStartTimer; |
68 | int m_newStart; | 68 | int m_newStart; |
69 | // int m_autoStart; | 69 | // int m_autoStart; |
70 | int m_maxCharClip; | 70 | int m_maxCharClip; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #endif | 73 | #endif |
diff --git a/core/pim/today/todayconfigwidget.h b/libopie/todayconfigwidget.h index 48cf379..48cf379 100644 --- a/core/pim/today/todayconfigwidget.h +++ b/libopie/todayconfigwidget.h | |||
diff --git a/core/pim/today/todayplugininterface.h b/libopie/todayplugininterface.h index becb79c..becb79c 100644 --- a/core/pim/today/todayplugininterface.h +++ b/libopie/todayplugininterface.h | |||