summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-03-01 15:47:43 (UTC)
committer harlekin <harlekin>2004-03-01 15:47:43 (UTC)
commit87676b131aad1bfe979570a48107527db4040020 (patch) (unidiff)
tree9f7ee88adc4b8987e8d3387e2370719078f7ff5e
parentc50e4c32d34a0550f167480b6306aac632fb201c (diff)
downloadopie-87676b131aad1bfe979570a48107527db4040020.zip
opie-87676b131aad1bfe979570a48107527db4040020.tar.gz
opie-87676b131aad1bfe979570a48107527db4040020.tar.bz2
today plus datebook, mail, todolist plugins libopie1->libopie2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/main.cpp5
-rw-r--r--core/pim/today/plugins/datebook/datebook.pro2
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp5
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.h6
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp5
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.h8
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp2
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h9
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginimpl.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginimpl.h4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp14
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h11
-rw-r--r--core/pim/today/plugins/mail/mail.pro2
-rw-r--r--core/pim/today/plugins/mail/mailplugin.h9
-rw-r--r--core/pim/today/plugins/mail/mailpluginimpl.cpp4
-rw-r--r--core/pim/today/plugins/mail/mailpluginimpl.h4
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp3
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.h4
-rw-r--r--core/pim/today/plugins/todolist/todolist.pro2
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp5
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.h13
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.h6
-rw-r--r--core/pim/today/plugins/todolist/todopluginimpl.cpp4
-rw-r--r--core/pim/today/plugins/todolist/todopluginimpl.h4
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.cpp2
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.h11
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/today.h20
-rw-r--r--core/pim/today/today.pro3
-rw-r--r--core/pim/today/todaybase.cpp7
-rw-r--r--core/pim/today/todaybase.h13
-rw-r--r--core/pim/today/todayconfig.cpp2
-rw-r--r--core/pim/today/todayconfig.h10
33 files changed, 109 insertions, 98 deletions
diff --git a/core/pim/today/main.cpp b/core/pim/today/main.cpp
index d4ec3ce..974c050 100644
--- a/core/pim/today/main.cpp
+++ b/core/pim/today/main.cpp
@@ -1,23 +1,24 @@
1/* 1/*
2 * main.cpp 2 * main.cpp
3 * 3 *
4 * --------------------- 4 * ---------------------
5 * 5 *
6 * begin : Sun 10 17:20:00 CEST 2002 6 * begin : Sun 10 17:20:00 CEST 2002
7 * copyright : (c) 2002 by Maximilian Reiß 7 * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß
8 * email : max.reiss@gmx.de 8 * email : max.reiss@gmx.de
9 * 9 *
10 */ 10 */
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by * 14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19 19
20#include "today.h" 20#include "today.h"
21#include <opie/oapplicationfactory.h> 21
22#include <opie2/oapplicationfactory.h>
22 23
23OPIE_EXPORT_APP( OApplicationFactory<Today> ) 24OPIE_EXPORT_APP( OApplicationFactory<Today> )
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro
index 413aa47..798c981 100644
--- a/core/pim/today/plugins/datebook/datebook.pro
+++ b/core/pim/today/plugins/datebook/datebook.pro
@@ -1,40 +1,40 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt plugin release 3CONFIG += qt plugin release
4# Input 4# Input
5HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ 5HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \
6 datebookevent.h datebookpluginwidget.h 6 datebookevent.h datebookpluginwidget.h
7SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ 7SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \
8 datebookevent.cpp datebookpluginwidget.cpp 8 datebookevent.cpp datebookpluginwidget.cpp
9INTERFACES = datebookpluginconfigbase.ui 9INTERFACES = datebookpluginconfigbase.ui
10 10
11INCLUDEPATH += $(OPIEDIR)/include \ 11INCLUDEPATH += $(OPIEDIR)/include \
12 ../ ../library 12 ../ ../library
13DEPENDPATH += $(OPIEDIR)/include \ 13DEPENDPATH += $(OPIEDIR)/include \
14 ../ ../library 14 ../ ../library
15 15
16LIBS+= -lqpe -lopie 16LIBS+= -lqpe -lopiecore2 -lopieui2 -lopiepim2
17 17
18DESTDIR = $(OPIEDIR)/plugins/today 18DESTDIR = $(OPIEDIR)/plugins/today
19TARGET = todaydatebookplugin 19TARGET = todaydatebookplugin
20 20
21TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ 21TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
22 ../../../../../i18n/nl/libtodaydatebookplugin.ts \ 22 ../../../../../i18n/nl/libtodaydatebookplugin.ts \
23 ../../../../../i18n/xx/libtodaydatebookplugin.ts \ 23 ../../../../../i18n/xx/libtodaydatebookplugin.ts \
24 ../../../../../i18n/en/libtodaydatebookplugin.ts \ 24 ../../../../../i18n/en/libtodaydatebookplugin.ts \
25 ../../../../../i18n/es/libtodaydatebookplugin.ts \ 25 ../../../../../i18n/es/libtodaydatebookplugin.ts \
26 ../../../../../i18n/fr/libtodaydatebookplugin.ts \ 26 ../../../../../i18n/fr/libtodaydatebookplugin.ts \
27 ../../../../../i18n/hu/libtodaydatebookplugin.ts \ 27 ../../../../../i18n/hu/libtodaydatebookplugin.ts \
28 ../../../../../i18n/ja/libtodaydatebookplugin.ts \ 28 ../../../../../i18n/ja/libtodaydatebookplugin.ts \
29 ../../../../../i18n/ko/libtodaydatebookplugin.ts \ 29 ../../../../../i18n/ko/libtodaydatebookplugin.ts \
30 ../../../../../i18n/no/libtodaydatebookplugin.ts \ 30 ../../../../../i18n/no/libtodaydatebookplugin.ts \
31 ../../../../../i18n/pl/libtodaydatebookplugin.ts \ 31 ../../../../../i18n/pl/libtodaydatebookplugin.ts \
32 ../../../../../i18n/pt/libtodaydatebookplugin.ts \ 32 ../../../../../i18n/pt/libtodaydatebookplugin.ts \
33 ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ 33 ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
34 ../../../../../i18n/sl/libtodaydatebookplugin.ts \ 34 ../../../../../i18n/sl/libtodaydatebookplugin.ts \
35 ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ 35 ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
36 ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ 36 ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
37 ../../../../../i18n/it/libtodaydatebookplugin.ts \ 37 ../../../../../i18n/it/libtodaydatebookplugin.ts \
38 ../../../../../i18n/da/libtodaydatebookplugin.ts 38 ../../../../../i18n/da/libtodaydatebookplugin.ts
39 39
40include ( $(OPIEDIR)/include.pro ) 40include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp
index e19a690..9a820f2 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -1,70 +1,71 @@
1/* 1/*
2 * datebookevent.cpp 2 * datebookevent.cpp
3 * 3 *
4 * copyright : (c) 2002, 2003 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 "datebookevent.h" 17#include "datebookevent.h"
18
18#include <qpe/config.h> 19#include <qpe/config.h>
19#include <qpe/qcopenvelope_qws.h> 20#include <qpe/qcopenvelope_qws.h>
20#include <qpe/calendar.h> 21#include <qpe/calendar.h>
21 22
22#include <opie/odevice.h> 23#include <opie2/odevice.h>
23 24
24using namespace Opie; 25using namespace Opie;
25 26
26DateBookEvent::DateBookEvent(const EffectiveEvent &ev, 27DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
27 QWidget* parent, 28 QWidget* parent,
28 bool show_location, 29 bool show_location,
29 bool show_notes, 30 bool show_notes,
30 bool timeExtraLine, 31 bool timeExtraLine,
31 int maxCharClip, 32 int maxCharClip,
32 const char* name, 33 const char* name,
33 WFlags fl) : 34 WFlags fl) :
34 OClickableLabel(parent,name,fl), event(ev) { 35 OClickableLabel(parent,name,fl), event(ev) {
35 36
36 // setAlignment( AlignTop ); 37 // setAlignment( AlignTop );
37 38
38 QString msg; 39 QString msg;
39 40
40 Config config( "qpe" ); 41 Config config( "qpe" );
41 config.setGroup( "Time" ); 42 config.setGroup( "Time" );
42 // if 24 h format 43 // if 24 h format
43 ampm = config.readBoolEntry( "AMPM", TRUE ); 44 ampm = config.readBoolEntry( "AMPM", TRUE );
44 45
45 msg += "<B>" + (ev).description() + "</B>"; 46 msg += "<B>" + (ev).description() + "</B>";
46 if ( (ev).event().hasAlarm() ) { 47 if ( (ev).event().hasAlarm() ) {
47 msg += " <b>" + tr("[with alarm]") +"</b>"; 48 msg += " <b>" + tr("[with alarm]") +"</b>";
48 } 49 }
49 50
50 // include location or not 51 // include location or not
51 if ( show_location ) { 52 if ( show_location ) {
52 msg += "<BR><i>" + (ev).location() + "</i>"; 53 msg += "<BR><i>" + (ev).location() + "</i>";
53 } 54 }
54 55
55 QString timeSpacer = " "; 56 QString timeSpacer = " ";
56 if ( timeExtraLine ) { 57 if ( timeExtraLine ) {
57 timeSpacer = "<br>"; 58 timeSpacer = "<br>";
58 } 59 }
59 60
60 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" ) 61 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
61 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) { 62 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
62 msg += tr ( "All day" ); 63 msg += tr ( "All day" );
63 } else { 64 } else {
64 // start time of event 65 // start time of event
65// QDate tempDate = (ev).event().start().date(); 66// QDate tempDate = (ev).event().start().date();
66 msg += timeSpacer; 67 msg += timeSpacer;
67 msg += ampmTime( QTime( (ev).event().start().time() ) ) 68 msg += ampmTime( QTime( (ev).event().start().time() ) )
68 // end time of event 69 // end time of event
69 + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) ); 70 + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) );
70 } 71 }
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h
index 1a090e3..e2ee077 100644
--- a/core/pim/today/plugins/datebook/datebookevent.h
+++ b/core/pim/today/plugins/datebook/datebookevent.h
@@ -1,54 +1,56 @@
1/* 1/*
2 * datebookplugin.h 2 * datebookplugin.h
3 * 3 *
4 * copyright : (c) 2002, 2003 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 <opie/oclickablelabel.h> 20#include <opie2/oclickablelabel.h>
21
21#include <qpe/datebookdb.h> 22#include <qpe/datebookdb.h>
22 23
24using namespace Opie;
23 25
24class DateBookEvent: public OClickableLabel { 26class DateBookEvent: public OClickableLabel {
25 27
26 Q_OBJECT 28 Q_OBJECT
27 29
28public: 30public:
29 DateBookEvent( const EffectiveEvent &ev, 31 DateBookEvent( const EffectiveEvent &ev,
30 QWidget* parent = 0, 32 QWidget* parent = 0,
31 bool show_location = 0, 33 bool show_location = 0,
32 bool show_notes = 0, 34 bool show_notes = 0,
33 bool timeExtraLine = 0, 35 bool timeExtraLine = 0,
34 int maxCharClip = 0, 36 int maxCharClip = 0,
35 const char* name = 0, 37 const char* name = 0,
36 WFlags fl = 0 ); 38 WFlags fl = 0 );
37 ~DateBookEvent(); 39 ~DateBookEvent();
38 40
39 signals: 41 signals:
40 void editEvent( const Event &e ); 42 void editEvent( const Event &e );
41 43
42private slots: 44private slots:
43 void editEventSlot( const Event &e ); 45 void editEventSlot( const Event &e );
44 void editMe(); 46 void editMe();
45 47
46 private: 48 private:
47 49
48 QString ampmTime( QTime ); 50 QString ampmTime( QTime );
49 QString differDate( QDate date ); 51 QString differDate( QDate date );
50 const EffectiveEvent event; 52 const EffectiveEvent event;
51 bool ampm; 53 bool ampm;
52}; 54};
53 55
54#endif 56#endif
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp
index 8dfa52f..f46806f 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.cpp
+++ b/core/pim/today/plugins/datebook/datebookplugin.cpp
@@ -1,67 +1,64 @@
1
2/* 1/*
3 * datebookplugin.cpp 2 * datebookplugin.cpp
4 * 3 *
5 * copyright : (c) 2002,2003 by Maximilian Reiß 4 * copyright : (c) 2002,2003, 2004 by Maximilian Reiß
6 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
7 * 6 *
8 */ 7 */
9/*************************************************************************** 8/***************************************************************************
10 * * 9 * *
11 * 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 *
12 * 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 *
13 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 13 * (at your option) any later version. *
15 * * 14 * *
16 ***************************************************************************/ 15 ***************************************************************************/
17 16
18
19
20#include "datebookplugin.h" 17#include "datebookplugin.h"
21#include "datebookpluginconfig.h" 18#include "datebookpluginconfig.h"
22 19
23 20
24DatebookPlugin::DatebookPlugin() { 21DatebookPlugin::DatebookPlugin() {
25} 22}
26 23
27DatebookPlugin::~DatebookPlugin() { 24DatebookPlugin::~DatebookPlugin() {
28 delete (DatebookPluginWidget*)m_widget; 25 delete (DatebookPluginWidget*)m_widget;
29} 26}
30 27
31QString DatebookPlugin::pluginName() const { 28QString DatebookPlugin::pluginName() const {
32 return QObject::tr( "Datebook plugin"); 29 return QObject::tr( "Datebook plugin");
33} 30}
34 31
35double DatebookPlugin::versionNumber() const { 32double DatebookPlugin::versionNumber() const {
36 return 1.0; 33 return 1.0;
37} 34}
38 35
39QString DatebookPlugin::pixmapNameWidget() const { 36QString DatebookPlugin::pixmapNameWidget() const {
40 return "datebook/DateBook"; 37 return "datebook/DateBook";
41} 38}
42 39
43QWidget* DatebookPlugin::widget( QWidget* wid ) { 40QWidget* DatebookPlugin::widget( QWidget* wid ) {
44 if(!m_widget) { 41 if(!m_widget) {
45 m_widget = new DatebookPluginWidget( wid, "Datebook" ); 42 m_widget = new DatebookPluginWidget( wid, "Datebook" );
46 } 43 }
47 return m_widget; 44 return m_widget;
48} 45}
49 46
50QString DatebookPlugin::pixmapNameConfig() const { 47QString DatebookPlugin::pixmapNameConfig() const {
51 return "datebook/DateBook"; 48 return "datebook/DateBook";
52} 49}
53 50
54TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { 51TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) {
55 return new DatebookPluginConfig( wid , "Datebook" ); 52 return new DatebookPluginConfig( wid , "Datebook" );
56} 53}
57 54
58QString DatebookPlugin::appName() const { 55QString DatebookPlugin::appName() const {
59 return "datebook"; 56 return "datebook";
60} 57}
61 58
62bool DatebookPlugin::excludeFromRefresh() const { 59bool DatebookPlugin::excludeFromRefresh() const {
63 return false; 60 return false;
64} 61}
65 62
66void DatebookPlugin::refresh() { 63void DatebookPlugin::refresh() {
67 if ( m_widget ) { 64 if ( m_widget ) {
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h
index 890c59b..631d6a3 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.h
+++ b/core/pim/today/plugins/datebook/datebookplugin.h
@@ -1,49 +1,49 @@
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 <qguardedptr.h> 20#include "datebookpluginwidget.h"
21 21
22#include <opie/oclickablelabel.h> 22#include <opie2/oclickablelabel.h>
23#include <opie/todayplugininterface.h> 23#include <opie2/todayplugininterface.h>
24 24
25#include "datebookpluginwidget.h" 25#include <qguardedptr.h>
26 26
27class DatebookPlugin : public TodayPluginObject { 27class DatebookPlugin : public TodayPluginObject {
28 28
29public: 29public:
30 DatebookPlugin(); 30 DatebookPlugin();
31 ~DatebookPlugin(); 31 ~DatebookPlugin();
32 32
33 QString pluginName() const; 33 QString pluginName() const;
34 double versionNumber() const; 34 double versionNumber() const;
35 QString pixmapNameWidget() const; 35 QString pixmapNameWidget() const;
36 QWidget* widget( QWidget *); 36 QWidget* widget( QWidget *);
37 QString pixmapNameConfig() const; 37 QString pixmapNameConfig() const;
38 TodayConfigWidget* configWidget( QWidget *); 38 TodayConfigWidget* configWidget( QWidget *);
39 QString appName() const; 39 QString appName() const;
40 bool excludeFromRefresh() const; 40 bool excludeFromRefresh() const;
41 void refresh(); 41 void refresh();
42 void reinitialize(); 42 void reinitialize();
43 43
44 private: 44 private:
45 QGuardedPtr<DatebookPluginWidget> m_widget; 45 QGuardedPtr<DatebookPluginWidget> m_widget;
46}; 46};
47 47
48 48
49#endif 49#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
index 8ead40d..5fd5221 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
@@ -1,52 +1,52 @@
1/* 1/*
2 * datebookpluginconfig.cpp 2 * datebookpluginconfig.cpp
3 * 3 *
4 * copyright : (c) 2002,2003 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 "datebookpluginconfig.h" 18#include "datebookpluginconfig.h"
19 19
20#include <qpe/config.h> 20#include <qpe/config.h>
21 21
22#include <qlayout.h> 22#include <qlayout.h>
23 23
24DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) 24DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name)
25 : TodayConfigWidget( parent, name ) { 25 : TodayConfigWidget( parent, name ) {
26 26
27 QVBoxLayout *layout = new QVBoxLayout( this ); 27 QVBoxLayout *layout = new QVBoxLayout( this );
28 28
29 m_gui = new DatebookPluginConfigBase( this ); 29 m_gui = new DatebookPluginConfigBase( this );
30 30
31 layout->addWidget( m_gui ); 31 layout->addWidget( m_gui );
32 32
33 readConfig(); 33 readConfig();
34} 34}
35 35
36void DatebookPluginConfig::readConfig() { 36void DatebookPluginConfig::readConfig() {
37 Config cfg( "todaydatebookplugin" ); 37 Config cfg( "todaydatebookplugin" );
38 cfg.setGroup( "config" ); 38 cfg.setGroup( "config" );
39 39
40 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); 40 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
41 m_gui->SpinBox1->setValue( m_max_lines_meet ); 41 m_gui->SpinBox1->setValue( m_max_lines_meet );
42 m_show_location = cfg.readNumEntry( "showlocation", 1 ); 42 m_show_location = cfg.readNumEntry( "showlocation", 1 );
43 m_gui->CheckBox1->setChecked( m_show_location ); 43 m_gui->CheckBox1->setChecked( m_show_location );
44 m_show_notes = cfg.readNumEntry( "shownotes", 0 ); 44 m_show_notes = cfg.readNumEntry( "shownotes", 0 );
45 m_gui->CheckBox2->setChecked( m_show_notes ); 45 m_gui->CheckBox2->setChecked( m_show_notes );
46 m_only_later = cfg.readNumEntry( "onlylater", 1 ); 46 m_only_later = cfg.readNumEntry( "onlylater", 1 );
47 m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) ); 47 m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) );
48 m_gui->CheckBox3->setChecked( m_only_later ); 48 m_gui->CheckBox3->setChecked( m_only_later );
49 m_more_days = cfg.readNumEntry( "moredays", 0 ); 49 m_more_days = cfg.readNumEntry( "moredays", 0 );
50 m_gui->SpinBox2->setValue( m_more_days ); 50 m_gui->SpinBox2->setValue( m_more_days );
51} 51}
52 52
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h
index 2d303fc..4f4e3f1 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.h
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h
@@ -1,60 +1,63 @@
1/* 1/*
2 * datebookpluginconfig.h 2 * datebookpluginconfig.h
3 * 3 *
4 * copyright : (c) 2002,2003 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 DATEBOOK_PLUGIN_CONFIG_H 17#ifndef DATEBOOK_PLUGIN_CONFIG_H
18#define DATEBOOK_PLUGIN_CONFIG_H 18#define DATEBOOK_PLUGIN_CONFIG_H
19 19
20#include "datebookpluginconfigbase.h"
21
22#include <opie2/todayconfigwidget.h>
20 23
21#include <qcheckbox.h> 24#include <qcheckbox.h>
22#include <qspinbox.h> 25#include <qspinbox.h>
23 26
24#include <opie/todayconfigwidget.h>
25 27
26#include "datebookpluginconfigbase.h" 28
29
27 30
28class DatebookPluginConfig : public TodayConfigWidget { 31class DatebookPluginConfig : public TodayConfigWidget {
29 32
30 Q_OBJECT 33 Q_OBJECT
31 34
32 35
33public: 36public:
34 DatebookPluginConfig( QWidget *parent, const char *name ); 37 DatebookPluginConfig( QWidget *parent, const char *name );
35 ~DatebookPluginConfig(); 38 ~DatebookPluginConfig();
36 39
37 void writeConfig(); 40 void writeConfig();
38private: 41private:
39 /** 42 /**
40 * if changed then save 43 * if changed then save
41 */ 44 */
42 bool changed(); 45 bool changed();
43 void readConfig(); 46 void readConfig();
44 47
45 48
46 DatebookPluginConfigBase *m_gui; 49 DatebookPluginConfigBase *m_gui;
47 // how many lines should be showed in the datebook section 50 // how many lines should be showed in the datebook section
48 int m_max_lines_meet; 51 int m_max_lines_meet;
49 // If location is to be showed too, 1 to activate it. 52 // If location is to be showed too, 1 to activate it.
50 int m_show_location; 53 int m_show_location;
51 // if notes should be shown 54 // if notes should be shown
52 int m_show_notes; 55 int m_show_notes;
53 // should only later appointments be shown or all for the current day. 56 // should only later appointments be shown or all for the current day.
54 int m_only_later; 57 int m_only_later;
55 int m_more_days; 58 int m_more_days;
56 59
57}; 60};
58 61
59 62
60#endif 63#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
index 6baffb9..ee250db 100644
--- a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
@@ -1,45 +1,45 @@
1/* 1/*
2 * datebookpluginimpl.cpp 2 * datebookpluginimpl.cpp
3 * 3 *
4 * copyright : (c) 2002 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 "datebookpluginimpl.h" 18#include "datebookpluginimpl.h"
19 19
20DatebookPluginImpl::DatebookPluginImpl() { 20DatebookPluginImpl::DatebookPluginImpl() {
21 datebookPlugin = new DatebookPlugin(); 21 datebookPlugin = new DatebookPlugin();
22} 22}
23 23
24DatebookPluginImpl::~DatebookPluginImpl() { 24DatebookPluginImpl::~DatebookPluginImpl() {
25 delete datebookPlugin; 25 delete datebookPlugin;
26} 26}
27 27
28TodayPluginObject* DatebookPluginImpl::guiPart() { 28TodayPluginObject* DatebookPluginImpl::guiPart() {
29 return datebookPlugin; 29 return datebookPlugin;
30} 30}
31 31
32QRESULT DatebookPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { 32QRESULT DatebookPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) {
33 *iface = 0; 33 *iface = 0;
34 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { 34 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) {
35 *iface = this, (*iface)->addRef(); 35 *iface = this, (*iface)->addRef();
36 }else 36 }else
37 return QS_FALSE; 37 return QS_FALSE;
38 38
39 return QS_OK; 39 return QS_OK;
40 40
41} 41}
42 42
43Q_EXPORT_INTERFACE() { 43Q_EXPORT_INTERFACE() {
44 Q_CREATE_INSTANCE( DatebookPluginImpl ); 44 Q_CREATE_INSTANCE( DatebookPluginImpl );
45} 45}
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.h b/core/pim/today/plugins/datebook/datebookpluginimpl.h
index 7c19e59..d34dd6d 100644
--- a/core/pim/today/plugins/datebook/datebookpluginimpl.h
+++ b/core/pim/today/plugins/datebook/datebookpluginimpl.h
@@ -1,39 +1,39 @@
1/* 1/*
2 * datebookpluginimpl.h 2 * datebookpluginimpl.h
3 * 3 *
4 * copyright : (c) 2002 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 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 <opie/todayplugininterface.h> 20#include <opie2/todayplugininterface.h>
21 21
22class DatebookPlugin; 22class DatebookPlugin;
23 23
24class DatebookPluginImpl : public TodayPluginInterface{ 24class DatebookPluginImpl : public TodayPluginInterface{
25 25
26public: 26public:
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
35private: 35private:
36 DatebookPlugin *datebookPlugin; 36 DatebookPlugin *datebookPlugin;
37}; 37};
38 38
39#endif 39#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 1b11d1b..b6707df 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -1,52 +1,52 @@
1 /* 1 /*
2 * datebookpluginwidget.cpp 2 * datebookpluginwidget.cpp
3 * 3 *
4 * copyright : (c) 2002,2003 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 "datebookpluginwidget.h" 18#include "datebookpluginwidget.h"
19 19
20#include <qpe/config.h> 20#include <qpe/config.h>
21 21
22#include <qtl.h> 22#include <qtl.h>
23 23
24DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name ) 24DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
25 : QWidget(parent, name ) { 25 : QWidget(parent, name ) {
26 26
27 db = 0l; 27 db = 0l;
28 m_layoutDates = 0l; 28 m_layoutDates = 0l;
29 29
30 if ( m_layoutDates ) { 30 if ( m_layoutDates ) {
31 delete m_layoutDates; 31 delete m_layoutDates;
32 } 32 }
33 m_layoutDates = new QVBoxLayout( this ); 33 m_layoutDates = new QVBoxLayout( this );
34 m_layoutDates->setAutoAdd( true ); 34 m_layoutDates->setAutoAdd( true );
35 35
36 m_eventsList.setAutoDelete( true ); 36 m_eventsList.setAutoDelete( true );
37 37
38 readConfig(); 38 readConfig();
39 getDates(); 39 getDates();
40} 40}
41 41
42DatebookPluginWidget::~DatebookPluginWidget() { 42DatebookPluginWidget::~DatebookPluginWidget() {
43 delete db; 43 delete db;
44 delete m_layoutDates; 44 delete m_layoutDates;
45} 45}
46 46
47 47
48void DatebookPluginWidget::readConfig() { 48void DatebookPluginWidget::readConfig() {
49 Config cfg( "todaydatebookplugin" ); 49 Config cfg( "todaydatebookplugin" );
50 cfg.setGroup( "config" ); 50 cfg.setGroup( "config" );
51 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); 51 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
52 m_show_location = cfg.readNumEntry( "showlocation", 1 ); 52 m_show_location = cfg.readNumEntry( "showlocation", 1 );
@@ -55,86 +55,86 @@ void DatebookPluginWidget::readConfig() {
55 m_moreDays = cfg.readNumEntry( "moredays", 0 ); 55 m_moreDays = cfg.readNumEntry( "moredays", 0 );
56 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 ); 56 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
57} 57}
58 58
59void DatebookPluginWidget::reinitialize() { 59void DatebookPluginWidget::reinitialize() {
60 readConfig(); 60 readConfig();
61 refresh(); 61 refresh();
62} 62}
63 63
64void DatebookPluginWidget::refresh() { 64void DatebookPluginWidget::refresh() {
65 m_eventsList.clear(); 65 m_eventsList.clear();
66 66
67 if ( m_layoutDates ) { 67 if ( m_layoutDates ) {
68 delete m_layoutDates; 68 delete m_layoutDates;
69 } 69 }
70 m_layoutDates = new QVBoxLayout( this ); 70 m_layoutDates = new QVBoxLayout( this );
71 m_layoutDates->setAutoAdd( true ); 71 m_layoutDates->setAutoAdd( true );
72 72
73 getDates(); 73 getDates();
74} 74}
75 75
76/** 76/**
77 * Get all events that are in the datebook xml file for today 77 * Get all events that are in the datebook xml file for today
78 */ 78 */
79void DatebookPluginWidget::getDates() { 79void DatebookPluginWidget::getDates() {
80 80
81 81
82 if ( db ) { 82 if ( db ) {
83 delete db; 83 delete db;
84 } 84 }
85 db = new DateBookDB; 85 db = new DateBookDB;
86 86
87 QDate date = QDate::currentDate(); 87 QDate date = QDate::currentDate();
88 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) ); 88 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
89 qBubbleSort( list ); 89 qBubbleSort( list );
90 int count = 0; 90 int count = 0;
91 91
92 if ( list.count() > 0 ) { 92 if ( list.count() > 0 ) {
93 93
94 for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) { 94 for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
95 95
96 if ( count < m_max_lines_meet ) { 96 if ( count < m_max_lines_meet ) {
97 if ( !m_onlyLater ) { 97 if ( !m_onlyLater ) {
98 count++; 98 count++;
99 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); 99 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
100 m_eventsList.append( l ); 100 m_eventsList.append( l );
101 l->show(); 101 l->show();
102 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 102 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
103 } else { 103 } else {
104 if ( ( QDateTime::currentDateTime() <= (*it).event().end() ) 104 if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
105 // Show events which span over many days and are not elapsed. 105 // Show events which span over many days and are not elapsed.
106 || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) ) 106 || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
107 // Show repeated event for today that is not elapsed. 107 // Show repeated event for today that is not elapsed.
108 || ( ( (*it).event().repeatType() != Event::NoRepeat ) 108 || ( ( (*it).event().repeatType() != Event::NoRepeat )
109 && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() ) 109 && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
110 && ( QTime::currentTime() < (*it).event().start().time() ) ) ) 110 && ( QTime::currentTime() < (*it).event().start().time() ) ) )
111 // Show repeated event for next days. 111 // Show repeated event for next days.
112 || ( ( (*it).event().repeatType() != Event::NoRepeat ) 112 || ( ( (*it).event().repeatType() != Event::NoRepeat )
113 && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) ) 113 && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
114 ) 114 )
115 { 115 {
116 count++; 116 count++;
117 // show only later appointments 117 // show only later appointments
118 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); 118 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
119 m_eventsList.append( l ); 119 m_eventsList.append( l );
120 l->show(); 120 l->show();
121 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 121 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
122 } 122 }
123 } 123 }
124 } 124 }
125 } 125 }
126 if ( m_onlyLater && count == 0 ) { 126 if ( m_onlyLater && count == 0 ) {
127 QLabel* noMoreEvents = new QLabel( this ); 127 QLabel* noMoreEvents = new QLabel( this );
128 m_eventsList.append( noMoreEvents ); 128 m_eventsList.append( noMoreEvents );
129 noMoreEvents->show(); 129 noMoreEvents->show();
130 noMoreEvents->setText( QObject::tr( "No more appointments today" ) ); 130 noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
131 } 131 }
132 } else { 132 } else {
133 QLabel* noEvents = new QLabel( this ); 133 QLabel* noEvents = new QLabel( this );
134 m_eventsList.append( noEvents ); 134 m_eventsList.append( noEvents );
135 noEvents->show(); 135 noEvents->show();
136 noEvents->setText( QObject::tr( "No appointments today" ) ); 136 noEvents->setText( QObject::tr( "No appointments today" ) );
137 } 137 }
138} 138}
139 139
140 140
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h
index 8988073..68af323 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.h
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h
@@ -1,60 +1,63 @@
1/* 1/*
2 * datebookpluginwidget.h 2 * datebookpluginwidget.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_WIDGET_H 17#ifndef DATEBOOK_PLUGIN_WIDGET_H
18#define DATEBOOK_PLUGIN_WIDGET_H 18#define DATEBOOK_PLUGIN_WIDGET_H
19 19
20#include "datebookevent.h"
21
22#include <opie2/oclickablelabel.h>
23
24#include <qpe/datebookdb.h>
25
20#include <qlayout.h> 26#include <qlayout.h>
21#include <qguardedptr.h> 27#include <qguardedptr.h>
22#include <qlist.h> 28#include <qlist.h>
23 29
24#include <qpe/datebookdb.h> 30using namespace Opie;
25#include <opie/oclickablelabel.h>
26
27#include "datebookevent.h"
28 31
29class DatebookPluginWidget : public QWidget { 32class DatebookPluginWidget : public QWidget {
30 33
31 Q_OBJECT 34 Q_OBJECT
32 35
33public: 36public:
34 DatebookPluginWidget( QWidget *parent, const char *name ); 37 DatebookPluginWidget( QWidget *parent, const char *name );
35 ~DatebookPluginWidget(); 38 ~DatebookPluginWidget();
36 void refresh(); 39 void refresh();
37 void reinitialize(); 40 void reinitialize();
38 41
39private: 42private:
40 DateBookDB* db; 43 DateBookDB* db;
41 QGuardedPtr<QVBoxLayout> m_layoutDates; 44 QGuardedPtr<QVBoxLayout> m_layoutDates;
42 QList<QWidget> m_eventsList; 45 QList<QWidget> m_eventsList;
43 void readConfig(); 46 void readConfig();
44 void getDates(); 47 void getDates();
45 48
46 49
47 // how many lines should be showed in the datebook section 50 // how many lines should be showed in the datebook section
48 int m_max_lines_meet; 51 int m_max_lines_meet;
49 // If location is to be showed too, 1 to activate it. 52 // If location is to be showed too, 1 to activate it.
50 bool m_show_location; 53 bool m_show_location;
51 // if notes should be shown 54 // if notes should be shown
52 bool m_show_notes; 55 bool m_show_notes;
53 // should only later appointments be shown or all for the current day. 56 // should only later appointments be shown or all for the current day.
54 bool m_onlyLater; 57 bool m_onlyLater;
55 int m_moreDays; 58 int m_moreDays;
56 // true if time of an appointment should be an extra line 59 // true if time of an appointment should be an extra line
57 bool m_timeExtraLine; 60 bool m_timeExtraLine;
58}; 61};
59 62
60#endif 63#endif
diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro
index 70c484d..1c3555b 100644
--- a/core/pim/today/plugins/mail/mail.pro
+++ b/core/pim/today/plugins/mail/mail.pro
@@ -1,37 +1,37 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt release
4 4
5# Input 5# Input
6HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h 6HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h
7SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp 7SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp
8 8
9INCLUDEPATH += $(OPIEDIR)/include \ 9INCLUDEPATH += $(OPIEDIR)/include \
10 ../ ../library 10 ../ ../library
11DEPENDPATH += $(OPIEDIR)/include \ 11DEPENDPATH += $(OPIEDIR)/include \
12 ../ ../library 12 ../ ../library
13 13
14LIBS+= -lqpe -lopie 14LIBS+= -lqpe -lopiecore2 -opiepim2
15 15
16DESTDIR = $(OPIEDIR)/plugins/today 16DESTDIR = $(OPIEDIR)/plugins/today
17TARGET = todaymailplugin 17TARGET = todaymailplugin
18 18
19TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \ 19TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
20 ../../../../../i18n/nl/libtodaymailplugin.ts \ 20 ../../../../../i18n/nl/libtodaymailplugin.ts \
21 ../../../../../i18n/xx/libtodaymailplugin.ts \ 21 ../../../../../i18n/xx/libtodaymailplugin.ts \
22 ../../../../../i18n/en/libtodaymailplugin.ts \ 22 ../../../../../i18n/en/libtodaymailplugin.ts \
23 ../../../../../i18n/es/libtodaymailplugin.ts \ 23 ../../../../../i18n/es/libtodaymailplugin.ts \
24 ../../../../../i18n/fr/libtodaymailplugin.ts \ 24 ../../../../../i18n/fr/libtodaymailplugin.ts \
25 ../../../../../i18n/hu/libtodaymailplugin.ts \ 25 ../../../../../i18n/hu/libtodaymailplugin.ts \
26 ../../../../../i18n/ja/libtodaymailplugin.ts \ 26 ../../../../../i18n/ja/libtodaymailplugin.ts \
27 ../../../../../i18n/ko/libtodaymailplugin.ts \ 27 ../../../../../i18n/ko/libtodaymailplugin.ts \
28 ../../../../../i18n/no/libtodaymailplugin.ts \ 28 ../../../../../i18n/no/libtodaymailplugin.ts \
29 ../../../../../i18n/pl/libtodaymailplugin.ts \ 29 ../../../../../i18n/pl/libtodaymailplugin.ts \
30 ../../../../../i18n/pt/libtodaymailplugin.ts \ 30 ../../../../../i18n/pt/libtodaymailplugin.ts \
31 ../../../../../i18n/pt_BR/libtodaymailplugin.ts \ 31 ../../../../../i18n/pt_BR/libtodaymailplugin.ts \
32 ../../../../../i18n/sl/libtodaymailplugin.ts \ 32 ../../../../../i18n/sl/libtodaymailplugin.ts \
33 ../../../../../i18n/zh_CN/libtodaymailplugin.ts \ 33 ../../../../../i18n/zh_CN/libtodaymailplugin.ts \
34 ../../../../../i18n/zh_TW/libtodaymailplugin.ts \ 34 ../../../../../i18n/zh_TW/libtodaymailplugin.ts \
35 ../../../../../i18n/it/libtodaymailplugin.ts \ 35 ../../../../../i18n/it/libtodaymailplugin.ts \
36 ../../../../../i18n/da/libtodaymailplugin.ts 36 ../../../../../i18n/da/libtodaymailplugin.ts
37include ( $(OPIEDIR)/include.pro ) 37include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h
index 7d6d5e8..1edffef 100644
--- a/core/pim/today/plugins/mail/mailplugin.h
+++ b/core/pim/today/plugins/mail/mailplugin.h
@@ -1,50 +1,53 @@
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"
22
23#include <opie2/todayplugininterface.h>
24#include <opie2/todayconfigwidget.h>
25
21#include <qwidget.h> 26#include <qwidget.h>
22#include <qguardedptr.h> 27#include <qguardedptr.h>
23 28
24#include <opie/todayplugininterface.h>
25#include <opie/todayconfigwidget.h>
26 29
27#include "mailpluginwidget.h" 30
28 31
29class MailPlugin : public TodayPluginObject { 32class MailPlugin : public TodayPluginObject {
30 33
31public: 34public:
32 MailPlugin(); 35 MailPlugin();
33 ~MailPlugin(); 36 ~MailPlugin();
34 37
35 QString pluginName() const; 38 QString pluginName() const;
36 double versionNumber() const; 39 double versionNumber() const;
37 QString pixmapNameWidget() const; 40 QString pixmapNameWidget() const;
38 QWidget* widget(QWidget *); 41 QWidget* widget(QWidget *);
39 QString pixmapNameConfig() const; 42 QString pixmapNameConfig() const;
40 TodayConfigWidget* configWidget(QWidget *); 43 TodayConfigWidget* configWidget(QWidget *);
41 QString appName() const; 44 QString appName() const;
42 bool excludeFromRefresh() const; 45 bool excludeFromRefresh() const;
43 void refresh(); 46 void refresh();
44 void reinitialize(); 47 void reinitialize();
45 48
46 private: 49 private:
47 QGuardedPtr<MailPluginWidget> m_widget; 50 QGuardedPtr<MailPluginWidget> m_widget;
48}; 51};
49 52
50#endif 53#endif
diff --git a/core/pim/today/plugins/mail/mailpluginimpl.cpp b/core/pim/today/plugins/mail/mailpluginimpl.cpp
index dfd3a64..fac27f4 100644
--- a/core/pim/today/plugins/mail/mailpluginimpl.cpp
+++ b/core/pim/today/plugins/mail/mailpluginimpl.cpp
@@ -1,48 +1,48 @@
1/* 1/*
2 * mailpluginimpl.cpp 2 * mailpluginimpl.cpp
3 * 3 *
4 * copyright : (c) 2002 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 18
19#include "mailplugin.h" 19#include "mailplugin.h"
20#include "mailpluginimpl.h" 20#include "mailpluginimpl.h"
21 21
22MailPluginImpl::MailPluginImpl() { 22MailPluginImpl::MailPluginImpl() {
23 mailPlugin = new MailPlugin(); 23 mailPlugin = new MailPlugin();
24} 24}
25 25
26MailPluginImpl::~MailPluginImpl() { 26MailPluginImpl::~MailPluginImpl() {
27 delete mailPlugin; 27 delete mailPlugin;
28} 28}
29 29
30 30
31TodayPluginObject* MailPluginImpl::guiPart() { 31TodayPluginObject* MailPluginImpl::guiPart() {
32 return mailPlugin; 32 return mailPlugin;
33} 33}
34 34
35QRESULT MailPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { 35QRESULT MailPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) {
36 *iface = 0; 36 *iface = 0;
37 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { 37 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) {
38 *iface = this, (*iface)->addRef(); 38 *iface = this, (*iface)->addRef();
39 }else 39 }else
40 return QS_FALSE; 40 return QS_FALSE;
41 41
42 return QS_OK; 42 return QS_OK;
43 43
44} 44}
45 45
46Q_EXPORT_INTERFACE() { 46Q_EXPORT_INTERFACE() {
47 Q_CREATE_INSTANCE( MailPluginImpl ); 47 Q_CREATE_INSTANCE( MailPluginImpl );
48} 48}
diff --git a/core/pim/today/plugins/mail/mailpluginimpl.h b/core/pim/today/plugins/mail/mailpluginimpl.h
index 72e1760..35b3805 100644
--- a/core/pim/today/plugins/mail/mailpluginimpl.h
+++ b/core/pim/today/plugins/mail/mailpluginimpl.h
@@ -1,39 +1,39 @@
1/* 1/*
2 * mailpluginimpl.h 2 * mailpluginimpl.h
3 * 3 *
4 * copyright : (c) 2002 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 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 <opie/todayplugininterface.h> 20#include <opie2/todayplugininterface.h>
21 21
22class MailPlugin; 22class MailPlugin;
23 23
24class MailPluginImpl : public TodayPluginInterface{ 24class MailPluginImpl : public TodayPluginInterface{
25 25
26public: 26public:
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
35private: 35private:
36 MailPlugin *mailPlugin; 36 MailPlugin *mailPlugin;
37}; 37};
38 38
39#endif 39#endif
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index feecd81..4194270 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -1,69 +1,68 @@
1/* 1/*
2 * mailpluginwidget.cpp 2 * mailpluginwidget.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#include "mailpluginwidget.h"
16 17
17#include <qpe/config.h> 18#include <qpe/config.h>
18#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
19 20
20#include "mailpluginwidget.h"
21
22MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) 21MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
23 : QWidget(parent, name ) { 22 : QWidget(parent, name ) {
24 23
25 m_mailLabel = 0l; 24 m_mailLabel = 0l;
26 m_layout = 0l; 25 m_layout = 0l;
27 26
28 if ( m_mailLabel ) { 27 if ( m_mailLabel ) {
29 delete m_mailLabel; 28 delete m_mailLabel;
30 } 29 }
31 m_mailLabel = new OClickableLabel( this ); 30 m_mailLabel = new OClickableLabel( this );
32 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); 31 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
33 32
34 if ( m_layout ) { 33 if ( m_layout ) {
35 delete m_layout; 34 delete m_layout;
36 } 35 }
37 m_layout = new QHBoxLayout( this ); 36 m_layout = new QHBoxLayout( this );
38 m_layout->setAutoAdd( true ); 37 m_layout->setAutoAdd( true );
39 38
40 39
41#if defined(Q_WS_QWS) 40#if defined(Q_WS_QWS)
42#if !defined(QT_NO_COP) 41#if !defined(QT_NO_COP)
43 QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this ); 42 QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this );
44 connect ( qCopChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 43 connect ( qCopChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
45 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 44 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
46#endif 45#endif
47#endif 46#endif
48 47
49 readConfig(); 48 readConfig();
50 getInfo(); 49 getInfo();
51} 50}
52 51
53 52
54void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) { 53void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) {
55 QDataStream stream( data, IO_ReadOnly ); 54 QDataStream stream( data, IO_ReadOnly );
56 if ( msg == "outgoingMails(int)" ) { 55 if ( msg == "outgoingMails(int)" ) {
57 stream >> m_outgoing; 56 stream >> m_outgoing;
58 } else if ( msg == "newMails(int)" ) { 57 } else if ( msg == "newMails(int)" ) {
59 stream >> m_newMails; 58 stream >> m_newMails;
60 } 59 }
61 getInfo(); 60 getInfo();
62} 61}
63MailPluginWidget::~MailPluginWidget() { 62MailPluginWidget::~MailPluginWidget() {
64 delete m_mailLabel; 63 delete m_mailLabel;
65 delete m_layout; 64 delete m_layout;
66} 65}
67 66
68 67
69void MailPluginWidget::readConfig() { 68void MailPluginWidget::readConfig() {
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.h b/core/pim/today/plugins/mail/mailpluginwidget.h
index 6d16d2c..0ad8738 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.h
+++ b/core/pim/today/plugins/mail/mailpluginwidget.h
@@ -1,50 +1,52 @@
1/* 1/*
2 * mailpluginwidget.h 2 * mailpluginwidget.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 MAIL_PLUGIN_WIDGET_H 17#ifndef MAIL_PLUGIN_WIDGET_H
18#define MAIL_PLUGIN_WIDGET_H 18#define MAIL_PLUGIN_WIDGET_H
19 19
20#include <qlayout.h> 20#include <qlayout.h>
21 21
22#include <opie/oclickablelabel.h> 22#include <opie2/oclickablelabel.h>
23
24using namespace Opie;
23 25
24class MailPluginWidget : public QWidget { 26class MailPluginWidget : public QWidget {
25 27
26 Q_OBJECT 28 Q_OBJECT
27 29
28public: 30public:
29 MailPluginWidget( QWidget *parent, const char *name ); 31 MailPluginWidget( QWidget *parent, const char *name );
30 ~MailPluginWidget(); 32 ~MailPluginWidget();
31 33
32 void refresh(); 34 void refresh();
33 35
34protected slots: 36protected slots:
35 void startMail(); 37 void startMail();
36 38
37private: 39private:
38 OClickableLabel* m_mailLabel; 40 OClickableLabel* m_mailLabel;
39 QHBoxLayout* m_layout; 41 QHBoxLayout* m_layout;
40 void readConfig(); 42 void readConfig();
41 void getInfo(); 43 void getInfo();
42 44
43 int m_newMails; 45 int m_newMails;
44 int m_outgoing; 46 int m_outgoing;
45 47
46private slots: 48private slots:
47 void channelReceived(const QCString &msg, const QByteArray & data); 49 void channelReceived(const QCString &msg, const QByteArray & data);
48}; 50};
49 51
50#endif 52#endif
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro
index 095247f..8f2f898 100644
--- a/core/pim/today/plugins/todolist/todolist.pro
+++ b/core/pim/today/plugins/todolist/todolist.pro
@@ -1,41 +1,41 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt plugin release 3CONFIG += qt plugin release
4 4
5# Input 5# Input
6HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ 6HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \
7 todopluginwidget.h 7 todopluginwidget.h
8SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ 8SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \
9 todopluginwidget.cpp 9 todopluginwidget.cpp
10INTERFACES= todopluginconfigbase.ui 10INTERFACES= todopluginconfigbase.ui
11 11
12INCLUDEPATH += $(OPIEDIR)/include \ 12INCLUDEPATH += $(OPIEDIR)/include \
13 ../ ../library 13 ../ ../library
14DEPENDPATH += $(OPIEDIR)/include \ 14DEPENDPATH += $(OPIEDIR)/include \
15 ../ ../library 15 ../ ../library
16 16
17LIBS+= -lqpe -lopie 17LIBS+= -lqpe -lopiecore2 -lopieui2 -lopiepim2
18 18
19DESTDIR = $(OPIEDIR)/plugins/today 19DESTDIR = $(OPIEDIR)/plugins/today
20TARGET = todaytodolistplugin 20TARGET = todaytodolistplugin
21 21
22TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ 22TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \
23 ../../../../../i18n/nl/libtodaytodolistplugin.ts \ 23 ../../../../../i18n/nl/libtodaytodolistplugin.ts \
24 ../../../../../i18n/xx/libtodaytodolistplugin.ts \ 24 ../../../../../i18n/xx/libtodaytodolistplugin.ts \
25 ../../../../../i18n/en/libtodaytodolistplugin.ts \ 25 ../../../../../i18n/en/libtodaytodolistplugin.ts \
26 ../../../../../i18n/es/libtodaytodolistplugin.ts \ 26 ../../../../../i18n/es/libtodaytodolistplugin.ts \
27 ../../../../../i18n/fr/libtodaytodolistplugin.ts \ 27 ../../../../../i18n/fr/libtodaytodolistplugin.ts \
28 ../../../../../i18n/hu/libtodaytodolistplugin.ts \ 28 ../../../../../i18n/hu/libtodaytodolistplugin.ts \
29 ../../../../../i18n/ja/libtodaytodolistplugin.ts \ 29 ../../../../../i18n/ja/libtodaytodolistplugin.ts \
30 ../../../../../i18n/ko/libtodaytodolistplugin.ts \ 30 ../../../../../i18n/ko/libtodaytodolistplugin.ts \
31 ../../../../../i18n/no/libtodaytodolistplugin.ts \ 31 ../../../../../i18n/no/libtodaytodolistplugin.ts \
32 ../../../../../i18n/pl/libtodaytodolistplugin.ts \ 32 ../../../../../i18n/pl/libtodaytodolistplugin.ts \
33 ../../../../../i18n/pt/libtodaytodolistplugin.ts \ 33 ../../../../../i18n/pt/libtodaytodolistplugin.ts \
34 ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ 34 ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \
35 ../../../../../i18n/sl/libtodaytodolistplugin.ts \ 35 ../../../../../i18n/sl/libtodaytodolistplugin.ts \
36 ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ 36 ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \
37 ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ 37 ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \
38 ../../../../../i18n/it/libtodaytodolistplugin.ts \ 38 ../../../../../i18n/it/libtodaytodolistplugin.ts \
39 ../../../../../i18n/da/libtodaytodolistplugin.ts 39 ../../../../../i18n/da/libtodaytodolistplugin.ts
40 40
41include ( $(OPIEDIR)/include.pro ) 41include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp
index 801de9d..5783814 100644
--- a/core/pim/today/plugins/todolist/todoplugin.cpp
+++ b/core/pim/today/plugins/todolist/todoplugin.cpp
@@ -1,70 +1,67 @@
1/* 1/*
2 * todoplugin.cpp 2 * todoplugin.cpp
3 * 3 *
4 * copyright : (c) 2002,2003 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
18
19#include "todoplugin.h" 17#include "todoplugin.h"
20#include "todopluginconfig.h" 18#include "todopluginconfig.h"
21 19
22
23TodolistPlugin::TodolistPlugin() { 20TodolistPlugin::TodolistPlugin() {
24} 21}
25 22
26TodolistPlugin::~TodolistPlugin() { 23TodolistPlugin::~TodolistPlugin() {
27 delete (TodolistPluginWidget*)m_widget; 24 delete (TodolistPluginWidget*)m_widget;
28} 25}
29 26
30QString TodolistPlugin::pluginName() const { 27QString TodolistPlugin::pluginName() const {
31 return QObject::tr( "Todolist plugin" ); 28 return QObject::tr( "Todolist plugin" );
32} 29}
33 30
34double TodolistPlugin::versionNumber() const { 31double TodolistPlugin::versionNumber() const {
35 return 0.9; 32 return 0.9;
36} 33}
37 34
38QString TodolistPlugin::pixmapNameWidget() const { 35QString TodolistPlugin::pixmapNameWidget() const {
39 return "todo/TodoList"; 36 return "todo/TodoList";
40} 37}
41 38
42QWidget* TodolistPlugin::widget( QWidget *wid ) { 39QWidget* TodolistPlugin::widget( QWidget *wid ) {
43 if(!m_widget) { 40 if(!m_widget) {
44 m_widget = new TodolistPluginWidget( wid, "Todolist" ); 41 m_widget = new TodolistPluginWidget( wid, "Todolist" );
45 } 42 }
46 return m_widget; 43 return m_widget;
47} 44}
48 45
49QString TodolistPlugin::pixmapNameConfig() const { 46QString TodolistPlugin::pixmapNameConfig() const {
50 return "todo/TodoList"; 47 return "todo/TodoList";
51} 48}
52 49
53TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { 50TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) {
54 return new TodolistPluginConfig( wid , "Todolist" ); 51 return new TodolistPluginConfig( wid , "Todolist" );
55} 52}
56 53
57QString TodolistPlugin::appName() const { 54QString TodolistPlugin::appName() const {
58 return "todolist"; 55 return "todolist";
59} 56}
60 57
61 58
62bool TodolistPlugin::excludeFromRefresh() const { 59bool TodolistPlugin::excludeFromRefresh() const {
63 return false; 60 return false;
64} 61}
65 62
66void TodolistPlugin::refresh() { 63void TodolistPlugin::refresh() {
67 if ( m_widget ) { 64 if ( m_widget ) {
68 m_widget->refresh(); 65 m_widget->refresh();
69 } 66 }
70} 67}
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h
index f68162f..bea15d5 100644
--- a/core/pim/today/plugins/todolist/todoplugin.h
+++ b/core/pim/today/plugins/todolist/todoplugin.h
@@ -1,50 +1,53 @@
1/* 1/*
2 * todoplugin.h 2 * todoplugin.h
3 * 3 *
4 * copyright : (c) 2002 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
21#include "todopluginwidget.h"
22
23#include <opie2/oclickablelabel.h>
24#include <opie2/todayplugininterface.h>
25
20#include <qstring.h> 26#include <qstring.h>
21#include <qguardedptr.h> 27#include <qguardedptr.h>
22#include <qwidget.h> 28#include <qwidget.h>
23 29
24#include <opie/oclickablelabel.h> 30using namespace Opie;
25#include <opie/todayplugininterface.h>
26
27#include "todopluginwidget.h"
28 31
29class TodolistPlugin : public TodayPluginObject { 32class TodolistPlugin : public TodayPluginObject {
30 33
31public: 34public:
32 TodolistPlugin(); 35 TodolistPlugin();
33 ~TodolistPlugin(); 36 ~TodolistPlugin();
34 37
35 QString pluginName() const; 38 QString pluginName() const;
36 double versionNumber() const; 39 double versionNumber() const;
37 QString pixmapNameWidget() const; 40 QString pixmapNameWidget() const;
38 QWidget* widget(QWidget *); 41 QWidget* widget(QWidget *);
39 QString pixmapNameConfig() const; 42 QString pixmapNameConfig() const;
40 TodayConfigWidget* configWidget(QWidget *); 43 TodayConfigWidget* configWidget(QWidget *);
41 QString appName() const; 44 QString appName() const;
42 bool excludeFromRefresh() const; 45 bool excludeFromRefresh() const;
43 void refresh(); 46 void refresh();
44 void reinitialize(); 47 void reinitialize();
45 48
46 private: 49 private:
47 QGuardedPtr<TodolistPluginWidget> m_widget; 50 QGuardedPtr<TodolistPluginWidget> m_widget;
48}; 51};
49 52
50#endif 53#endif
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h
index a2d7d2c..7040369 100644
--- a/core/pim/today/plugins/todolist/todopluginconfig.h
+++ b/core/pim/today/plugins/todolist/todopluginconfig.h
@@ -1,58 +1,58 @@
1/* 1/*
2 * todopluginconfig.h 2 * todopluginconfig.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 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 <qspinbox.h> 20#include "todopluginconfigbase.h"
21 21
22#include <opie/todayconfigwidget.h> 22#include <opie2/todayconfigwidget.h>
23 23
24#include "todopluginconfigbase.h" 24#include <qspinbox.h>
25 25
26class TodolistPluginConfig : public TodayConfigWidget { 26class TodolistPluginConfig : public TodayConfigWidget {
27 Q_OBJECT 27 Q_OBJECT
28 28
29public: 29public:
30 30
31 TodolistPluginConfig( QWidget *parent, const char *name ); 31 TodolistPluginConfig( QWidget *parent, const char *name );
32 ~TodolistPluginConfig(); 32 ~TodolistPluginConfig();
33 33
34private: 34private:
35 /** 35 /**
36 * if changed then save 36 * if changed then save
37 */ 37 */
38 bool changed(); 38 bool changed();
39 void readConfig(); 39 void readConfig();
40 void writeConfig(); 40 void writeConfig();
41 41
42 TodoPluginConfigBase *m_gui; 42 TodoPluginConfigBase *m_gui;
43 43
44 44
45 // how many lines should be showed in the todolist section 45 // how many lines should be showed in the todolist section
46 int m_max_lines_task; 46 int m_max_lines_task;
47 // clip the lines after X chars 47 // clip the lines after X chars
48 int m_maxCharClip; 48 int m_maxCharClip;
49 49
50 50
51 51
52}; 52};
53 53
54 54
55 55
56 56
57 57
58#endif 58#endif
diff --git a/core/pim/today/plugins/todolist/todopluginimpl.cpp b/core/pim/today/plugins/todolist/todopluginimpl.cpp
index 639587f..1a6189f 100644
--- a/core/pim/today/plugins/todolist/todopluginimpl.cpp
+++ b/core/pim/today/plugins/todolist/todopluginimpl.cpp
@@ -1,46 +1,46 @@
1/* 1/*
2 * todopluginimpl.cpp 2 * todopluginimpl.cpp
3 * 3 *
4 * copyright : (c) 2002 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 "todopluginimpl.h" 18#include "todopluginimpl.h"
19 19
20TodolistPluginImpl::TodolistPluginImpl() { 20TodolistPluginImpl::TodolistPluginImpl() {
21 todolistPlugin = new TodolistPlugin(); 21 todolistPlugin = new TodolistPlugin();
22} 22}
23 23
24TodolistPluginImpl::~TodolistPluginImpl() { 24TodolistPluginImpl::~TodolistPluginImpl() {
25 delete todolistPlugin; 25 delete todolistPlugin;
26} 26}
27 27
28 28
29TodayPluginObject* TodolistPluginImpl::guiPart() { 29TodayPluginObject* TodolistPluginImpl::guiPart() {
30 return todolistPlugin; 30 return todolistPlugin;
31} 31}
32 32
33QRESULT TodolistPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { 33QRESULT TodolistPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) {
34 *iface = 0; 34 *iface = 0;
35 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { 35 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) {
36 *iface = this, (*iface)->addRef(); 36 *iface = this, (*iface)->addRef();
37 }else 37 }else
38 return QS_FALSE; 38 return QS_FALSE;
39 39
40 return QS_OK; 40 return QS_OK;
41 41
42} 42}
43 43
44Q_EXPORT_INTERFACE() { 44Q_EXPORT_INTERFACE() {
45 Q_CREATE_INSTANCE( TodolistPluginImpl ); 45 Q_CREATE_INSTANCE( TodolistPluginImpl );
46} 46}
diff --git a/core/pim/today/plugins/todolist/todopluginimpl.h b/core/pim/today/plugins/todolist/todopluginimpl.h
index ca62fdb..f9b0b37 100644
--- a/core/pim/today/plugins/todolist/todopluginimpl.h
+++ b/core/pim/today/plugins/todolist/todopluginimpl.h
@@ -1,39 +1,39 @@
1/* 1/*
2 * todopluginimpl.h 2 * todopluginimpl.h
3 * 3 *
4 * copyright : (c) 2002 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_IMPL_H 17#ifndef TODOLIST_PLUGIN_IMPL_H
18#define TODOLIST_PLUGIN_IMPL_H 18#define TODOLIST_PLUGIN_IMPL_H
19 19
20#include <opie/todayplugininterface.h> 20#include <opie2/todayplugininterface.h>
21 21
22class TodolistPlugin; 22class TodolistPlugin;
23 23
24class TodolistPluginImpl : public TodayPluginInterface{ 24class TodolistPluginImpl : public TodayPluginInterface{
25 25
26public: 26public:
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
35private: 35private:
36 TodolistPlugin *todolistPlugin; 36 TodolistPlugin *todolistPlugin;
37}; 37};
38 38
39#endif 39#endif
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp
index 0364f94..567c70f 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.cpp
+++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp
@@ -1,80 +1,80 @@
1/* 1/*
2 * todopluginwidget.cpp 2 * todopluginwidget.cpp
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#include "todopluginwidget.h" 17#include "todopluginwidget.h"
18 18
19#include <qpe/config.h> 19#include <qpe/config.h>
20#include <qpe/qcopenvelope_qws.h> 20#include <qpe/qcopenvelope_qws.h>
21 21
22TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) 22TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name )
23 : QWidget( parent, name ) { 23 : QWidget( parent, name ) {
24 24
25 todo = 0l; 25 todo = 0l;
26 layoutTodo = 0l; 26 layoutTodo = 0l;
27 todoLabel = 0l; 27 todoLabel = 0l;
28 28
29 if ( todo ) { 29 if ( todo ) {
30 delete todo; 30 delete todo;
31 } 31 }
32 todo = new OTodoAccess(); 32 todo = new OPimTodoAccess();
33 todo->load(); 33 todo->load();
34 34
35 if ( layoutTodo ) { 35 if ( layoutTodo ) {
36 delete layoutTodo; 36 delete layoutTodo;
37 } 37 }
38 layoutTodo = new QVBoxLayout( this ); 38 layoutTodo = new QVBoxLayout( this );
39 layoutTodo->setAutoAdd( true ); 39 layoutTodo->setAutoAdd( true );
40 40
41 if ( todoLabel ) { 41 if ( todoLabel ) {
42 delete todoLabel; 42 delete todoLabel;
43 } 43 }
44 todoLabel = new OClickableLabel( this ); 44 todoLabel = new OClickableLabel( this );
45 45
46 connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) ); 46 connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) );
47 47
48 readConfig(); 48 readConfig();
49 getTodo(); 49 getTodo();
50} 50}
51 51
52TodolistPluginWidget::~TodolistPluginWidget() { 52TodolistPluginWidget::~TodolistPluginWidget() {
53 delete todo; 53 delete todo;
54 delete todoLabel; 54 delete todoLabel;
55 delete layoutTodo; 55 delete layoutTodo;
56} 56}
57 57
58 58
59void TodolistPluginWidget::readConfig() { 59void TodolistPluginWidget::readConfig() {
60 Config cfg( "todaytodoplugin" ); 60 Config cfg( "todaytodoplugin" );
61 cfg.setGroup( "config" ); 61 cfg.setGroup( "config" );
62 m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); 62 m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 );
63 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); 63 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 );
64} 64}
65 65
66void TodolistPluginWidget:: refresh() { 66void TodolistPluginWidget:: refresh() {
67 todo->reload(); 67 todo->reload();
68 getTodo(); 68 getTodo();
69} 69}
70 70
71void TodolistPluginWidget::reinitialize() { 71void TodolistPluginWidget::reinitialize() {
72 readConfig(); 72 readConfig();
73 todo->reload(); 73 todo->reload();
74 getTodo(); 74 getTodo();
75} 75}
76 76
77/** 77/**
78 * Get the todos 78 * Get the todos
79 */ 79 */
80void TodolistPluginWidget::getTodo() { 80void TodolistPluginWidget::getTodo() {
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.h b/core/pim/today/plugins/todolist/todopluginwidget.h
index 9cac43d..a020cf4 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.h
+++ b/core/pim/today/plugins/todolist/todopluginwidget.h
@@ -1,54 +1,55 @@
1/* 1/*
2 * todopluginwidget.h 2 * todopluginwidget.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 TODOLIST_PLUGIN_WIDGET_H 17#ifndef TODOLIST_PLUGIN_WIDGET_H
18#define TODOLIST_PLUGIN_WIDGET_H 18#define TODOLIST_PLUGIN_WIDGET_H
19 19
20#include <qlayout.h> 20#include <qlayout.h>
21 21
22#include <opie/otodoaccess.h> 22#include <opie2/otodoaccess.h>
23#include <opie/oclickablelabel.h> 23#include <opie2/oclickablelabel.h>
24 24
25using namespace Opie;
25 26
26class TodolistPluginWidget : public QWidget { 27class TodolistPluginWidget : public QWidget {
27 28
28 Q_OBJECT 29 Q_OBJECT
29 30
30public: 31public:
31 TodolistPluginWidget( QWidget *parent, const char *name ); 32 TodolistPluginWidget( QWidget *parent, const char *name );
32 ~TodolistPluginWidget(); 33 ~TodolistPluginWidget();
33 34
34 void refresh(); 35 void refresh();
35 void reinitialize(); 36 void reinitialize();
36 37
37protected slots: 38protected slots:
38 void startTodolist(); 39 void startTodolist();
39 40
40private: 41private:
41 OClickableLabel *todoLabel; 42 OClickableLabel *todoLabel;
42 QVBoxLayout* layoutTodo; 43 QVBoxLayout* layoutTodo;
43 44
44 OTodoAccess *todo; 45 OPimTodoAccess *todo;
45 OTodoAccess::List m_list; 46 OPimTodoAccess::List m_list;
46 OTodoAccess::List::Iterator m_it; 47 OPimTodoAccess::List::Iterator m_it;
47 48
48 void readConfig(); 49 void readConfig();
49 void getTodo(); 50 void getTodo();
50 int m_maxLinesTask; 51 int m_maxLinesTask;
51 int m_maxCharClip; 52 int m_maxCharClip;
52}; 53};
53 54
54#endif 55#endif
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index c83a5df..b55a4a7 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -1,66 +1,64 @@
1/* 1/*
2 * today.cpp 2 * today.cpp
3 * 3 *
4 * copyright : (c) 2002,2003 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
18
19#define QTOPIA_INTERNAL_LANGLIST 17#define QTOPIA_INTERNAL_LANGLIST
20 18
21#include "today.h" 19#include "today.h"
22 20
23#include <qpe/config.h> 21#include <qpe/config.h>
24#include <qpe/qcopenvelope_qws.h> 22#include <qpe/qcopenvelope_qws.h>
25#include <qpe/resource.h> 23#include <qpe/resource.h>
26#include <qpe/global.h> 24#include <qpe/global.h>
27#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
28#include <qpe/contact.h> 26#include <qpe/contact.h>
29 27
30#include <qdir.h> 28#include <qdir.h>
31#include <qtimer.h> 29#include <qtimer.h>
32#include <qwhatsthis.h> 30#include <qwhatsthis.h>
33 31
34struct TodayPlugin { 32struct TodayPlugin {
35 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} 33 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
36 QLibrary *library; 34 QLibrary *library;
37 QInterfacePtr<TodayPluginInterface> iface; 35 QInterfacePtr<TodayPluginInterface> iface;
38 TodayPluginObject *guiPart; 36 TodayPluginObject *guiPart;
39 QWidget *guiBox; 37 QWidget *guiBox;
40 QString name; 38 QString name;
41 bool active; 39 bool active;
42 bool excludeRefresh; 40 bool excludeRefresh;
43 int pos; 41 int pos;
44}; 42};
45 43
46static QValueList<TodayPlugin> pluginList; 44static QValueList<TodayPlugin> pluginList;
47 45
48static QMap<QString, TodayPlugin> tempList; 46static QMap<QString, TodayPlugin> tempList;
49 47
50Today::Today( QWidget* parent, const char* name, WFlags fl ) 48Today::Today( QWidget* parent, const char* name, WFlags fl )
51 : TodayBase( parent, name, fl ) { 49 : TodayBase( parent, name, fl ) {
52 50
53 QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); 51 QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
54 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); 52 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
55 53
56#if defined(Q_WS_QWS) 54#if defined(Q_WS_QWS)
57#if !defined(QT_NO_COP) 55#if !defined(QT_NO_COP)
58 QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); 56 QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
59 connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 57 connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
60 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 58 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
61#endif 59#endif
62#endif 60#endif
63 61
64 setOwnerField(); 62 setOwnerField();
65 m_refreshTimer = new QTimer( this ); 63 m_refreshTimer = new QTimer( this );
66 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 64 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index bf2293a..972731c 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -1,81 +1,81 @@
1/* 1/*
2 * today.h 2 * today.h
3 * 3 *
4 * copyright : (c) 2002,2003 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
17
18#ifndef TODAY_H 16#ifndef TODAY_H
19#define TODAY_H 17#define TODAY_H
20 18
21#include <qscrollview.h>
22#include <qvbox.h>
23
24#include <qpe/qlibrary.h>
25 19
26#include "todayconfig.h" 20#include "todayconfig.h"
27#include "todaybase.h" 21#include "todaybase.h"
28 22
29#include <opie/todayplugininterface.h> 23#include <opie2/todayplugininterface.h>
24#include <opie2/oclickablelabel.h>
30 25
31class QVBoxLayout; 26#include <qpe/qlibrary.h>
32class OClickableLabel; 27
28#include <qscrollview.h>
29#include <qvbox.h>
33 30
31using namespace Opie;
32
33class QVBoxLayout;
34 34
35class Today : public TodayBase { 35class Today : public TodayBase {
36 36
37 Q_OBJECT 37 Q_OBJECT
38 38
39 public: 39 public:
40 Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 40 Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
41 ~Today(); 41 ~Today();
42 static QString appName() { return QString::fromLatin1("today"); } 42 static QString appName() { return QString::fromLatin1("today"); }
43 43
44private slots: 44private slots:
45 void startConfig(); 45 void startConfig();
46 void startApplication(); 46 void startApplication();
47 void editCard(); 47 void editCard();
48 void refresh(); 48 void refresh();
49 49
50private: 50private:
51 void init(); 51 void init();
52 void setOwnerField(); 52 void setOwnerField();
53 void setOwnerField(QString &string); 53 void setOwnerField(QString &string);
54 void loadPlugins(); 54 void loadPlugins();
55 void draw(); 55 void draw();
56 void reinitialize(); 56 void reinitialize();
57 57
58 void setRefreshTimer( int ); 58 void setRefreshTimer( int );
59 59
60private slots: 60private slots:
61 void channelReceived(const QCString &msg, const QByteArray & data); 61 void channelReceived(const QCString &msg, const QByteArray & data);
62 62
63 private: 63 private:
64 TodayConfig *conf; 64 TodayConfig *conf;
65 QStringList m_excludeApplets; 65 QStringList m_excludeApplets;
66 QStringList m_allApplets; 66 QStringList m_allApplets;
67 67
68 QScrollView *m_sv; 68 QScrollView *m_sv;
69 QWidget* m_big_box; 69 QWidget* m_big_box;
70 QVBoxLayout *m_bblayout; 70 QVBoxLayout *m_bblayout;
71 71
72 72
73 73
74 QTimer *m_refreshTimer; 74 QTimer *m_refreshTimer;
75 75
76 bool m_refreshTimerEnabled; 76 bool m_refreshTimerEnabled;
77 int m_newStart; 77 int m_newStart;
78 int m_iconSize; 78 int m_iconSize;
79 int m_maxCharClip; 79 int m_maxCharClip;
80 int m_hideBanner; 80 int m_hideBanner;
81}; 81};
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro
index 2968e6a..b55a812 100644
--- a/core/pim/today/today.pro
+++ b/core/pim/today/today.pro
@@ -1,14 +1,15 @@
1 CONFIG += qt warn on release quick-app 1 CONFIG += qt warn on release quick-app
2 2
3 HEADERS = today.h todaybase.h todayconfig.h 3 HEADERS = today.h todaybase.h todayconfig.h
4 SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp 4 SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp
5INTERFACES = todayconfigmiscbase.ui 5INTERFACES = todayconfigmiscbase.ui
6 6
7 INCLUDEPATH+= $(OPIEDIR)/include 7 INCLUDEPATH+= $(OPIEDIR)/include
8 DEPENDPATH+= $(OPIEDIR)/include 8 DEPENDPATH+= $(OPIEDIR)/include
9LIBS += -lqpe -lopie 9LIBS += -lqpe -lopiecore2 -lopiepim2 -lopieui2
10 10
11 TARGET = today 11 TARGET = today
12 12
13include ( $(OPIEDIR)/include.pro ) 13include ( $(OPIEDIR)/include.pro )
14} 14}
15
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index f2958ad..14cdfd9 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,71 +1,70 @@
1/* 1/*
2 * todaybase.cpp 2 * todaybase.cpp
3 * 3 *
4 * copyright : (c) 2002, 2003 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 "todaybase.h" 17#include "todaybase.h"
18 18
19#include <qvbox.h>
20#include <qwhatsthis.h>
21
22#include <qpe/resource.h> 19#include <qpe/resource.h>
23 20
21#include <qvbox.h>
22#include <qwhatsthis.h>
24 23
25TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) 24TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
26 : QWidget( parent, name, WStyle_ContextHelp ) { 25 : QWidget( parent, name, WStyle_ContextHelp ) {
27 26
28 QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo 27 QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo
29 QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla 28 QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla
30 QPixmap config = Resource::loadPixmap( "SettingsIcon" ); // config icon 29 QPixmap config = Resource::loadPixmap( "SettingsIcon" ); // config icon
31 30
32 layout = 0L; 31 layout = 0L;
33 32
34 QPalette pal = this->palette(); 33 QPalette pal = this->palette();
35 QColor col = pal.color( QPalette::Active, QColorGroup::Background ); 34 QColor col = pal.color( QPalette::Active, QColorGroup::Background );
36 pal.setColor( QPalette::Active, QColorGroup::Button, col ); 35 pal.setColor( QPalette::Active, QColorGroup::Button, col );
37 pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); 36 pal.setColor( QPalette::Inactive, QColorGroup::Button, col );
38 pal.setColor( QPalette::Normal, QColorGroup::Button, col ); 37 pal.setColor( QPalette::Normal, QColorGroup::Button, col );
39 pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); 38 pal.setColor( QPalette::Disabled, QColorGroup::Button, col );
40 this->setPalette( pal ); 39 this->setPalette( pal );
41 40
42 // --- logo Section --- 41 // --- logo Section ---
43 QPalette pal2; 42 QPalette pal2;
44 QColorGroup cg; 43 QColorGroup cg;
45 cg.setColor( QColorGroup::Text, white ); 44 cg.setColor( QColorGroup::Text, white );
46 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) ); 45 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) );
47 pal2.setActive( cg ); 46 pal2.setActive( cg );
48 47
49// today logo 48// today logo
50 Frame = new QLabel( this, "Frame" ); 49 Frame = new QLabel( this, "Frame" );
51 Frame->setPalette( pal2 ); 50 Frame->setPalette( pal2 );
52 Frame->setFrameShape( QFrame::StyledPanel ); 51 Frame->setFrameShape( QFrame::StyledPanel );
53 Frame->setFrameShadow( QFrame::Raised ); 52 Frame->setFrameShadow( QFrame::Raised );
54 Frame->setLineWidth( 0 ); 53 Frame->setLineWidth( 0 );
55 54
56 QHBoxLayout *frameLayout = new QHBoxLayout( Frame ); 55 QHBoxLayout *frameLayout = new QHBoxLayout( Frame );
57 QVBox *box1 = new QVBox( Frame ); 56 QVBox *box1 = new QVBox( Frame );
58 57
59 // Today text 58 // Today text
60 TodayLabel = new QLabel( box1, "TodayText" ); 59 TodayLabel = new QLabel( box1, "TodayText" );
61 QFont TodayLabel_font( TodayLabel->font() ); 60 QFont TodayLabel_font( TodayLabel->font() );
62 TodayLabel_font.setBold( TRUE ); 61 TodayLabel_font.setBold( TRUE );
63 TodayLabel_font.setPointSize( 40 ); 62 TodayLabel_font.setPointSize( 40 );
64 TodayLabel->setFont( TodayLabel_font ); 63 TodayLabel->setFont( TodayLabel_font );
65 TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin ); 64 TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin );
66 TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" ); 65 TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" );
67 66
68 // date 67 // date
69 DateLabel = new QLabel( box1, "TextLabel1" ); 68 DateLabel = new QLabel( box1, "TextLabel1" );
70 QFont DateLabel_font( DateLabel->font() ); 69 QFont DateLabel_font( DateLabel->font() );
71 DateLabel_font.setBold( TRUE ); 70 DateLabel_font.setBold( TRUE );
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h
index b0b2e14..b737351 100644
--- a/core/pim/today/todaybase.h
+++ b/core/pim/today/todaybase.h
@@ -1,55 +1,56 @@
1/* 1/*
2 * todaybase.h 2 * todaybase.h
3 * 3 *
4 * copyright : (c) 2002 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 TODAYBASE_H 17#ifndef TODAYBASE_H
18#define TODAYBASE_H 18#define TODAYBASE_H
19 19
20#include <opie2/oclickablelabel.h>
21
20#include <qlayout.h> 22#include <qlayout.h>
21#include <opie/oclickablelabel.h>
22 23
23class QVBox; 24class QVBox;
24class QGridLayout; 25class QGridLayout;
25class QFrame; 26class QFrame;
26class QLabel; 27class QLabel;
27class QPushButton; 28class QPushButton;
28class QBoxLayout; 29class QBoxLayout;
29 30
30 31
32using namespace Opie;
33
34
31class TodayBase : public QWidget 35class TodayBase : public QWidget
32{ 36{
33 Q_OBJECT 37 Q_OBJECT
34 38
35public: 39public:
36 TodayBase( QWidget* parent = 0, const char* name = 0, WFlags = 0 ); 40 TodayBase( QWidget* parent = 0, const char* name = 0, WFlags = 0 );
37 ~TodayBase(); 41 ~TodayBase();
38 42
39 QFrame* Frame4; 43 QFrame* Frame4;
40 QPushButton* DatesButton; 44 QPushButton* DatesButton;
41 QVBoxLayout* layout; 45 QVBoxLayout* layout;
42 OClickableLabel* OwnerField; 46 Opie::OClickableLabel* OwnerField;
43 QLabel* Frame; 47 QLabel* Frame;
44 QLabel* DateLabel; 48 QLabel* DateLabel;
45 QFrame* Frame15; 49 QFrame* Frame15;
46 QLabel* Opiezilla; 50 QLabel* Opiezilla;
47 QLabel* TodayLabel; 51 QLabel* TodayLabel;
48 OClickableLabel* ConfigButton; 52 OClickableLabel* ConfigButton;
49 53
50protected:
51
52
53}; 54};
54 55
55#endif 56#endif
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 9ced0d8..5c51515 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -1,52 +1,52 @@
1/* 1/*
2 * todayconfig.cpp 2 * todayconfig.cpp
3 * 3 *
4 * copyright : (c) 2002, 2003 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 "todayconfig.h" 17#include "todayconfig.h"
18 18
19#include <qpe/config.h> 19#include <qpe/config.h>
20#include <qpe/resource.h> 20#include <qpe/resource.h>
21#include <qpe/qcopenvelope_qws.h> 21#include <qpe/qcopenvelope_qws.h>
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qspinbox.h> 26#include <qspinbox.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qheader.h> 28#include <qheader.h>
29#include <qvbox.h> 29#include <qvbox.h>
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qwhatsthis.h> 31#include <qwhatsthis.h>
32 32
33class ToolButton : public QToolButton { 33class ToolButton : public QToolButton {
34 34
35public: 35public:
36 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) 36 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
37 : QToolButton( parent, name ) { 37 : QToolButton( parent, name ) {
38 setPixmap( Resource::loadPixmap( icon ) ); 38 setPixmap( Resource::loadPixmap( icon ) );
39 setAutoRaise( TRUE ); 39 setAutoRaise( TRUE );
40 setFocusPolicy( QWidget::NoFocus ); 40 setFocusPolicy( QWidget::NoFocus );
41 setToggleButton( t ); 41 setToggleButton( t );
42 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 42 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
43 } 43 }
44}; 44};
45 45
46 46
47/** 47/**
48 * The class has currently quite some duplicate code. 48 * The class has currently quite some duplicate code.
49 * By that way it would be real easy to have it as seperate app in settings tab 49 * By that way it would be real easy to have it as seperate app in settings tab
50 * 50 *
51 */ 51 */
52TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) 52TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 0a7687c..3b585c9 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -1,73 +1,73 @@
1/* 1/*
2 * todayconfig.h 2 * todayconfig.h
3 * 3 *
4 * copyright : (c) 2002,2003 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 TODAYCONFIG_H 17#ifndef TODAYCONFIG_H
18#define TODAYCONFIG_H 18#define TODAYCONFIG_H
19 19
20#include "todayconfigmiscbase.h"
21
22#include <opie2/otabwidget.h>
23
20#include <qvariant.h> 24#include <qvariant.h>
21#include <qdialog.h> 25#include <qdialog.h>
22#include <qlistview.h> 26#include <qlistview.h>
23#include <opie/otabwidget.h>
24
25
26#include "todayconfigmiscbase.h"
27 27
28class QCheckBox; 28class QCheckBox;
29class QLabel; 29class QLabel;
30class QSpinBox; 30class QSpinBox;
31class QTabWidget; 31class QTabWidget;
32 32
33class TodayConfig : public QDialog { 33class TodayConfig : public QDialog {
34 34
35 Q_OBJECT 35 Q_OBJECT
36 36
37public: 37public:
38 TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE ); 38 TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE );
39 ~TodayConfig(); 39 ~TodayConfig();
40 40
41 OTabWidget* TabWidget3; 41 OTabWidget* TabWidget3;
42 42
43 void writeConfig(); 43 void writeConfig();
44 void pluginManagement( QString libName, QString name, QPixmap icon ); 44 void pluginManagement( QString libName, QString name, QPixmap icon );
45 45
46 46
47protected slots: 47protected slots:
48 void appletChanged(); 48 void appletChanged();
49 void moveSelectedUp(); 49 void moveSelectedUp();
50 void moveSelectedDown(); 50 void moveSelectedDown();
51 51
52private: 52private:
53 void setAutoStart(); 53 void setAutoStart();
54 void readConfig(); 54 void readConfig();
55 55
56 QListView* m_appletListView; 56 QListView* m_appletListView;
57 QMap<QString,QCheckListItem*> m_applets; 57 QMap<QString,QCheckListItem*> m_applets;
58 58
59 int m_autoStart; 59 int m_autoStart;
60 int m_autoStartTimer; 60 int m_autoStartTimer;
61 int m_iconSize; 61 int m_iconSize;
62 QStringList m_excludeApplets; 62 QStringList m_excludeApplets;
63 bool m_applets_changed; 63 bool m_applets_changed;
64 64
65 QWidget* tab_2; 65 QWidget* tab_2;
66 QWidget* tab_3; 66 QWidget* tab_3;
67 QLabel* TextLabel1, *TextLabel4; 67 QLabel* TextLabel1, *TextLabel4;
68 QSpinBox* SpinBox7; 68 QSpinBox* SpinBox7;
69 69
70 TodayConfigMiscBase *m_guiMisc; 70 TodayConfigMiscBase *m_guiMisc;
71}; 71};
72 72
73#endif 73#endif