summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/.cvsignore2
-rw-r--r--core/pim/today/changelog6
-rw-r--r--core/pim/today/main.cpp16
-rw-r--r--core/pim/today/plugin.cpp17
-rw-r--r--core/pim/today/plugins/datebook/.cvsignore1
-rw-r--r--core/pim/today/plugins/datebook/config.in2
-rw-r--r--core/pim/today/plugins/datebook/datebook.pro19
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp48
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.h5
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp7
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.h1
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp50
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h4
-rw-r--r--core/pim/today/plugins/mail/config.in2
-rw-r--r--core/pim/today/plugins/mail/mail.pro20
-rw-r--r--core/pim/today/plugins/mail/mailplugin.cpp3
-rw-r--r--core/pim/today/plugins/mail/mailplugin.h1
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp2
-rw-r--r--core/pim/today/plugins/mail/opie-today-mailplugin.control9
-rw-r--r--core/pim/today/plugins/todolist/.cvsignore1
-rw-r--r--core/pim/today/plugins/todolist/config.in2
-rw-r--r--core/pim/today/plugins/todolist/todolist.pro19
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp8
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.h1
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.cpp15
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.h1
-rw-r--r--core/pim/today/today.cpp33
-rw-r--r--core/pim/today/today.pro7
-rw-r--r--core/pim/today/todayconfig.cpp73
-rw-r--r--core/pim/today/todayconfig.h13
30 files changed, 214 insertions, 174 deletions
diff --git a/core/pim/today/.cvsignore b/core/pim/today/.cvsignore
index 1ee9a27..11e7045 100644
--- a/core/pim/today/.cvsignore
+++ b/core/pim/today/.cvsignore
@@ -1,3 +1,5 @@
1*.moc 1*.moc
2Makefile* 2Makefile*
3moc_* 3moc_*
4todayconfigmiscbase.cpp
5todayconfigmiscbase.h
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index a77e581..b492435 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,127 +1,133 @@
10.7
2
3* now all plugins in a big scrollview
4* config dialogs guis are ui files now
5* plugin interface has one new virtual method - reinitialize ( used when coming back from config dialog )
6
10.6.2 70.6.2
2 8
3* header can now be made smaller 9* header can now be made smaller
4* changed header to different layout mode to play nicer with life rotation 10* changed header to different layout mode to play nicer with life rotation
5 11
60.6.1 120.6.1
7 13
8* datebook plugin now can now also show following days 14* datebook plugin now can now also show following days
9* changed refresh 15* changed refresh
10* fixed one mem leak 16* fixed one mem leak
11 17
120.6 180.6
13 19
14* longer refresh intervals possible 20* longer refresh intervals possible
15* plugins can decide now if they want to take part in refresh cycles 21* plugins can decide now if they want to take part in refresh cycles
16 22
170.5.2 230.5.2
18 24
19* refresh settings 25* refresh settings
20* only launch datebook config when clicked on a date ( opie only ) 26* only launch datebook config when clicked on a date ( opie only )
21* less qcop trouble on sharps retail rom 27* less qcop trouble on sharps retail rom
22 28
230.5.1 290.5.1
24 30
25* icons scalable and clickable again 31* icons scalable and clickable again
26 32
270.5 330.5
28 34
29* now fully plugin based 35* now fully plugin based
30 36
310.3.4 370.3.4
32 38
33* "fill our business card now a clickable label" 39* "fill our business card now a clickable label"
34* Several bugfixes regarding todo section. 40* Several bugfixes regarding todo section.
35 41
360.3.3 420.3.3
37 43
38* Changed the logo so it better scales to bigger display and also 44* Changed the logo so it better scales to bigger display and also
39 made the "Today" string translatable. 45 made the "Today" string translatable.
40* some am/pm fixes 46* some am/pm fixes
41* clickable labels now in libopie 47* clickable labels now in libopie
42 48
430.3.2 490.3.2
44 50
45* Autostart is now more configurable. You can decide how long 51* Autostart is now more configurable. You can decide how long
46 the ipaq has to has been suspended, before autostart is triggered.(Opie 52 the ipaq has to has been suspended, before autostart is triggered.(Opie
47 only) 53 only)
48* am/pm time optinal (autodetect) 54* am/pm time optinal (autodetect)
49 55
500.3.1 560.3.1
51 57
52* fixed the wrong color of the buttons 58* fixed the wrong color of the buttons
53* better translation (thanks carsten and others) 59* better translation (thanks carsten and others)
54* fixes memory leaks 60* fixes memory leaks
55* bugfixes in calendar part, now location and note are working again. 61* bugfixes in calendar part, now location and note are working again.
56 62
570.3.0 630.3.0
58 64
59* today uses now tododb from libopie. So major changes in the todo part: 65* today uses now tododb from libopie. So major changes in the todo part:
60 - overdue items on top 66 - overdue items on top
61 - then sorted by date, then by priority 67 - then sorted by date, then by priority
62* some cleanups 68* some cleanups
63* speed optimisations 69* speed optimisations
64 70
650.2.9 710.2.9
66 72
67* Many bugfixes. 73* Many bugfixes.
68* Today now apparently sorts the dates _allways_ right, i would assume it 74* Today now apparently sorts the dates _allways_ right, i would assume it
69to be a qt bug 75to be a qt bug
70 76
710.2.8 770.2.8
72 78
73* Appointments are now clickable (connection to datebook still missing) 79* Appointments are now clickable (connection to datebook still missing)
74* autostart support (opie only) 80* autostart support (opie only)
75 81
760.2.7 820.2.7
77 83
78* check if todolist.xml was changed before parsing it 84* check if todolist.xml was changed before parsing it
79* check only every 30 sec for changes. 85* check only every 30 sec for changes.
80* some visual stuff 86* some visual stuff
81* as usual many little improvements .-) 87* as usual many little improvements .-)
82 88
830.2.6 890.2.6
84 90
85* added scrollbars to dates and todo 91* added scrollbars to dates and todo
86* all day detection 92* all day detection
87* some smaller bugfixes 93* some smaller bugfixes
88 94
890.2.5 950.2.5
90 96
91* some other minor fixes regarding autoupdate 97* some other minor fixes regarding autoupdate
92* fixed segfault with todolist > 7 entries 98* fixed segfault with todolist > 7 entries
93* fixed the "ugly grey border around buttons" issue 99* fixed the "ugly grey border around buttons" issue
94* fixed the "empty calendar field" "bug" 100* fixed the "empty calendar field" "bug"
95* shown only later appointments as option 101* shown only later appointments as option
96 102
97 103
980.2.4 1040.2.4
99 105
100* added support for email 106* added support for email
101* autoupdates after 1 min 107* autoupdates after 1 min
102* QCopEnvelope instead of system() 108* QCopEnvelope instead of system()
103* starting to use qvbox in gui 109* starting to use qvbox in gui
104 110
105 111
1060.2.3 1120.2.3
107 113
108* the 4 am release 114* the 4 am release
109* several bugfixes 115* several bugfixes
110 116
111 117
1120.2.2 1180.2.2
113 119
114* started working on calling other apps 120* started working on calling other apps
115* and finished it 121* and finished it
116 122
1170.2.1 1230.2.1
118 124
119* images no more inline 125* images no more inline
120* config dialog 126* config dialog
121 127
1220.1.1 1280.1.1
123 129
124* started changelog. 130* started changelog.
125* fixed segfault on empty/nonexistant todolist.xml 131* fixed segfault on empty/nonexistant todolist.xml
126* better handling for file location 132* better handling for file location
127 133
diff --git a/core/pim/today/main.cpp b/core/pim/today/main.cpp
index 72c0a2e..156cd0f 100644
--- a/core/pim/today/main.cpp
+++ b/core/pim/today/main.cpp
@@ -1,36 +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 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 <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <opie/oapplicationfactory.h>
22 23
23QPEApplication *todayApp; 24OPIE_EXPORT_APP( OApplicationFactory<Today> )
24
25int main( int argc, char ** argv )
26{
27 QPEApplication a(argc, argv);
28 todayApp=&a;
29
30 Today t;
31
32 t.setCaption( Today::tr("Today") );
33 a.showMainWidget(&t);
34
35 return a.exec();
36}
diff --git a/core/pim/today/plugin.cpp b/core/pim/today/plugin.cpp
deleted file mode 100644
index 349413b..0000000
--- a/core/pim/today/plugin.cpp
+++ b/dev/null
@@ -1,17 +0,0 @@
1#include "today.h"
2#include <qwidget.h>
3#include <qcombobox.h>
4#include <oappplugin.h>
5
6#define Q_BASEINSTANCE( i ) \
7 QUnknownInterface* iface = 0; \
8 i->queryInterface( IID_QUnknown, &iface ); \
9 return iface
10
11Q_EXPORT_INTERFACE()
12{
13 Today *t = new Today;
14 t->setCaption( Today::tr("Today") );
15 OAppPlugin *comp = new OAppPlugin(t);
16 Q_BASEINSTANCE( comp );
17}
diff --git a/core/pim/today/plugins/datebook/.cvsignore b/core/pim/today/plugins/datebook/.cvsignore
index 2888d4a..10cf625 100644
--- a/core/pim/today/plugins/datebook/.cvsignore
+++ b/core/pim/today/plugins/datebook/.cvsignore
@@ -1,2 +1,3 @@
1Makefile* 1Makefile*
2datebookpluginconfigbase*
2moc* 3moc*
diff --git a/core/pim/today/plugins/datebook/config.in b/core/pim/today/plugins/datebook/config.in
index 621510f..7a14438 100644
--- a/core/pim/today/plugins/datebook/config.in
+++ b/core/pim/today/plugins/datebook/config.in
@@ -1,4 +1,4 @@
1 config TODAY_DATEBOOK 1 config TODAY_DATEBOOK
2 boolean "opie-today-datebookplugin (datebook plugin)" 2 boolean "datebook"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro
index bd45f71..1f75964 100644
--- a/core/pim/today/plugins/datebook/datebook.pro
+++ b/core/pim/today/plugins/datebook/datebook.pro
@@ -1,21 +1,40 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt 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 -lopie
17 17
18DESTDIR = $(OPIEDIR)/plugins/today 18DESTDIR = $(OPIEDIR)/plugins/today
19TARGET = todaydatebookplugin 19TARGET = todaydatebookplugin
20 20
21TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
22 ../../../../../i18n/nl/libtodaydatebookplugin.ts \
23 ../../../../../i18n/xx/libtodaydatebookplugin.ts \
24 ../../../../../i18n/en/libtodaydatebookplugin.ts \
25 ../../../../../i18n/es/libtodaydatebookplugin.ts \
26 ../../../../../i18n/fr/libtodaydatebookplugin.ts \
27 ../../../../../i18n/hu/libtodaydatebookplugin.ts \
28 ../../../../../i18n/ja/libtodaydatebookplugin.ts \
29 ../../../../../i18n/ko/libtodaydatebookplugin.ts \
30 ../../../../../i18n/no/libtodaydatebookplugin.ts \
31 ../../../../../i18n/pl/libtodaydatebookplugin.ts \
32 ../../../../../i18n/pt/libtodaydatebookplugin.ts \
33 ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
34 ../../../../../i18n/sl/libtodaydatebookplugin.ts \
35 ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
36 ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
37 ../../../../../i18n/it/libtodaydatebookplugin.ts \
38 ../../../../../i18n/da/libtodaydatebookplugin.ts
39
21include ( $(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 3c1e97a..e595047 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -1,138 +1,148 @@
1/* 1/*
2 * datebookevent.cpp 2 * datebookevent.cpp
3 * 3 *
4 * copyright : (c) 2002 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 "datebookevent.h" 17#include "datebookevent.h"
18#include <qpe/config.h> 18#include <qpe/config.h>
19#include <qpe/timestring.h> 19#include <qpe/timestring.h>
20#include <qpe/qcopenvelope_qws.h> 20#include <qpe/qcopenvelope_qws.h>
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <qpe/calendar.h>
22 23
23#include <opie/odevice.h> 24#include <opie/odevice.h>
24 25
25using namespace Opie; 26using namespace Opie;
26 27
27DateBookEvent::DateBookEvent(const EffectiveEvent &ev, 28DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
28 QWidget* parent, 29 QWidget* parent,
29 bool show_location, 30 bool show_location,
30 bool show_notes, 31 bool show_notes,
32 bool timeExtraLine,
31 int maxCharClip, 33 int maxCharClip,
32 const char* name, 34 const char* name,
33 WFlags fl) : 35 WFlags fl) :
34 OClickableLabel(parent,name,fl), event(ev) { 36 OClickableLabel(parent,name,fl), event(ev) {
35 37
36 // setAlignment( AlignTop ); 38 // setAlignment( AlignTop );
37 39
38 QString msg; 40 QString msg;
39 41
40 Config config( "qpe" ); 42 Config config( "qpe" );
41 config.setGroup( "Time" ); 43 config.setGroup( "Time" );
42 // if 24 h format 44 // if 24 h format
43 ampm = config.readBoolEntry( "AMPM", TRUE ); 45 ampm = config.readBoolEntry( "AMPM", TRUE );
44 46
45 msg += "<B>" + (ev).description() + "</B>"; 47 msg += "<B>" + (ev).description() + "</B>";
46 if ( (ev).event().hasAlarm() ) { 48 if ( (ev).event().hasAlarm() ) {
47 msg += " <b>" + tr("[with alarm]") +"</b>"; 49 msg += " <b>" + tr("[with alarm]") +"</b>";
48 } 50 }
49 51
50 // include location or not 52 // include location or not
51 if ( show_location ) { 53 if ( show_location ) {
52 msg += "<BR><i>" + (ev).location() + "</i>"; 54 msg += "<BR><i>" + (ev).location() + "</i>";
53 } 55 }
54 56
57 QString timeSpacer = " ";
58 if ( timeExtraLine ) {
59 timeSpacer = "<br>";
60 }
61
55 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" ) 62 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
56 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) { 63 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
57 msg += "<br>All day"; 64 msg += tr ( "All day" );
58 } else { 65 } else {
59 // start time of event 66 // start time of event
60 QDate tempDate = (ev).event().start().date(); 67// QDate tempDate = (ev).event().start().date();
61 msg += "<br>" 68 msg += timeSpacer;
62 + ampmTime( QTime( (ev).event().start().time() ) ) 69 msg += ampmTime( QTime( (ev).event().start().time() ) )
63 // end time of event 70 // end time of event
64 + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) ) 71 + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) );
65 + differDate( tempDate ); 72 }
73
74 if ( (ev).date() != QDate::currentDate() ) {
75 msg += differDate( (ev).date() /* tempDate*/ );
66 } 76 }
67 77
68 // include possible note or not 78 // include possible note or not
69 if ( show_notes ) { 79 if ( show_notes ) {
70 msg += "<br> <i>" + tr("note") + "</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); 80 msg += "<br> <i>" + tr("note") + "</i>:" +( (ev).notes() ).mid( 0, maxCharClip );
71 } 81 }
72 setText( msg ); 82 setText( msg );
73 connect( this, SIGNAL( clicked() ), this, SLOT( editMe() ) ); 83 connect( this, SIGNAL( clicked() ), this, SLOT( editMe() ) );
74} 84}
75 85
76DateBookEvent::~DateBookEvent() { 86DateBookEvent::~DateBookEvent() {
77} 87}
78 88
79/** 89/**
80 * AM/PM timestring conversion. 90 * AM/PM timestring conversion.
81 * @param tm the timestring 91 * @param tm the timestring
82 * @return formatted to am/pm is system is set to it 92 * @return formatted to am/pm is system is set to it
83 */ 93 */
84QString DateBookEvent::ampmTime( QTime tm ) { 94QString DateBookEvent::ampmTime( QTime tm ) {
85 QString s; 95 QString s;
86 if( ampm ) { 96 if( ampm ) {
87 int hour = tm.hour(); 97 int hour = tm.hour();
88 if ( hour == 0 ) { 98 if ( hour == 0 ) {
89 hour = 12; 99 hour = 12;
90 } 100 }
91 if ( hour > 12 ) { 101 if ( hour > 12 ) {
92 hour -= 12; 102 hour -= 12;
93 } 103 }
94 s.sprintf( "%2d:%02d %s", hour, tm.minute(), 104 s.sprintf( "%2d:%02d %s", hour, tm.minute(),
95 (tm.hour() >= 12) ? "PM" : "AM" ); 105 (tm.hour() >= 12) ? "PM" : "AM" );
96 return s; 106 return s;
97 } else { 107 } else {
98 s.sprintf( "%2d:%02d", tm.hour(), tm.minute() ); 108 s.sprintf( "%2d:%02d", tm.hour(), tm.minute() );
99 return s; 109 return s;
100 } 110 }
101} 111}
102 112
103QString DateBookEvent::differDate( QDate date ) { 113QString DateBookEvent::differDate( QDate date ) {
104 QDate currentDate = QDate::currentDate(); 114// QDate currentDate = QDate::currentDate();
105 QString returnText = "<font color = #407DD9><b> "; 115 QString returnText = "<font color = #407DD9><b> ";
106 int differDate = currentDate.daysTo( date ); 116// int differDate = currentDate.daysTo( date );
107 if ( currentDate.dayOfWeek() == date.dayOfWeek() ) { 117// if ( currentDate.dayOfWeek() == date.dayOfWeek() ) {
108 returnText += "" ; 118// returnText += "" ;
109 // not working right for recurring events 119// // not working right for recurring events
110 //} else if ( differDate == 1 ) { 120// //} else if ( differDate == 1 ) {
111 //returnText += tr( "tomorrow" ); 121// //returnText += tr( "tomorrow" );
112 } else { 122// } else {
113 //returnText += tr( "in %1 days" ).arg( differDate ); 123// returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
114 returnText += " [ " + date.dayName( date.dayOfWeek() ) + " ] "; 124// }
115 } 125 returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
116 returnText += "</b></font>"; 126 returnText += "</b></font>";
117 return returnText; 127 return returnText;
118} 128}
119 129
120 130
121/** 131/**
122 * starts the edit dialog as known from datebook 132 * starts the edit dialog as known from datebook
123 */ 133 */
124void DateBookEvent::editEventSlot( const Event &e ) { 134void DateBookEvent::editEventSlot( const Event &e ) {
125 135
126 if ( ODevice::inst()->system() == System_Zaurus ) { 136 if ( ODevice::inst()->system() == System_Zaurus ) {
127 QCopEnvelope env( "QPE/Application/datebook", "raise()" ); 137 QCopEnvelope env( "QPE/Application/datebook", "raise()" );
128 } else { 138 } else {
129 QCopEnvelope env( "QPE/Datebook", "editEvent(int)" ); 139 QCopEnvelope env( "QPE/Application/datebook", "editEvent(int)" );
130 env << e.uid(); 140 env << e.uid();
131 } 141 }
132} 142}
133 143
134 144
135void DateBookEvent::editMe() { 145void DateBookEvent::editMe() {
136 emit editEvent( event.event() ); 146 emit editEvent( event.event() );
137} 147}
138 148
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h
index 8027809..1a090e3 100644
--- a/core/pim/today/plugins/datebook/datebookevent.h
+++ b/core/pim/today/plugins/datebook/datebookevent.h
@@ -1,51 +1,54 @@
1/* 1/*
2 * datebookplugin.h 2 * datebookplugin.h
3 * 3 *
4 * copyright : (c) 2002 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 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 <opie/oclickablelabel.h>
21#include <qpe/datebookdb.h> 21#include <qpe/datebookdb.h>
22 22
23 23
24class DateBookEvent: public OClickableLabel { 24class DateBookEvent: public OClickableLabel {
25 25
26 Q_OBJECT 26 Q_OBJECT
27 27
28public: 28public:
29 DateBookEvent( const EffectiveEvent &ev, 29 DateBookEvent( const EffectiveEvent &ev,
30 QWidget* parent = 0, 30 QWidget* parent = 0,
31 bool show_location = 0, 31 bool show_location = 0,
32 bool show_notes = 0, 32 bool show_notes = 0,
33 bool timeExtraLine = 0,
33 int maxCharClip = 0, 34 int maxCharClip = 0,
34 const char* name = 0, 35 const char* name = 0,
35 WFlags fl = 0 ); 36 WFlags fl = 0 );
36 ~DateBookEvent(); 37 ~DateBookEvent();
38
37 signals: 39 signals:
38 void editEvent( const Event &e ); 40 void editEvent( const Event &e );
39 41
40private slots: 42private slots:
41 void editEventSlot( const Event &e ); 43 void editEventSlot( const Event &e );
42 void editMe(); 44 void editMe();
45
43 private: 46 private:
44 47
45 QString ampmTime( QTime ); 48 QString ampmTime( QTime );
46 QString differDate( QDate date ); 49 QString differDate( QDate date );
47 const EffectiveEvent event; 50 const EffectiveEvent event;
48 bool ampm; 51 bool ampm;
49}; 52};
50 53
51#endif 54#endif
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp
index 4e650ee..f77e440 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.cpp
+++ b/core/pim/today/plugins/datebook/datebookplugin.cpp
@@ -1,71 +1,78 @@
1 1
2/* 2/*
3 * datebookplugin.cpp 3 * datebookplugin.cpp
4 * 4 *
5 * copyright : (c) 2002,2003 by Maximilian Reiß 5 * copyright : (c) 2002,2003 by Maximilian Reiß
6 * email : harlekin@handhelds.org 6 * email : harlekin@handhelds.org
7 * 7 *
8 */ 8 */
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * 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 * 12 * 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 * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18 18
19 19
20#include "datebookevent.h" 20#include "datebookevent.h"
21#include "datebookplugin.h" 21#include "datebookplugin.h"
22#include "datebookpluginconfig.h" 22#include "datebookpluginconfig.h"
23 23
24 24
25DatebookPlugin::DatebookPlugin() { 25DatebookPlugin::DatebookPlugin() {
26} 26}
27 27
28DatebookPlugin::~DatebookPlugin() { 28DatebookPlugin::~DatebookPlugin() {
29 delete (DatebookPluginWidget*)m_widget; 29 delete (DatebookPluginWidget*)m_widget;
30} 30}
31 31
32QString DatebookPlugin::pluginName() const { 32QString DatebookPlugin::pluginName() const {
33 return QObject::tr( "Datebook plugin"); 33 return QObject::tr( "Datebook plugin");
34} 34}
35 35
36double DatebookPlugin::versionNumber() const { 36double DatebookPlugin::versionNumber() const {
37 return 1.0; 37 return 1.0;
38} 38}
39 39
40QString DatebookPlugin::pixmapNameWidget() const { 40QString DatebookPlugin::pixmapNameWidget() const {
41 return "datebook/DateBook"; 41 return "datebook/DateBook";
42} 42}
43 43
44QWidget* DatebookPlugin::widget( QWidget* wid ) { 44QWidget* DatebookPlugin::widget( QWidget* wid ) {
45 if(!m_widget) { 45 if(!m_widget) {
46 m_widget = new DatebookPluginWidget( wid, "Datebook" ); 46 m_widget = new DatebookPluginWidget( wid, "Datebook" );
47 } 47 }
48 return m_widget; 48 return m_widget;
49} 49}
50 50
51QString DatebookPlugin::pixmapNameConfig() const { 51QString DatebookPlugin::pixmapNameConfig() const {
52 return "datebook/DateBook"; 52 return "datebook/DateBook";
53} 53}
54 54
55TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { 55TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) {
56 return new DatebookPluginConfig( wid , "Datebook" ); 56 return new DatebookPluginConfig( wid , "Datebook" );
57} 57}
58 58
59QString DatebookPlugin::appName() const { 59QString DatebookPlugin::appName() const {
60 return "datebook"; 60 return "datebook";
61} 61}
62 62
63bool DatebookPlugin::excludeFromRefresh() const { 63bool DatebookPlugin::excludeFromRefresh() const {
64 return false; 64 return false;
65} 65}
66 66
67void DatebookPlugin::refresh() { 67void DatebookPlugin::refresh() {
68 if ( m_widget ) { 68 if ( m_widget ) {
69 m_widget->refresh(); 69 m_widget->refresh();
70 } 70 }
71} 71}
72
73void DatebookPlugin::reinitialize() {
74 if ( m_widget ) {
75 m_widget->reinitialize();
76 }
77}
78
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h
index db899e8..890c59b 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.h
+++ b/core/pim/today/plugins/datebook/datebookplugin.h
@@ -1,48 +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 <qguardedptr.h>
21 21
22#include <opie/oclickablelabel.h> 22#include <opie/oclickablelabel.h>
23#include <opie/todayplugininterface.h> 23#include <opie/todayplugininterface.h>
24 24
25#include "datebookpluginwidget.h" 25#include "datebookpluginwidget.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 43
43 private: 44 private:
44 QGuardedPtr<DatebookPluginWidget> m_widget; 45 QGuardedPtr<DatebookPluginWidget> m_widget;
45}; 46};
46 47
47 48
48#endif 49#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 1970654..9e95bcd 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -1,125 +1,143 @@
1 /* 1 /*
2 * datebookpluginwidget.cpp 2 * datebookpluginwidget.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 17
18#include "datebookpluginwidget.h" 18#include "datebookpluginwidget.h"
19 19
20#include <qpe/timestring.h> 20#include <qpe/timestring.h>
21#include <qpe/config.h> 21#include <qpe/config.h>
22 22
23#include <qdatetime.h> 23#include <qdatetime.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qtl.h> 25#include <qtl.h>
26 26
27DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name ) 27DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
28 : QWidget(parent, name ) { 28 : QWidget(parent, name ) {
29 29
30 db = 0l; 30 db = 0l;
31 m_layoutDates = 0l; 31 m_layoutDates = 0l;
32 32
33 if ( db ) {
34 delete db;
35 }
36 db = new DateBookDB;
37
38 if ( m_layoutDates ) { 33 if ( m_layoutDates ) {
39 delete m_layoutDates; 34 delete m_layoutDates;
40 } 35 }
41 m_layoutDates = new QVBoxLayout( this ); 36 m_layoutDates = new QVBoxLayout( this );
42 m_layoutDates->setAutoAdd( true ); 37 m_layoutDates->setAutoAdd( true );
43 38
44 m_eventsList.setAutoDelete( true ); 39 m_eventsList.setAutoDelete( true );
45 40
46 readConfig(); 41 readConfig();
47 getDates(); 42 getDates();
48 m_layoutDates->addStretch(5);
49} 43}
50 44
51DatebookPluginWidget::~DatebookPluginWidget() { 45DatebookPluginWidget::~DatebookPluginWidget() {
52 delete db; 46 delete db;
53 delete m_layoutDates; 47 delete m_layoutDates;
54} 48}
55 49
56 50
57void DatebookPluginWidget::readConfig() { 51void DatebookPluginWidget::readConfig() {
58 Config cfg( "todaydatebookplugin" ); 52 Config cfg( "todaydatebookplugin" );
59 cfg.setGroup( "config" ); 53 cfg.setGroup( "config" );
60 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); 54 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
61 m_show_location = cfg.readNumEntry( "showlocation", 1 ); 55 m_show_location = cfg.readNumEntry( "showlocation", 1 );
62 m_show_notes = cfg.readNumEntry( "shownotes", 0 ); 56 m_show_notes = cfg.readNumEntry( "shownotes", 0 );
63 m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); 57 m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
64 m_moreDays = cfg.readNumEntry( "moredays", 0 ); 58 m_moreDays = cfg.readNumEntry( "moredays", 0 );
59 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
60}
61
62void DatebookPluginWidget::reinitialize() {
63 readConfig();
64 refresh();
65} 65}
66 66
67void DatebookPluginWidget::refresh() { 67void DatebookPluginWidget::refresh() {
68 m_eventsList.clear(); 68 m_eventsList.clear();
69 69
70 if ( m_layoutDates ) { 70 if ( m_layoutDates ) {
71 delete m_layoutDates; 71 delete m_layoutDates;
72 } 72 }
73 m_layoutDates = new QVBoxLayout( this ); 73 m_layoutDates = new QVBoxLayout( this );
74 m_layoutDates->setAutoAdd( true ); 74 m_layoutDates->setAutoAdd( true );
75 75
76 getDates(); 76 getDates();
77 m_layoutDates->addStretch(5);
78} 77}
79 78
80/** 79/**
81 * Get all events that are in the datebook xml file for today 80 * Get all events that are in the datebook xml file for today
82 */ 81 */
83void DatebookPluginWidget::getDates() { 82void DatebookPluginWidget::getDates() {
84 83
84
85 if ( db ) {
86 delete db;
87 }
88 db = new DateBookDB;
89
85 QDate date = QDate::currentDate(); 90 QDate date = QDate::currentDate();
86 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) ); 91 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
87 qBubbleSort( list ); 92 qBubbleSort( list );
88 int count = 0; 93 int count = 0;
89 94
90 if ( list.count() > 0 ) { 95 if ( list.count() > 0 ) {
91 96
92 for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) { 97 for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
93 98
94 if ( count < m_max_lines_meet ) { 99 if ( count < m_max_lines_meet ) {
95 if ( !m_onlyLater ) { 100 if ( !m_onlyLater ) {
96 count++; 101 count++;
97 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes ); 102 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
98 m_eventsList.append( l );
99 l->show();
100 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
101 } else if ( QDateTime::currentDateTime() <= (*it).event().end() || (*it).event().start().date() != date ) {
102 count++;
103 // show only later appointments
104 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
105 m_eventsList.append( l ); 103 m_eventsList.append( l );
106 l->show(); 104 l->show();
107 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 105 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
108 } 106 } else {
107 if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
108 // Show events which span over many days and are not elapsed.
109 || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
110 // Show repeated event for today that is not elapsed.
111 || ( ( (*it).event().repeatType() != Event::NoRepeat )
112 && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
113 && ( QTime::currentTime() < (*it).event().start().time() ) ) )
114 // Show repeated event for next days.
115 || ( ( (*it).event().repeatType() != Event::NoRepeat )
116 && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
117 )
118 {
119 count++;
120 // show only later appointments
121 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
122 m_eventsList.append( l );
123 l->show();
124 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
125 }
126 }
109 } 127 }
110 } 128 }
111 if ( m_onlyLater && count == 0 ) { 129 if ( m_onlyLater && count == 0 ) {
112 QLabel* noMoreEvents = new QLabel( this ); 130 QLabel* noMoreEvents = new QLabel( this );
113 m_eventsList.append( noMoreEvents ); 131 m_eventsList.append( noMoreEvents );
114 noMoreEvents->show(); 132 noMoreEvents->show();
115 noMoreEvents->setText( QObject::tr( "No more appointments today" ) ); 133 noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
116 } 134 }
117 } else { 135 } else {
118 QLabel* noEvents = new QLabel( this ); 136 QLabel* noEvents = new QLabel( this );
119 m_eventsList.append( noEvents ); 137 m_eventsList.append( noEvents );
120 noEvents->show(); 138 noEvents->show();
121 noEvents->setText( QObject::tr( "No appointments today" ) ); 139 noEvents->setText( QObject::tr( "No appointments today" ) );
122 } 140 }
123} 141}
124 142
125 143
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h
index 35d43cd..8988073 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.h
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h
@@ -1,58 +1,60 @@
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 <qlayout.h> 20#include <qlayout.h>
21#include <qguardedptr.h> 21#include <qguardedptr.h>
22#include <qlist.h> 22#include <qlist.h>
23 23
24#include <qpe/datebookdb.h> 24#include <qpe/datebookdb.h>
25#include <opie/oclickablelabel.h> 25#include <opie/oclickablelabel.h>
26 26
27#include "datebookevent.h" 27#include "datebookevent.h"
28 28
29class DatebookPluginWidget : public QWidget { 29class DatebookPluginWidget : public QWidget {
30 30
31 Q_OBJECT 31 Q_OBJECT
32 32
33public: 33public:
34 DatebookPluginWidget( QWidget *parent, const char *name ); 34 DatebookPluginWidget( QWidget *parent, const char *name );
35 ~DatebookPluginWidget(); 35 ~DatebookPluginWidget();
36 void refresh(); 36 void refresh();
37 void reinitialize();
37 38
38private: 39private:
39 DateBookDB* db; 40 DateBookDB* db;
40 QGuardedPtr<QVBoxLayout> m_layoutDates; 41 QGuardedPtr<QVBoxLayout> m_layoutDates;
41 QList<QWidget> m_eventsList; 42 QList<QWidget> m_eventsList;
42 void readConfig(); 43 void readConfig();
43 void getDates(); 44 void getDates();
44 45
45 46
46 // how many lines should be showed in the datebook section 47 // how many lines should be showed in the datebook section
47 int m_max_lines_meet; 48 int m_max_lines_meet;
48 // If location is to be showed too, 1 to activate it. 49 // If location is to be showed too, 1 to activate it.
49 bool m_show_location; 50 bool m_show_location;
50 // if notes should be shown 51 // if notes should be shown
51 bool m_show_notes; 52 bool m_show_notes;
52 // should only later appointments be shown or all for the current day. 53 // should only later appointments be shown or all for the current day.
53 bool m_onlyLater; 54 bool m_onlyLater;
54 int m_moreDays; 55 int m_moreDays;
55 56 // true if time of an appointment should be an extra line
57 bool m_timeExtraLine;
56}; 58};
57 59
58#endif 60#endif
diff --git a/core/pim/today/plugins/mail/config.in b/core/pim/today/plugins/mail/config.in
index 6f3e06d..6f4450f 100644
--- a/core/pim/today/plugins/mail/config.in
+++ b/core/pim/today/plugins/mail/config.in
@@ -1,4 +1,4 @@
1 config TODAY_MAIL 1 config TODAY_MAIL
2 boolean "opie-today-mailplugin (mail plugin)" 2 boolean "mail"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro
index 60ed87d..70c484d 100644
--- a/core/pim/today/plugins/mail/mail.pro
+++ b/core/pim/today/plugins/mail/mail.pro
@@ -1,19 +1,37 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt plugin 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 -lopie
15 15
16DESTDIR = $(OPIEDIR)/plugins/today 16DESTDIR = $(OPIEDIR)/plugins/today
17TARGET = todaymailplugin 17TARGET = todaymailplugin
18 18
19TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
20 ../../../../../i18n/nl/libtodaymailplugin.ts \
21 ../../../../../i18n/xx/libtodaymailplugin.ts \
22 ../../../../../i18n/en/libtodaymailplugin.ts \
23 ../../../../../i18n/es/libtodaymailplugin.ts \
24 ../../../../../i18n/fr/libtodaymailplugin.ts \
25 ../../../../../i18n/hu/libtodaymailplugin.ts \
26 ../../../../../i18n/ja/libtodaymailplugin.ts \
27 ../../../../../i18n/ko/libtodaymailplugin.ts \
28 ../../../../../i18n/no/libtodaymailplugin.ts \
29 ../../../../../i18n/pl/libtodaymailplugin.ts \
30 ../../../../../i18n/pt/libtodaymailplugin.ts \
31 ../../../../../i18n/pt_BR/libtodaymailplugin.ts \
32 ../../../../../i18n/sl/libtodaymailplugin.ts \
33 ../../../../../i18n/zh_CN/libtodaymailplugin.ts \
34 ../../../../../i18n/zh_TW/libtodaymailplugin.ts \
35 ../../../../../i18n/it/libtodaymailplugin.ts \
36 ../../../../../i18n/da/libtodaymailplugin.ts
19include ( $(OPIEDIR)/include.pro ) 37include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp
index 9430c30..bf30538 100644
--- a/core/pim/today/plugins/mail/mailplugin.cpp
+++ b/core/pim/today/plugins/mail/mailplugin.cpp
@@ -1,69 +1,72 @@
1/* 1/*
2 * mailplugin.cpp 2 * mailplugin.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 17
18#include "mailplugin.h" 18#include "mailplugin.h"
19 19
20MailPlugin::MailPlugin() { 20MailPlugin::MailPlugin() {
21 m_widget = 0l; 21 m_widget = 0l;
22} 22}
23 23
24MailPlugin::~MailPlugin() { 24MailPlugin::~MailPlugin() {
25 delete (MailPluginWidget*)m_widget; 25 delete (MailPluginWidget*)m_widget;
26} 26}
27 27
28QString MailPlugin::pluginName() const { 28QString MailPlugin::pluginName() const {
29 return QObject::tr( "Mail plugin" ); 29 return QObject::tr( "Mail plugin" );
30} 30}
31 31
32double MailPlugin::versionNumber() const { 32double MailPlugin::versionNumber() const {
33 return 0.6; 33 return 0.6;
34} 34}
35 35
36QString MailPlugin::pixmapNameWidget() const { 36QString MailPlugin::pixmapNameWidget() const {
37 return "mail/desktopicon"; 37 return "mail/desktopicon";
38} 38}
39 39
40QWidget* MailPlugin::widget( QWidget * wid ) { 40QWidget* MailPlugin::widget( QWidget * wid ) {
41 if(!m_widget) { 41 if(!m_widget) {
42 m_widget = new MailPluginWidget( wid, "Datebook" ); 42 m_widget = new MailPluginWidget( wid, "Datebook" );
43 } 43 }
44 return m_widget; 44 return m_widget;
45} 45}
46 46
47 47
48QString MailPlugin::pixmapNameConfig() const { 48QString MailPlugin::pixmapNameConfig() const {
49 return 0l; 49 return 0l;
50} 50}
51 51
52TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { 52TodayConfigWidget* MailPlugin::configWidget( QWidget* ) {
53 return 0l; 53 return 0l;
54} 54}
55 55
56QString MailPlugin::appName() const { 56QString MailPlugin::appName() const {
57 return "mail"; 57 return "mail";
58} 58}
59 59
60 60
61bool MailPlugin::excludeFromRefresh() const { 61bool MailPlugin::excludeFromRefresh() const {
62 return false; 62 return false;
63} 63}
64 64
65void MailPlugin::refresh() { 65void MailPlugin::refresh() {
66 if ( m_widget ) { 66 if ( m_widget ) {
67 m_widget->refresh(); 67 m_widget->refresh();
68 } 68 }
69} 69}
70
71void MailPlugin::reinitialize() {
72}
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h
index 295a88c..5b93314 100644
--- a/core/pim/today/plugins/mail/mailplugin.h
+++ b/core/pim/today/plugins/mail/mailplugin.h
@@ -1,49 +1,50 @@
1/* 1/*
2 * mailplugin.h 2 * mailplugin.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
7 */ 7 */
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17 17
18#ifndef MAIL_PLUGIN_H 18#ifndef MAIL_PLUGIN_H
19#define MAIL_PLUGIN_H 19#define MAIL_PLUGIN_H
20 20
21#include <qwidget.h> 21#include <qwidget.h>
22#include <qguardedptr.h> 22#include <qguardedptr.h>
23 23
24#include <opie/todayplugininterface.h> 24#include <opie/todayplugininterface.h>
25#include <opie/todayconfigwidget.h> 25#include <opie/todayconfigwidget.h>
26 26
27#include "mailpluginwidget.h" 27#include "mailpluginwidget.h"
28 28
29class MailPlugin : public TodayPluginObject { 29class MailPlugin : public TodayPluginObject {
30 30
31public: 31public:
32 MailPlugin(); 32 MailPlugin();
33 ~MailPlugin(); 33 ~MailPlugin();
34 34
35 QString pluginName() const; 35 QString pluginName() const;
36 double versionNumber() const; 36 double versionNumber() const;
37 QString pixmapNameWidget() const; 37 QString pixmapNameWidget() const;
38 QWidget* widget(QWidget *); 38 QWidget* widget(QWidget *);
39 QString pixmapNameConfig() const; 39 QString pixmapNameConfig() const;
40 TodayConfigWidget* configWidget(QWidget *); 40 TodayConfigWidget* configWidget(QWidget *);
41 QString appName() const; 41 QString appName() const;
42 bool excludeFromRefresh() const; 42 bool excludeFromRefresh() const;
43 void refresh(); 43 void refresh();
44 void reinitialize();
44 45
45 private: 46 private:
46 QGuardedPtr<MailPluginWidget> m_widget; 47 QGuardedPtr<MailPluginWidget> m_widget;
47}; 48};
48 49
49#endif 50#endif
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index 3c1d908..646996a 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -1,80 +1,80 @@
1/* 1/*
2 * mailpluginwidget.cpp 2 * mailpluginwidget.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 <qpe/config.h> 17#include <qpe/config.h>
18#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
19 19
20#include "mailpluginwidget.h" 20#include "mailpluginwidget.h"
21 21
22MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) 22MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
23 : QWidget(parent, name ) { 23 : QWidget(parent, name ) {
24 24
25 m_mailLabel = 0l; 25 m_mailLabel = 0l;
26 m_layout = 0l; 26 m_layout = 0l;
27 27
28 if ( m_mailLabel ) { 28 if ( m_mailLabel ) {
29 delete m_mailLabel; 29 delete m_mailLabel;
30 } 30 }
31 m_mailLabel = new OClickableLabel( this ); 31 m_mailLabel = new OClickableLabel( this );
32 m_mailLabel->setMaximumHeight( 15 ); 32 //m_mailLabel->setMaximumHeight( 15 );
33 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); 33 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
34 34
35 if ( m_layout ) { 35 if ( m_layout ) {
36 delete m_layout; 36 delete m_layout;
37 } 37 }
38 m_layout = new QHBoxLayout( this ); 38 m_layout = new QHBoxLayout( this );
39 m_layout->setAutoAdd( true ); 39 m_layout->setAutoAdd( true );
40 40
41 readConfig(); 41 readConfig();
42 getInfo(); 42 getInfo();
43} 43}
44 44
45MailPluginWidget::~MailPluginWidget() { 45MailPluginWidget::~MailPluginWidget() {
46 delete m_mailLabel; 46 delete m_mailLabel;
47 delete m_layout; 47 delete m_layout;
48} 48}
49 49
50 50
51void MailPluginWidget::readConfig() { 51void MailPluginWidget::readConfig() {
52 Config cfg( "todaymailplugin" ); 52 Config cfg( "todaymailplugin" );
53 cfg.setGroup( "config" ); 53 cfg.setGroup( "config" );
54} 54}
55 55
56 56
57void MailPluginWidget::refresh() { 57void MailPluginWidget::refresh() {
58 getInfo(); 58 getInfo();
59} 59}
60 60
61void MailPluginWidget::getInfo() { 61void MailPluginWidget::getInfo() {
62 62
63 Config cfg( "opiemail" ); 63 Config cfg( "opiemail" );
64 cfg.setGroup( "today" ); 64 cfg.setGroup( "today" );
65 65
66 int NEW_MAILS = cfg.readNumEntry( "newmails", 0 ); 66 int NEW_MAILS = cfg.readNumEntry( "newmails", 0 );
67 int OUTGOING = cfg.readNumEntry( "outgoing", 0 ); 67 int OUTGOING = cfg.readNumEntry( "outgoing", 0 );
68 68
69 //QString output = QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING ); 69 //QString output = QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING );
70 70
71 m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING ) ); 71 m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING ) );
72} 72}
73 73
74/** 74/**
75 * launches datebook 75 * launches datebook
76 */ 76 */
77void MailPluginWidget::startMail() { 77void MailPluginWidget::startMail() {
78 QCopEnvelope e("QPE/System", "execute(QString)"); 78 QCopEnvelope e("QPE/System", "execute(QString)");
79 e << QString( "mail" ); 79 e << QString( "mail" );
80} 80}
diff --git a/core/pim/today/plugins/mail/opie-today-mailplugin.control b/core/pim/today/plugins/mail/opie-today-mailplugin.control
index 1419557..e69de29 100644
--- a/core/pim/today/plugins/mail/opie-today-mailplugin.control
+++ b/core/pim/today/plugins/mail/opie-today-mailplugin.control
@@ -1,9 +0,0 @@
1Package: opie-today-mailplugin
2Files: plugins/today/libtodaymailplugin.so*
3Priority: optional
4Section: opie/applications
5Maintainer: Maximilian Reiss <harlekin@handhelds.org>
6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: libqte2, opie-today
9Description: Mail plugin for today
diff --git a/core/pim/today/plugins/todolist/.cvsignore b/core/pim/today/plugins/todolist/.cvsignore
index 2888d4a..b9284b8 100644
--- a/core/pim/today/plugins/todolist/.cvsignore
+++ b/core/pim/today/plugins/todolist/.cvsignore
@@ -1,2 +1,3 @@
1Makefile* 1Makefile*
2todopluginconfigbase*
2moc* 3moc*
diff --git a/core/pim/today/plugins/todolist/config.in b/core/pim/today/plugins/todolist/config.in
index c862f37..48ba226 100644
--- a/core/pim/today/plugins/todolist/config.in
+++ b/core/pim/today/plugins/todolist/config.in
@@ -1,4 +1,4 @@
1 config TODAY_TODOLIST 1 config TODAY_TODOLIST
2 boolean "opie-today-todolistplugin (shows the next todo entries)" 2 boolean "todolist"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro
index 0343223..6a63f4e 100644
--- a/core/pim/today/plugins/todolist/todolist.pro
+++ b/core/pim/today/plugins/todolist/todolist.pro
@@ -1,22 +1,41 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt 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 -lopie
18 18
19DESTDIR = $(OPIEDIR)/plugins/today 19DESTDIR = $(OPIEDIR)/plugins/today
20TARGET = todaytodolistplugin 20TARGET = todaytodolistplugin
21 21
22TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \
23 ../../../../../i18n/nl/libtodaytodolistplugin.ts \
24 ../../../../../i18n/xx/libtodaytodolistplugin.ts \
25 ../../../../../i18n/en/libtodaytodolistplugin.ts \
26 ../../../../../i18n/es/libtodaytodolistplugin.ts \
27 ../../../../../i18n/fr/libtodaytodolistplugin.ts \
28 ../../../../../i18n/hu/libtodaytodolistplugin.ts \
29 ../../../../../i18n/ja/libtodaytodolistplugin.ts \
30 ../../../../../i18n/ko/libtodaytodolistplugin.ts \
31 ../../../../../i18n/no/libtodaytodolistplugin.ts \
32 ../../../../../i18n/pl/libtodaytodolistplugin.ts \
33 ../../../../../i18n/pt/libtodaytodolistplugin.ts \
34 ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \
35 ../../../../../i18n/sl/libtodaytodolistplugin.ts \
36 ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \
37 ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \
38 ../../../../../i18n/it/libtodaytodolistplugin.ts \
39 ../../../../../i18n/da/libtodaytodolistplugin.ts
40
22include ( $(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 7eeb8f1..801de9d 100644
--- a/core/pim/today/plugins/todolist/todoplugin.cpp
+++ b/core/pim/today/plugins/todolist/todoplugin.cpp
@@ -1,70 +1,76 @@
1/* 1/*
2 * todoplugin.cpp 2 * todoplugin.cpp
3 * 3 *
4 * copyright : (c) 2002 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 17
18 18
19#include "todoplugin.h" 19#include "todoplugin.h"
20#include "todopluginconfig.h" 20#include "todopluginconfig.h"
21 21
22 22
23TodolistPlugin::TodolistPlugin() { 23TodolistPlugin::TodolistPlugin() {
24} 24}
25 25
26TodolistPlugin::~TodolistPlugin() { 26TodolistPlugin::~TodolistPlugin() {
27 delete (TodolistPluginWidget*)m_widget; 27 delete (TodolistPluginWidget*)m_widget;
28} 28}
29 29
30QString TodolistPlugin::pluginName() const { 30QString TodolistPlugin::pluginName() const {
31 return QObject::tr( "Todolist plugin" ); 31 return QObject::tr( "Todolist plugin" );
32} 32}
33 33
34double TodolistPlugin::versionNumber() const { 34double TodolistPlugin::versionNumber() const {
35 return 0.9; 35 return 0.9;
36} 36}
37 37
38QString TodolistPlugin::pixmapNameWidget() const { 38QString TodolistPlugin::pixmapNameWidget() const {
39 return "todo/TodoList"; 39 return "todo/TodoList";
40} 40}
41 41
42QWidget* TodolistPlugin::widget( QWidget *wid ) { 42QWidget* TodolistPlugin::widget( QWidget *wid ) {
43 if(!m_widget) { 43 if(!m_widget) {
44 m_widget = new TodolistPluginWidget( wid, "Todolist" ); 44 m_widget = new TodolistPluginWidget( wid, "Todolist" );
45 } 45 }
46 return m_widget; 46 return m_widget;
47} 47}
48 48
49QString TodolistPlugin::pixmapNameConfig() const { 49QString TodolistPlugin::pixmapNameConfig() const {
50 return "todo/TodoList"; 50 return "todo/TodoList";
51} 51}
52 52
53TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { 53TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) {
54 return new TodolistPluginConfig( wid , "Todolist" ); 54 return new TodolistPluginConfig( wid , "Todolist" );
55} 55}
56 56
57QString TodolistPlugin::appName() const { 57QString TodolistPlugin::appName() const {
58 return "todolist"; 58 return "todolist";
59} 59}
60 60
61 61
62bool TodolistPlugin::excludeFromRefresh() const { 62bool TodolistPlugin::excludeFromRefresh() const {
63 return false; 63 return false;
64} 64}
65 65
66void TodolistPlugin::refresh() { 66void TodolistPlugin::refresh() {
67 if ( m_widget ) { 67 if ( m_widget ) {
68 m_widget->refresh(); 68 m_widget->refresh();
69 } 69 }
70} 70}
71
72void TodolistPlugin::reinitialize() {
73 if ( m_widget ) {
74 m_widget->reinitialize();
75 }
76}
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h
index d7b51b4..f68162f 100644
--- a/core/pim/today/plugins/todolist/todoplugin.h
+++ b/core/pim/today/plugins/todolist/todoplugin.h
@@ -1,49 +1,50 @@
1/* 1/*
2 * todoplugin.h 2 * todoplugin.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
7 */ 7 */
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17#ifndef TODOLIST_PLUGIN_H 17#ifndef TODOLIST_PLUGIN_H
18#define TODOLIST_PLUGIN_H 18#define TODOLIST_PLUGIN_H
19 19
20#include <qstring.h> 20#include <qstring.h>
21#include <qguardedptr.h> 21#include <qguardedptr.h>
22#include <qwidget.h> 22#include <qwidget.h>
23 23
24#include <opie/oclickablelabel.h> 24#include <opie/oclickablelabel.h>
25#include <opie/todayplugininterface.h> 25#include <opie/todayplugininterface.h>
26 26
27#include "todopluginwidget.h" 27#include "todopluginwidget.h"
28 28
29class TodolistPlugin : public TodayPluginObject { 29class TodolistPlugin : public TodayPluginObject {
30 30
31public: 31public:
32 TodolistPlugin(); 32 TodolistPlugin();
33 ~TodolistPlugin(); 33 ~TodolistPlugin();
34 34
35 QString pluginName() const; 35 QString pluginName() const;
36 double versionNumber() const; 36 double versionNumber() const;
37 QString pixmapNameWidget() const; 37 QString pixmapNameWidget() const;
38 QWidget* widget(QWidget *); 38 QWidget* widget(QWidget *);
39 QString pixmapNameConfig() const; 39 QString pixmapNameConfig() const;
40 TodayConfigWidget* configWidget(QWidget *); 40 TodayConfigWidget* configWidget(QWidget *);
41 QString appName() const; 41 QString appName() const;
42 bool excludeFromRefresh() const; 42 bool excludeFromRefresh() const;
43 void refresh(); 43 void refresh();
44 void reinitialize();
44 45
45 private: 46 private:
46 QGuardedPtr<TodolistPluginWidget> m_widget; 47 QGuardedPtr<TodolistPluginWidget> m_widget;
47}; 48};
48 49
49#endif 50#endif
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp
index 15081ec..0364f94 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.cpp
+++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp
@@ -1,131 +1,138 @@
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 OTodoAccess();
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();
68 getTodo();
69}
70
71void TodolistPluginWidget::reinitialize() {
72 readConfig();
73 todo->reload();
67 getTodo(); 74 getTodo();
68} 75}
69 76
70/** 77/**
71 * Get the todos 78 * Get the todos
72 */ 79 */
73void TodolistPluginWidget::getTodo() { 80void TodolistPluginWidget::getTodo() {
74 81
75 82
76 QString output; 83 QString output;
77 QString tmpout; 84 QString tmpout;
78 int count = 0; 85 int count = 0;
79 int ammount = 0; 86 int ammount = 0;
80 87
81 // get overdue todos first 88 // get overdue todos first
82 m_list = todo->overDue(); 89 m_list = todo->sorted( true, 3, 2, 1);
83 90
84 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 91 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
85 if (!(*m_it).isCompleted() && ( ammount < m_maxLinesTask ) ) { 92 if (!(*m_it).isCompleted() && ( ammount < m_maxLinesTask ) ) {
86 QString desc = (*m_it).summary(); 93 QString desc = (*m_it).summary();
87 if( desc.isEmpty() ) { 94 if( desc.isEmpty() ) {
88 desc = (*m_it).description(); 95 desc = (*m_it).description();
89 } 96 }
90 tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>"; 97 tmpout += "<font color=#e00000><b>[" + QString("%1").arg((*m_it).priority() ) + "]" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
91 ammount++ ; 98 ammount++ ;
92 } 99 }
93 } 100 }
94 101
95 // get total number of still open todos 102 // get total number of still open todos
96 m_list = todo->sorted( true, 1, 4, 1); 103 m_list = todo->sorted( true, 1, 4, 1);
97 104
98 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 105 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
99 count +=1; 106 count +=1;
100 // not the overdues, we allready got them, and not if we are 107 // not the overdues, we allready got them, and not if we are
101 // over the maxlines 108 // over the maxlines
102 if ( !(*m_it).isOverdue() && ( ammount < m_maxLinesTask ) ) { 109 if ( !(*m_it).isOverdue() && ( ammount < m_maxLinesTask ) ) {
103 QString desc = (*m_it).summary(); 110 QString desc = (*m_it).summary();
104 if( desc.isEmpty() ) { 111 if( desc.isEmpty() ) {
105 desc = (*m_it).description(); 112 desc = (*m_it).description();
106 } 113 }
107 tmpout += "<b>-</b>" + desc.mid( 0, m_maxCharClip ) + "<br>"; 114 tmpout += "<b> [" + QString("%1").arg((*m_it).priority() ) + "] </b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
108 ammount++; 115 ammount++;
109 } 116 }
110 } 117 }
111 118
112 if ( count > 0 ) { 119 if ( count > 0 ) {
113 if( count == 1 ) { 120 if( count == 1 ) {
114 output += QObject::tr( "There is <b> 1</b> active task: <br>" ); 121 output += QObject::tr( "There is <b> 1</b> active task: <br>" );
115 } else { 122 } else {
116 output += QObject::tr( "There are <b> %1</b> active tasks: <br>" ).arg( count ); 123 output += QObject::tr( "There are <b> %1</b> active tasks: <br>" ).arg( count );
117 } 124 }
118 output += tmpout; 125 output += tmpout;
119 } else { 126 } else {
120 output = QObject::tr( "No active tasks" ); 127 output = QObject::tr( "No active tasks" );
121 } 128 }
122 todoLabel->setText( output ); 129 todoLabel->setText( output );
123} 130}
124 131
125/** 132/**
126 * start the todolist 133 * start the todolist
127 */ 134 */
128void TodolistPluginWidget::startTodolist() { 135void TodolistPluginWidget::startTodolist() {
129 QCopEnvelope e( "QPE/System", "execute(QString)" ); 136 QCopEnvelope e( "QPE/System", "execute(QString)" );
130 e << QString( "todolist" ); 137 e << QString( "todolist" );
131} 138}
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.h b/core/pim/today/plugins/todolist/todopluginwidget.h
index 0db65c4..9cac43d 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.h
+++ b/core/pim/today/plugins/todolist/todopluginwidget.h
@@ -1,53 +1,54 @@
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 <opie/otodoaccess.h>
23#include <opie/oclickablelabel.h> 23#include <opie/oclickablelabel.h>
24 24
25 25
26class TodolistPluginWidget : public QWidget { 26class TodolistPluginWidget : public QWidget {
27 27
28 Q_OBJECT 28 Q_OBJECT
29 29
30public: 30public:
31 TodolistPluginWidget( QWidget *parent, const char *name ); 31 TodolistPluginWidget( QWidget *parent, const char *name );
32 ~TodolistPluginWidget(); 32 ~TodolistPluginWidget();
33 33
34 void refresh(); 34 void refresh();
35 void reinitialize();
35 36
36protected slots: 37protected slots:
37 void startTodolist(); 38 void startTodolist();
38 39
39private: 40private:
40 OClickableLabel *todoLabel; 41 OClickableLabel *todoLabel;
41 QVBoxLayout* layoutTodo; 42 QVBoxLayout* layoutTodo;
42 43
43 OTodoAccess *todo; 44 OTodoAccess *todo;
44 OTodoAccess::List m_list; 45 OTodoAccess::List m_list;
45 OTodoAccess::List::Iterator m_it; 46 OTodoAccess::List::Iterator m_it;
46 47
47 void readConfig(); 48 void readConfig();
48 void getTodo(); 49 void getTodo();
49 int m_maxLinesTask; 50 int m_maxLinesTask;
50 int m_maxCharClip; 51 int m_maxCharClip;
51}; 52};
52 53
53#endif 54#endif
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index dd8d59b..d4a0ae6 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -1,485 +1,476 @@
1/* 1/*
2 * today.cpp 2 * today.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 17
18 18
19#define QTOPIA_INTERNAL_LANGLIST 19#define QTOPIA_INTERNAL_LANGLIST
20 20
21#include "today.h" 21#include "today.h"
22 22
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/qcopenvelope_qws.h> 24#include <qpe/qcopenvelope_qws.h>
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26#include <qpe/global.h> 26#include <qpe/global.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qpe/contact.h> 28#include <qpe/contact.h>
29#include <qpe/timestring.h> 29#include <qpe/timestring.h>
30 30
31#include <qdir.h> 31#include <qdir.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qtimer.h> 33#include <qtimer.h>
34#include <qwhatsthis.h> 34#include <qwhatsthis.h>
35#include <qtranslator.h> 35#include <qtranslator.h>
36 36
37struct TodayPlugin { 37struct TodayPlugin {
38 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} 38 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
39 QLibrary *library; 39 QLibrary *library;
40 QInterfacePtr<TodayPluginInterface> iface; 40 QInterfacePtr<TodayPluginInterface> iface;
41 TodayPluginObject *guiPart; 41 TodayPluginObject *guiPart;
42 QWidget *guiBox; 42 QWidget *guiBox;
43 QString name; 43 QString name;
44 bool active; 44 bool active;
45 bool excludeRefresh; 45 bool excludeRefresh;
46 int pos; 46 int pos;
47}; 47};
48 48
49static QValueList<TodayPlugin> pluginList; 49static QValueList<TodayPlugin> pluginList;
50 50
51static QMap<QString, TodayPlugin> tempList; 51static QMap<QString, TodayPlugin> tempList;
52 52
53Today::Today( QWidget* parent, const char* name, WFlags fl ) 53Today::Today( QWidget* parent, const char* name, WFlags fl )
54 : TodayBase( parent, name, fl ) { 54 : TodayBase( parent, name, fl ) {
55 55
56 QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); 56 QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
57 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); 57 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
58 58
59#if defined(Q_WS_QWS) 59#if defined(Q_WS_QWS)
60#if !defined(QT_NO_COP) 60#if !defined(QT_NO_COP)
61 QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); 61 QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
62 connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 62 connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
63 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 63 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
64#endif 64#endif
65#endif 65#endif
66 66
67 setOwnerField(); 67 setOwnerField();
68 m_refreshTimer = new QTimer( this ); 68 m_refreshTimer = new QTimer( this );
69 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 69 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
70 m_refreshTimer->start( 15000 ); 70 m_refreshTimer->start( 15000 );
71 m_big_box = 0L; 71 m_big_box = 0L;
72 72
73 73
74 layout = new QVBoxLayout( this ); 74 layout = new QVBoxLayout( this );
75 layout->addWidget( Frame ); 75 layout->addWidget( Frame );
76 layout->addWidget( OwnerField ); 76 layout->addWidget( OwnerField );
77 77
78 m_sv = new QScrollView( this ); 78 m_sv = new QScrollView( this );
79 m_sv->setResizePolicy( QScrollView::AutoOneFit ); 79 m_sv->setResizePolicy( QScrollView::AutoOneFit );
80 m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); 80 m_sv->setHScrollBarMode( QScrollView::AlwaysOff );
81 m_sv->setFrameShape( QFrame::NoFrame ); 81 m_sv->setFrameShape( QFrame::NoFrame );
82 82
83 layout->addWidget( m_sv ); 83 layout->addWidget( m_sv );
84 layout->setStretchFactor( m_sv,4 ); 84 layout->setStretchFactor( m_sv,4 );
85 85
86 qApp->processEvents(); 86 qApp->processEvents();
87 loadPlugins(); 87 loadPlugins();
88 showMaximized(); 88 showMaximized();
89} 89}
90 90
91/** 91/**
92 * Qcop receive method. 92 * Qcop receive method.
93 */ 93 */
94void Today::channelReceived( const QCString &msg, const QByteArray & data ) { 94void Today::channelReceived( const QCString &msg, const QByteArray & data ) {
95 QDataStream stream( data, IO_ReadOnly ); 95 QDataStream stream( data, IO_ReadOnly );
96 if ( msg == "message(QString)" ) { 96 if ( msg == "message(QString)" ) {
97 QString message; 97 QString message;
98 stream >> message; 98 stream >> message;
99 setOwnerField( message ); 99 setOwnerField( message );
100 } 100 }
101} 101}
102 102
103void Today::setRefreshTimer( int interval ) { 103void Today::setRefreshTimer( int interval ) {
104 104
105 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 105 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
106 106
107 // 0 is "never" case 107 // 0 is "never" case
108 if ( !interval == 0 ) { 108 if ( !interval == 0 ) {
109 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 109 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
110 m_refreshTimer->changeInterval( interval ); 110 m_refreshTimer->changeInterval( interval );
111 } 111 }
112} 112}
113 113
114 114
115/** 115/**
116 * Initialises the owner field with the default value, the username 116 * Initialises the owner field with the default value, the username
117 */ 117 */
118void Today::setOwnerField() { 118void Today::setOwnerField() {
119 QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); 119 QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" );
120 if ( QFile::exists( file ) ) { 120 if ( QFile::exists( file ) ) {
121 Contact cont = Contact::readVCard( file )[0]; 121 Contact cont = Contact::readVCard( file )[0];
122 QString returnString = cont.fullName(); 122 QString returnString = cont.fullName();
123 OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); 123 OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" );
124 } else { 124 } else {
125 OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); 125 OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" );
126 } 126 }
127} 127}
128 128
129/** 129/**
130 * Set the owner field with a given QString, for example per qcop. 130 * Set the owner field with a given QString, for example per qcop.
131 */ 131 */
132void Today::setOwnerField( QString &message ) { 132void Today::setOwnerField( QString &message ) {
133 if ( !message.isEmpty() ) { 133 if ( !message.isEmpty() ) {
134 OwnerField->setText( "<b>" + message + "</b>" ); 134 OwnerField->setText( "<b>" + message + "</b>" );
135 } 135 }
136} 136}
137 137
138/** 138/**
139 * Init stuff needed for today. Reads the config file. 139 * Init stuff needed for today. Reads the config file.
140 */ 140 */
141void Today::init() { 141void Today::init() {
142 // read config 142 // read config
143 Config cfg( "today" ); 143 Config cfg( "today" );
144 144
145 cfg.setGroup( "Plugins" ); 145 cfg.setGroup( "Plugins" );
146 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 146 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
147 m_allApplets = cfg.readListEntry( "AllApplets", ',' ); 147 m_allApplets = cfg.readListEntry( "AllApplets", ',' );
148 148
149 cfg.setGroup( "General" ); 149 cfg.setGroup( "General" );
150 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 150 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
151 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); 151 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 );
152 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); 152 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
153 153
154 // set the date in top label 154 // set the date in top label
155 QDate date = QDate::currentDate(); 155 QDate date = QDate::currentDate();
156 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); 156 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) );
157 157
158 if ( m_hideBanner ) { 158 if ( m_hideBanner ) {
159 Opiezilla->hide(); 159 Opiezilla->hide();
160 TodayLabel->hide(); 160 TodayLabel->hide();
161 } else { 161 } else {
162 Opiezilla->show(); 162 Opiezilla->show();
163 TodayLabel->show(); 163 TodayLabel->show();
164 } 164 }
165 165
166 if ( m_big_box ) { 166 if ( m_big_box ) {
167 delete m_big_box; 167 delete m_big_box;
168 } 168 }
169 169
170 m_big_box = new QWidget( m_sv->viewport() ); 170 m_big_box = new QWidget( m_sv->viewport() );
171 m_sv->addChild( m_big_box ); 171 m_sv->addChild( m_big_box );
172 m_bblayout = new QVBoxLayout ( m_big_box ); 172 m_bblayout = new QVBoxLayout ( m_big_box );
173} 173}
174 174
175/** 175/**
176 * Load the plugins 176 * Load the plugins
177 */ 177 */
178void Today::loadPlugins() { 178void Today::loadPlugins() {
179 179
180 init(); 180 init();
181 181
182 QValueList<TodayPlugin>::Iterator tit; 182 QValueList<TodayPlugin>::Iterator tit;
183 if ( !pluginList.isEmpty() ) { 183 if ( !pluginList.isEmpty() ) {
184 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { 184 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
185 (*tit).guiBox->hide(); 185 (*tit).guiBox->hide();
186 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); 186 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) );
187 delete (*tit).guiBox; 187 delete (*tit).guiBox;
188 (*tit).library->unload(); 188 (*tit).library->unload();
189 delete (*tit).library; 189 delete (*tit).library;
190 } 190 }
191 pluginList.clear(); 191 pluginList.clear();
192 } 192 }
193 193
194 QString path = QPEApplication::qpeDir() + "/plugins/today"; 194 QString path = QPEApplication::qpeDir() + "/plugins/today";
195 qWarning("Searching for Plugins in: %s", path.latin1());
196#ifdef Q_OS_MACX
197 QDir dir( path, "lib*.dylib" );
198#else
199 QDir dir( path, "lib*.so" ); 195 QDir dir( path, "lib*.so" );
200#endif
201 196
202 QStringList list = dir.entryList(); 197 QStringList list = dir.entryList();
203 QStringList::Iterator it; 198 QStringList::Iterator it;
204 199
205 // QMap<QString, TodayPlugin> tempList; 200 // QMap<QString, TodayPlugin> tempList;
206 201
207 for ( it = list.begin(); it != list.end(); ++it ) { 202 for ( it = list.begin(); it != list.end(); ++it ) {
208 QInterfacePtr<TodayPluginInterface> iface; 203 QInterfacePtr<TodayPluginInterface> iface;
209 QLibrary *lib = new QLibrary( path + "/" + *it ); 204 QLibrary *lib = new QLibrary( path + "/" + *it );
210 205
211 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 206 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
212 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 207 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
213 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 208 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
214 qDebug( QString(*it) ); 209 qDebug( QString(*it) );
215 210
216 TodayPlugin plugin; 211 TodayPlugin plugin;
217 plugin.library = lib; 212 plugin.library = lib;
218 plugin.iface = iface; 213 plugin.iface = iface;
219 plugin.name = QString(*it); 214 plugin.name = QString(*it);
220 215
221 QString type = (*it).left( (*it).find(".") ); 216 QString type = (*it).left( (*it).find(".") );
222 217
223 // grr, sharp rom does not know Global::languageList(); 218 QString lang;
224 // QStringList langs = Global::languageList(); 219 Config config("locale");
225 QString tfn = QPEApplication::qpeDir() + "/i18n/"; 220 config.setGroup("Language");
226 QDir langDir = tfn; 221 lang = config.readEntry( "Language", "en" );
227 QStringList langs = langDir.entryList("*", QDir::Dirs ); 222
228 223 qDebug( "Languages: " + lang );
229 for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { 224 QTranslator * trans = new QTranslator( qApp );
230 QString lang = *lit; 225 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
231 qDebug( "Languages: " + lang ); 226 if ( trans->load( tfn ) ) {
232 QTranslator * trans = new QTranslator( qApp ); 227 qApp->installTranslator( trans );
233 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; 228 } else {
234 if ( trans->load( tfn ) ) { 229 delete trans;
235 qApp->installTranslator( trans );
236 } else {
237 delete trans;
238 }
239 } 230 }
240 231
241 232
242 // find out if plugins should be shown 233 // find out if plugins should be shown
243 if ( m_excludeApplets.grep( *it ).isEmpty() ) { 234 if ( m_excludeApplets.grep( *it ).isEmpty() ) {
244 plugin.active = true; 235 plugin.active = true;
245 } else { 236 } else {
246 plugin.active = false; 237 plugin.active = false;
247 } 238 }
248 239
249 plugin.guiPart = plugin.iface->guiPart(); 240 plugin.guiPart = plugin.iface->guiPart();
250 plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); 241 plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh();
251 242
252 // package the whole thing into a qwidget so it can be shown and hidden 243 // package the whole thing into a qwidget so it can be shown and hidden
253 plugin.guiBox = new QWidget( m_big_box ); 244 plugin.guiBox = new QWidget( m_big_box );
254 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); 245 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox );
255 QPixmap plugPix; 246 QPixmap plugPix;
256 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); 247 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 );
257 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); 248 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
258 plugIcon->setPixmap( plugPix ); 249 plugIcon->setPixmap( plugPix );
259 QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") ); 250 QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") );
260 plugIcon->setName( plugin.guiPart->appName() ); 251 plugIcon->setName( plugin.guiPart->appName() );
261 connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); 252 connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) );
262 253
263 QWidget *plugWidget = plugin.guiPart->widget( plugin.guiBox ); 254 QWidget *plugWidget = plugin.guiPart->widget( plugin.guiBox );
264 boxLayout->addWidget( plugIcon, 0, AlignTop ); 255 boxLayout->addWidget( plugIcon, 0, AlignTop );
265 boxLayout->addWidget( plugWidget, 0, AlignTop ); 256 boxLayout->addWidget( plugWidget, 0, AlignTop );
266 boxLayout->setStretchFactor( plugIcon, 1 ); 257 boxLayout->setStretchFactor( plugIcon, 1 );
267 boxLayout->setStretchFactor( plugWidget, 9 ); 258 boxLayout->setStretchFactor( plugWidget, 9 );
268 259
269 // "prebuffer" it in one more list, to get the sorting done 260 // "prebuffer" it in one more list, to get the sorting done
270 tempList.insert( plugin.name, plugin ); 261 tempList.insert( plugin.name, plugin );
271 262
272 // on first start the list is off course empty 263 // on first start the list is off course empty
273 if ( m_allApplets.isEmpty() ) { 264 if ( m_allApplets.isEmpty() ) {
274 pluginList.append( plugin ); 265 pluginList.append( plugin );
275 m_bblayout->addWidget( plugin.guiBox ); 266 m_bblayout->addWidget( plugin.guiBox );
276 } 267 }
277 268
278 // if plugin is not yet in the list, add it to the layout too 269 // if plugin is not yet in the list, add it to the layout too
279 else if ( !m_allApplets.contains( plugin.name ) ) { 270 else if ( !m_allApplets.contains( plugin.name ) ) {
280 pluginList.append( plugin ); 271 pluginList.append( plugin );
281 } 272 }
282 } else { 273 } else {
283 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); 274 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
284 delete lib; 275 delete lib;
285 } 276 }
286 277
287 } 278 }
288 279
289 280
290 if ( !m_allApplets.isEmpty() ) { 281 if ( !m_allApplets.isEmpty() ) {
291 TodayPlugin tempPlugin; 282 TodayPlugin tempPlugin;
292 QStringList::Iterator stringit; 283 QStringList::Iterator stringit;
293 284
294 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { 285 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) {
295 tempPlugin = ( tempList.find( *stringit ) ).data(); 286 tempPlugin = ( tempList.find( *stringit ) ).data();
296 if ( !( (tempPlugin.name).isEmpty() ) ) { 287 if ( !( (tempPlugin.name).isEmpty() ) ) {
297 pluginList.append( tempPlugin ); 288 pluginList.append( tempPlugin );
298 m_bblayout->addWidget( tempPlugin.guiBox ); 289 m_bblayout->addWidget( tempPlugin.guiBox );
299 } 290 }
300 } 291 }
301 } 292 }
302 m_bblayout->addStretch( 2 ); 293 m_bblayout->addStretch( 2 );
303 draw(); 294 draw();
304} 295}
305 296
306 297
307 298
308 299
309/** 300/**
310 * Repaint method. Reread all fields. 301 * Repaint method. Reread all fields.
311 */ 302 */
312void Today::draw() { 303void Today::draw() {
313 304
314 if ( pluginList.count() == 0 ) { 305 if ( pluginList.count() == 0 ) {
315 QLabel *noPlugins = new QLabel( this ); 306 QLabel *noPlugins = new QLabel( this );
316 noPlugins->setText( tr( "No plugins found" ) ); 307 noPlugins->setText( tr( "No plugins found" ) );
317 layout->addWidget( noPlugins ); 308 layout->addWidget( noPlugins );
318 return; 309 return;
319 } 310 }
320 311
321 uint count = 0; 312 uint count = 0;
322 TodayPlugin plugin; 313 TodayPlugin plugin;
323 for ( uint i = 0; i < pluginList.count(); i++ ) { 314 for ( uint i = 0; i < pluginList.count(); i++ ) {
324 plugin = pluginList[i]; 315 plugin = pluginList[i];
325 316
326 if ( plugin.active ) { 317 if ( plugin.active ) {
327 // qDebug( plugin.name + " is ACTIVE " ); 318 // qDebug( plugin.name + " is ACTIVE " );
328 plugin.guiBox->show(); 319 plugin.guiBox->show();
329 } else { 320 } else {
330 // qDebug( plugin.name + " is INACTIVE" ); 321 // qDebug( plugin.name + " is INACTIVE" );
331 plugin.guiBox->hide(); 322 plugin.guiBox->hide();
332 } 323 }
333 count++; 324 count++;
334 } 325 }
335 326
336 if ( count == 0 ) { 327 if ( count == 0 ) {
337 QLabel *noPluginsActive = new QLabel( this ); 328 QLabel *noPluginsActive = new QLabel( this );
338 noPluginsActive->setText( tr( "No plugins activated" ) ); 329 noPluginsActive->setText( tr( "No plugins activated" ) );
339 layout->addWidget( noPluginsActive ); 330 layout->addWidget( noPluginsActive );
340 } 331 }
341 repaint(); 332 repaint();
342} 333}
343 334
344 335
345/** 336/**
346 * The method for the configuration dialog. 337 * The method for the configuration dialog.
347 */ 338 */
348void Today::startConfig() { 339void Today::startConfig() {
349 340
350 // disconnect timer to prevent problems while being on config dialog 341 // disconnect timer to prevent problems while being on config dialog
351 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 342 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
352 m_refreshTimer->stop( ); 343 m_refreshTimer->stop( );
353 344
354 TodayConfig conf( this, "dialog", true ); 345 TodayConfig conf( this, "dialog", true );
355 346
356 TodayPlugin plugin; 347 TodayPlugin plugin;
357 QList<TodayConfigWidget> configWidgetList; 348 QList<TodayConfigWidget> configWidgetList;
358 349
359 for ( int i = pluginList.count() - 1; i >= 0; i-- ) { 350 for ( int i = pluginList.count() - 1; i >= 0; i-- ) {
360 plugin = pluginList[i]; 351 plugin = pluginList[i];
361 352
362 // load the config widgets in the tabs 353 // load the config widgets in the tabs
363 if ( plugin.guiPart->configWidget( this ) != 0l ) { 354 if ( plugin.guiPart->configWidget( this ) != 0l ) {
364 TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); 355 TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 );
365 configWidgetList.append( widget ); 356 configWidgetList.append( widget );
366 conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig() 357 conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig()
367 , plugin.guiPart->appName() ); 358 , plugin.guiPart->appName() );
368 } 359 }
369 // set the order/activate tab 360 // set the order/activate tab
370 conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(), 361 conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(),
371 Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) ); 362 Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) );
372 } 363 }
373 364
374 if ( conf.exec() == QDialog::Accepted ) { 365 if ( conf.exec() == QDialog::Accepted ) {
375 conf.writeConfig(); 366 conf.writeConfig();
376 TodayConfigWidget *confWidget; 367 TodayConfigWidget *confWidget;
377 for ( confWidget = configWidgetList.first(); confWidget != 0; 368 for ( confWidget = configWidgetList.first(); confWidget != 0;
378 confWidget = configWidgetList.next() ) { 369 confWidget = configWidgetList.next() ) {
379 confWidget->writeConfig(); 370 confWidget->writeConfig();
380 } 371 }
381 372
382 // make the plugins to reinitialize ( reread its configs ) 373 // make the plugins to reinitialize ( reread its configs )
383 reinitialize(); 374 reinitialize();
384 draw(); 375 draw();
385 376
386 } else { 377 } else {
387 // since refresh is not called in that case , reconnect the signal 378 // since refresh is not called in that case , reconnect the signal
388 m_refreshTimer->start( 15000 ); // get the config value in here later 379 m_refreshTimer->start( 15000 ); // get the config value in here later
389 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 380 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
390 } 381 }
391} 382}
392 383
393 384
394 385
395void Today::reinitialize() { 386void Today::reinitialize() {
396 387
397 Config cfg( "today" ); 388 Config cfg( "today" );
398 cfg.setGroup( "Plugins" ); 389 cfg.setGroup( "Plugins" );
399 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 390 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
400 m_allApplets = cfg.readListEntry( "AllApplets", ',' ); 391 m_allApplets = cfg.readListEntry( "AllApplets", ',' );
401 392
402 /* reinitialize all plugins */ 393 /* reinitialize all plugins */
403 QValueList<TodayPlugin>::Iterator it; 394 QValueList<TodayPlugin>::Iterator it;
404 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { 395 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) {
405 if ( !(*it).excludeRefresh ) { 396 if ( !(*it).excludeRefresh ) {
406 (*it).guiPart->reinitialize(); 397 (*it).guiPart->reinitialize();
407 qDebug( "reinit" ); 398 qDebug( "reinit" );
408 } 399 }
409 400
410 /* check if plugins is still to be shown */ 401 /* check if plugins is still to be shown */
411 if ( m_excludeApplets.grep( (*it).name ).isEmpty() ) { 402 if ( m_excludeApplets.grep( (*it).name ).isEmpty() ) {
412 (*it).active = true; 403 (*it).active = true;
413 } else { 404 } else {
414 (*it).active = false; 405 (*it).active = false;
415 } 406 }
416 407
417 } 408 }
418 409
419 cfg.setGroup( "General" ); 410 cfg.setGroup( "General" );
420 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 411 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
421 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); 412 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 );
422 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); 413 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
423 414
424 // set the date in top label 415 // set the date in top label
425 QDate date = QDate::currentDate(); 416 QDate date = QDate::currentDate();
426 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); 417 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) );
427 418
428 if ( m_hideBanner ) { 419 if ( m_hideBanner ) {
429 Opiezilla->hide(); 420 Opiezilla->hide();
430 TodayLabel->hide(); 421 TodayLabel->hide();
431 } else { 422 } else {
432 Opiezilla->show(); 423 Opiezilla->show();
433 TodayLabel->show(); 424 TodayLabel->show();
434 } 425 }
435 426
436 delete m_bblayout; 427 delete m_bblayout;
437 m_bblayout = new QVBoxLayout( m_big_box ); 428 m_bblayout = new QVBoxLayout( m_big_box );
438 TodayPlugin tempPlugin; 429 TodayPlugin tempPlugin;
439 QStringList::Iterator stringit; 430 QStringList::Iterator stringit;
440 431
441 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { 432 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) {
442 tempPlugin = ( tempList.find( *stringit ) ).data(); 433 tempPlugin = ( tempList.find( *stringit ) ).data();
443 if ( !( (tempPlugin.name).isEmpty() ) ) { 434 if ( !( (tempPlugin.name).isEmpty() ) ) {
444 m_bblayout->addWidget( tempPlugin.guiBox ); 435 m_bblayout->addWidget( tempPlugin.guiBox );
445 } 436 }
446 } 437 }
447 m_bblayout->addStretch( 2 ); 438 m_bblayout->addStretch( 2 );
448 439
449} 440}
450 441
451/** 442/**
452 * Refresh for the view. Reload all applets 443 * Refresh for the view. Reload all applets
453 * 444 *
454 */ 445 */
455void Today::refresh() { 446void Today::refresh() {
456 447
457 QValueList<TodayPlugin>::Iterator it; 448 QValueList<TodayPlugin>::Iterator it;
458 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { 449 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) {
459 if ( !(*it).excludeRefresh ) { 450 if ( !(*it).excludeRefresh ) {
460 (*it).guiPart->refresh(); 451 (*it).guiPart->refresh();
461 qDebug( "refresh" ); 452 qDebug( "refresh" );
462 } 453 }
463 } 454 }
464 455
465 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( QDate::currentDate() ) + "</font>" ) ); 456 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( QDate::currentDate() ) + "</font>" ) );
466 457
467 updateGeometry(); 458 updateGeometry();
468 repaint(); 459 repaint();
469} 460}
470 461
471void Today::startApplication() { 462void Today::startApplication() {
472 QCopEnvelope e( "QPE/System", "execute(QString)" ); 463 QCopEnvelope e( "QPE/System", "execute(QString)" );
473 e << QString( sender()->name() ); 464 e << QString( sender()->name() );
474} 465}
475 466
476/** 467/**
477 * launch addressbook (personal card) 468 * launch addressbook (personal card)
478 */ 469 */
479void Today::editCard() { 470void Today::editCard() {
480 QCopEnvelope env( "QPE/Application/addressbook", "editPersonalAndClose()" ); 471 QCopEnvelope env( "QPE/Application/addressbook", "editPersonalAndClose()" );
481} 472}
482 473
483Today::~Today() { 474Today::~Today() {
484} 475}
485 476
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro
index 03ee795..2968e6a 100644
--- a/core/pim/today/today.pro
+++ b/core/pim/today/today.pro
@@ -1,11 +1,14 @@
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 4 SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp
5INTERFACES = todayconfigmiscbase.ui
6
5 INCLUDEPATH+= $(OPIEDIR)/include 7 INCLUDEPATH+= $(OPIEDIR)/include
6 DEPENDPATH+= $(OPIEDIR)/include 8 DEPENDPATH+= $(OPIEDIR)/include
7LIBS += -lqpe -lopie 9LIBS += -lqpe -lopie
8 INTERFACES= 10
9 TARGET = today 11 TARGET = today
10 12
11include ( $(OPIEDIR)/include.pro ) 13include ( $(OPIEDIR)/include.pro )
14}
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index a60f1d2..bfb5ec6 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -1,273 +1,232 @@
1/* 1/*
2 * todayconfig.cpp 2 * todayconfig.cpp
3 * 3 *
4 * copyright : (c) 2002 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 "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 22
23#include <qcheckbox.h> 23#include <qcheckbox.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qspinbox.h> 25#include <qspinbox.h>
26#include <qtabwidget.h> 26#include <qtabwidget.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qheader.h> 28#include <qheader.h>
29#include <qhbox.h> 29#include <qhbox.h>
30#include <qvbox.h> 30#include <qvbox.h>
31#include <qtoolbutton.h> 31#include <qtoolbutton.h>
32#include <qtooltip.h> 32#include <qtooltip.h>
33#include <qwhatsthis.h> 33#include <qwhatsthis.h>
34 34
35class ToolButton : public QToolButton { 35class ToolButton : public QToolButton {
36 36
37public: 37public:
38 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) 38 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
39 : QToolButton( parent, name ) { 39 : QToolButton( parent, name ) {
40 setPixmap( Resource::loadPixmap( icon ) ); 40 setPixmap( Resource::loadPixmap( icon ) );
41 setAutoRaise( TRUE ); 41 setAutoRaise( TRUE );
42 setFocusPolicy( QWidget::NoFocus ); 42 setFocusPolicy( QWidget::NoFocus );
43 setToggleButton( t ); 43 setToggleButton( t );
44 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 44 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
45 } 45 }
46}; 46};
47 47
48 48
49/** 49/**
50 * The class has currently quite some duplicate code. 50 * The class has currently quite some duplicate code.
51 * By that way it would be real easy to have it as seperate app in settings tab 51 * By that way it would be real easy to have it as seperate app in settings tab
52 * 52 *
53 */ 53 */
54TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) 54TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
55 : QDialog( parent, name, modal, WStyle_ContextHelp ) { 55 : QDialog( parent, name, modal, WStyle_ContextHelp ) {
56 56
57 setCaption( tr( "Today Config" ) ); 57 setCaption( tr( "Today Config" ) );
58 58
59 QVBoxLayout *layout = new QVBoxLayout( this ); 59 QVBoxLayout *layout = new QVBoxLayout( this );
60 TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 60 TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
61 layout->addWidget( TabWidget3 ); 61 layout->addWidget( TabWidget3 );
62 62
63 tab_2 = new QWidget( TabWidget3, "tab_2" ); 63 tab_2 = new QWidget( TabWidget3, "tab_2" );
64 QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); 64 QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 );
65 QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); 65 QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 );
66 tab2Layout->addWidget( l ); 66 tab2Layout->addWidget( l );
67 QHBox *hbox1 = new QHBox( tab_2 ); 67 QHBox *hbox1 = new QHBox( tab_2 );
68 m_appletListView = new QListView( hbox1 ); 68 m_appletListView = new QListView( hbox1 );
69 m_appletListView->addColumn( "PluginList" ); 69 m_appletListView->addColumn( "PluginList" );
70 m_appletListView->header()->hide(); 70 m_appletListView->header()->hide();
71 m_appletListView->setSorting( -1 ); 71 m_appletListView->setSorting( -1 );
72 QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); 72 QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) );
73 QVBox *vbox1 = new QVBox( hbox1 ); 73 QVBox *vbox1 = new QVBox( hbox1 );
74 new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); 74 new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
75 new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); 75 new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
76 tab2Layout->addWidget( hbox1 ); 76 tab2Layout->addWidget( hbox1 );
77 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); 77 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
78 78
79 // Misc tab
79 tab_3 = new QWidget( TabWidget3, "tab_3" ); 80 tab_3 = new QWidget( TabWidget3, "tab_3" );
80 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); 81 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
81 tab3Layout->setMargin( 20 ); 82
82 QHBox *hbox_auto = new QHBox( tab_3 ); 83 m_guiMisc = new TodayConfigMiscBase( tab_3 );
83 TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); 84
84 TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); 85 tab3Layout->addWidget( m_guiMisc );
85 QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
86 CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
87 QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
88
89 QHBox *hbox_hide = new QHBox( tab_3 );
90 TextLabel4 = new QLabel( hbox_hide, "HideBanner" );
91 TextLabel4->setText( tr( "Tiny Banner" ) );
92 //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
93 CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" );
94 // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
95
96 QHBox *hbox_inactive = new QHBox( tab_3 );
97 TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
98 TimeLabel->setText( tr( "minutes inactive" ) );
99 QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
100 SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
101 SpinBoxTime->setMaxValue ( 1440 );
102 QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
103 QHBox *hbox_iconSize = new QHBox( tab_3 );
104 QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
105 iconSizeLabel->setText( tr( "Icon size" ) );
106 QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) );
107 SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" );
108 SpinBoxIconSize->setMaxValue( 32 );
109 QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) );
110
111 QHBox *hbox_refresh = new QHBox( tab_3 );
112 QLabel *refreshLabel = new QLabel( hbox_refresh );
113 refreshLabel->setText( tr( "Refresh" ) );
114 QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
115 SpinRefresh = new QSpinBox( hbox_refresh );
116 SpinRefresh->setMinValue( 0 );
117 SpinRefresh->setSuffix( tr( " sec" ) );
118 SpinRefresh->setMaxValue ( 7200 );
119 SpinRefresh->setSpecialValueText ( tr("never") );
120 QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
121
122 tab3Layout->addWidget( hbox_auto );
123 tab3Layout->addWidget( hbox_hide );
124 tab3Layout->addWidget( hbox_inactive );
125 tab3Layout->addWidget( hbox_iconSize );
126 tab3Layout->addWidget( hbox_refresh );
127 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); 86 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
128 87
129 m_applets_changed = false; 88 m_applets_changed = false;
130 89
131 connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); 90 connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) );
132 91
133 readConfig(); 92 readConfig();
134 showMaximized(); 93 showMaximized();
135} 94}
136 95
137 96
138/** 97/**
139 * Autostart, uses the new (opie only) autostart method in the launcher code. 98 * Autostart, uses the new (opie only) autostart method in the launcher code.
140 * If registered against that today ist started on each resume. 99 * If registered against that today ist started on each resume.
141 */ 100 */
142void TodayConfig::setAutoStart() { 101void TodayConfig::setAutoStart() {
143 Config cfg( "today" ); 102 Config cfg( "today" );
144 cfg.setGroup( "Autostart" ); 103 cfg.setGroup( "Autostart" );
145 if ( m_autoStart ) { 104 if ( m_autoStart ) {
146 QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); 105 QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" );
147 e << QString( "add" ); 106 e << QString( "add" );
148 e << QString( "today" ); 107 e << QString( "today" );
149 e << QString( "%1" ).arg( m_autoStartTimer ); 108 e << QString( "%1" ).arg( m_autoStartTimer );
150 } else { 109 } else {
151 QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); 110 QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" );
152 e << QString( "remove" ); 111 e << QString( "remove" );
153 e << QString( "today" ); 112 e << QString( "today" );
154 } 113 }
155} 114}
156 115
157/** 116/**
158 * Read the config part 117 * Read the config part
159 */ 118 */
160void TodayConfig::readConfig() { 119void TodayConfig::readConfig() {
161 Config cfg( "today" ); 120 Config cfg( "today" );
162 cfg.setGroup( "Autostart" ); 121 cfg.setGroup( "Autostart" );
163 m_autoStart = cfg.readNumEntry( "autostart", 1 ); 122 m_autoStart = cfg.readNumEntry( "autostart", 1 );
164 CheckBoxAuto->setChecked( m_autoStart ); 123 m_guiMisc->CheckBoxAuto->setChecked( m_autoStart );
165 m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); 124 m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 );
166 SpinBoxTime->setValue( m_autoStartTimer ); 125 m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer );
167 126
168 cfg.setGroup( "General" ); 127 cfg.setGroup( "General" );
169 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 128 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
170 SpinBoxIconSize->setValue( m_iconSize ); 129 m_guiMisc->SpinBoxIconSize->setValue( m_iconSize );
171 SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); 130 m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
172 CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); 131 m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
173 132
174 133
175 cfg.setGroup( "Plugins" ); 134 cfg.setGroup( "Plugins" );
176 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 135 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
177} 136}
178 137
179/** 138/**
180 * Write the config part 139 * Write the config part
181 */ 140 */
182void TodayConfig::writeConfig() { 141void TodayConfig::writeConfig() {
183 Config cfg( "today" ); 142 Config cfg( "today" );
184 cfg.setGroup( "Plugins" ); 143 cfg.setGroup( "Plugins" );
185 if ( m_applets_changed ) { 144 if ( m_applets_changed ) {
186 QStringList exclude; 145 QStringList exclude;
187 QStringList include; 146 QStringList include;
188 QStringList all_applets; 147 QStringList all_applets;
189 148
190 QListViewItemIterator list_it( m_appletListView ); 149 QListViewItemIterator list_it( m_appletListView );
191 150
192 // this makes sure the names get saved in the order selected 151 // this makes sure the names get saved in the order selected
193 for ( ; list_it.current(); ++list_it ) { 152 for ( ; list_it.current(); ++list_it ) {
194 QMap <QString, QCheckListItem *>::Iterator it; 153 QMap <QString, QCheckListItem *>::Iterator it;
195 for ( it = m_applets.begin(); it != m_applets. end (); ++it ) { 154 for ( it = m_applets.begin(); it != m_applets. end (); ++it ) {
196 if ( list_it.current() == (*it) && !(*it)-> isOn () ) { 155 if ( list_it.current() == (*it) && !(*it)-> isOn () ) {
197 exclude << it.key(); 156 exclude << it.key();
198 } else if ( list_it.current() == (*it) && (*it)-> isOn () ){ 157 } else if ( list_it.current() == (*it) && (*it)-> isOn () ){
199 include << it.key(); 158 include << it.key();
200 } 159 }
201 if ( list_it.current() == (*it) ) { 160 if ( list_it.current() == (*it) ) {
202 all_applets << it.key(); 161 all_applets << it.key();
203 } 162 }
204 } 163 }
205 } 164 }
206 cfg.writeEntry( "ExcludeApplets", exclude, ',' ); 165 cfg.writeEntry( "ExcludeApplets", exclude, ',' );
207 cfg.writeEntry( "IncludeApplets", include, ',' ); 166 cfg.writeEntry( "IncludeApplets", include, ',' );
208 cfg.writeEntry( "AllApplets", all_applets, ',' ); 167 cfg.writeEntry( "AllApplets", all_applets, ',' );
209 } 168 }
210 169
211 cfg.setGroup( "Autostart" ); 170 cfg.setGroup( "Autostart" );
212 m_autoStart = CheckBoxAuto->isChecked(); 171 m_autoStart = m_guiMisc->CheckBoxAuto->isChecked();
213 cfg.writeEntry( "autostart", m_autoStart ); 172 cfg.writeEntry( "autostart", m_autoStart );
214 m_autoStartTimer = SpinBoxTime->value(); 173 m_autoStartTimer = m_guiMisc->SpinBoxTime->value();
215 cfg.writeEntry( "autostartdelay", m_autoStartTimer ); 174 cfg.writeEntry( "autostartdelay", m_autoStartTimer );
216 m_iconSize = SpinBoxIconSize->value(); 175 m_iconSize = m_guiMisc->SpinBoxIconSize->value();
217 176
218 cfg.setGroup( "General" ); 177 cfg.setGroup( "General" );
219 cfg.writeEntry( "IconSize", m_iconSize ); 178 cfg.writeEntry( "IconSize", m_iconSize );
220 cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() ); 179 cfg.writeEntry( "HideBanner", m_guiMisc->CheckBoxHide->isChecked() );
221 cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); 180 cfg.writeEntry( "checkinterval", m_guiMisc->SpinRefresh->value()*1000 );
222 181
223 // set autostart settings 182 // set autostart settings
224 setAutoStart(); 183 setAutoStart();
225} 184}
226 185
227 186
228void TodayConfig::moveSelectedUp() { 187void TodayConfig::moveSelectedUp() {
229 QListViewItem *item = m_appletListView->selectedItem(); 188 QListViewItem *item = m_appletListView->selectedItem();
230 if ( item && item->itemAbove() ) { 189 if ( item && item->itemAbove() ) {
231 item->itemAbove()->moveItem( item ); 190 item->itemAbove()->moveItem( item );
232 } 191 }
233} 192}
234 193
235 194
236void TodayConfig::moveSelectedDown() { 195void TodayConfig::moveSelectedDown() {
237 QListViewItem *item = m_appletListView->selectedItem(); 196 QListViewItem *item = m_appletListView->selectedItem();
238 if ( item && item->itemBelow() ) { 197 if ( item && item->itemBelow() ) {
239 item->moveItem( item->itemBelow() ); 198 item->moveItem( item->itemBelow() );
240 } 199 }
241} 200}
242 201
243 202
244/** 203/**
245 * Set up the icons in the order/active tab 204 * Set up the icons in the order/active tab
246 */ 205 */
247void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon ) { 206void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon ) {
248 207
249 QCheckListItem *item; 208 QCheckListItem *item;
250 item = new QCheckListItem( m_appletListView, name, QCheckListItem::CheckBox ); 209 item = new QCheckListItem( m_appletListView, name, QCheckListItem::CheckBox );
251 210
252 if ( !icon.isNull() ) { 211 if ( !icon.isNull() ) {
253 item->setPixmap( 0, icon ); 212 item->setPixmap( 0, icon );
254 } 213 }
255 214
256 if ( m_excludeApplets.find( libName ) == m_excludeApplets.end() ) { 215 if ( m_excludeApplets.find( libName ) == m_excludeApplets.end() ) {
257 item->setOn( TRUE ); 216 item->setOn( TRUE );
258 } 217 }
259 218
260 m_applets[libName] = item; 219 m_applets[libName] = item;
261 220
262 // kind of hack to get the first tab as default. 221 // kind of hack to get the first tab as default.
263 TabWidget3->setCurrentTab( tab_2 ); 222 TabWidget3->setCurrentTab( tab_2 );
264} 223}
265 224
266void TodayConfig::appletChanged() { 225void TodayConfig::appletChanged() {
267 m_applets_changed = true; 226 m_applets_changed = true;
268} 227}
269 228
270 229
271TodayConfig::~TodayConfig() { 230TodayConfig::~TodayConfig() {
272} 231}
273 232
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 41bd44b..0a7687c 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -1,74 +1,73 @@
1/* 1/*
2 * todayconfig.h 2 * todayconfig.h
3 * 3 *
4 * copyright : (c) 2002 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 TODAYCONFIG_H 17#ifndef TODAYCONFIG_H
18#define TODAYCONFIG_H 18#define TODAYCONFIG_H
19 19
20#include <qvariant.h> 20#include <qvariant.h>
21#include <qdialog.h> 21#include <qdialog.h>
22#include <qlistview.h> 22#include <qlistview.h>
23#include <opie/otabwidget.h> 23#include <opie/otabwidget.h>
24 24
25
26#include "todayconfigmiscbase.h"
27
25class QCheckBox; 28class QCheckBox;
26class QLabel; 29class QLabel;
27class QSpinBox; 30class QSpinBox;
28class QTabWidget; 31class QTabWidget;
29 32
30class TodayConfig : public QDialog { 33class TodayConfig : public QDialog {
31 34
32 Q_OBJECT 35 Q_OBJECT
33 36
34public: 37public:
35 TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE ); 38 TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE );
36 ~TodayConfig(); 39 ~TodayConfig();
37 40
38 OTabWidget* TabWidget3; 41 OTabWidget* TabWidget3;
39 42
40 void writeConfig(); 43 void writeConfig();
41 void pluginManagement( QString libName, QString name, QPixmap icon ); 44 void pluginManagement( QString libName, QString name, QPixmap icon );
42 45
43 46
44protected slots: 47protected slots:
45 void appletChanged(); 48 void appletChanged();
46 void moveSelectedUp(); 49 void moveSelectedUp();
47 void moveSelectedDown(); 50 void moveSelectedDown();
48 51
49private: 52private:
50 void setAutoStart(); 53 void setAutoStart();
51 void readConfig(); 54 void readConfig();
52 55
53 QListView* m_appletListView; 56 QListView* m_appletListView;
54 QMap<QString,QCheckListItem*> m_applets; 57 QMap<QString,QCheckListItem*> m_applets;
55 58
56 int m_autoStart; 59 int m_autoStart;
57 int m_autoStartTimer; 60 int m_autoStartTimer;
58 int m_iconSize; 61 int m_iconSize;
59 QStringList m_excludeApplets; 62 QStringList m_excludeApplets;
60 bool m_applets_changed; 63 bool m_applets_changed;
61 64
62 QLabel* TextLabel2;
63 QCheckBox* CheckBoxAuto, *CheckBoxHide;
64 QWidget* tab_2; 65 QWidget* tab_2;
65 QWidget* tab_3; 66 QWidget* tab_3;
66 QLabel* TextLabel1, *TextLabel4; 67 QLabel* TextLabel1, *TextLabel4;
67 QSpinBox* SpinBox7; 68 QSpinBox* SpinBox7;
68 QLabel* TimeLabel; 69
69 QSpinBox* SpinBoxTime; 70 TodayConfigMiscBase *m_guiMisc;
70 QSpinBox* SpinRefresh;
71 QSpinBox* SpinBoxIconSize;
72}; 71};
73 72
74#endif 73#endif