summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-05 11:20:37 (UTC)
committer harlekin <harlekin>2003-12-05 11:20:37 (UTC)
commit2b37759fc317b5efd9b371210b16117f7d346455 (patch) (side-by-side diff)
treef99beb5ff1c886f9b41a2d3a34300f8f121cf738
parent1ef5137234e2b7cd0be2a220a86d848503196269 (diff)
downloadopie-2b37759fc317b5efd9b371210b16117f7d346455.zip
opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.gz
opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.bz2
today in HEAD up to date
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
@@ -3 +3,3 @@ Makefile*
moc_*
+todayconfigmiscbase.cpp
+todayconfigmiscbase.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 +1,7 @@
+0.7
+
+* now all plugins in a big scrollview
+* config dialogs guis are ui files now
+* plugin interface has one new virtual method - reinitialize ( used when coming back from config dialog )
+
0.6.2
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
@@ -21,16 +21,4 @@
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-QPEApplication *todayApp;
-
-int main( int argc, char ** argv )
-{
- QPEApplication a(argc, argv);
- todayApp=&a;
-
- Today t;
-
- t.setCaption( Today::tr("Today") );
- a.showMainWidget(&t);
-
- return a.exec();
-}
+OPIE_EXPORT_APP( OApplicationFactory<Today> )
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 @@
-#include "today.h"
-#include <qwidget.h>
-#include <qcombobox.h>
-#include <oappplugin.h>
-
-#define Q_BASEINSTANCE( i ) \
- QUnknownInterface* iface = 0; \
- i->queryInterface( IID_QUnknown, &iface ); \
- return iface
-
-Q_EXPORT_INTERFACE()
-{
- Today *t = new Today;
- t->setCaption( Today::tr("Today") );
- OAppPlugin *comp = new OAppPlugin(t);
- Q_BASEINSTANCE( comp );
-}
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 @@
Makefile*
+datebookpluginconfigbase*
moc*
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,3 +1,3 @@
config TODAY_DATEBOOK
- boolean "opie-today-datebookplugin (datebook plugin)"
+ boolean "datebook"
default "y"
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
@@ -20,2 +20,21 @@ TARGET = todaydatebookplugin
+TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
+ ../../../../../i18n/nl/libtodaydatebookplugin.ts \
+ ../../../../../i18n/xx/libtodaydatebookplugin.ts \
+ ../../../../../i18n/en/libtodaydatebookplugin.ts \
+ ../../../../../i18n/es/libtodaydatebookplugin.ts \
+ ../../../../../i18n/fr/libtodaydatebookplugin.ts \
+ ../../../../../i18n/hu/libtodaydatebookplugin.ts \
+ ../../../../../i18n/ja/libtodaydatebookplugin.ts \
+ ../../../../../i18n/ko/libtodaydatebookplugin.ts \
+ ../../../../../i18n/no/libtodaydatebookplugin.ts \
+ ../../../../../i18n/pl/libtodaydatebookplugin.ts \
+ ../../../../../i18n/pt/libtodaydatebookplugin.ts \
+ ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
+ ../../../../../i18n/sl/libtodaydatebookplugin.ts \
+ ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
+ ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
+ ../../../../../i18n/it/libtodaydatebookplugin.ts \
+ ../../../../../i18n/da/libtodaydatebookplugin.ts
+
include ( $(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
@@ -3,3 +3,3 @@
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003 by Maximilian Reiß
* email : harlekin@handhelds.org
@@ -21,2 +21,3 @@
#include <qpe/qpeapplication.h>
+#include <qpe/calendar.h>
@@ -30,2 +31,3 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
bool show_notes,
+ bool timeExtraLine,
int maxCharClip,
@@ -54,13 +56,21 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
+ QString timeSpacer = " ";
+ if ( timeExtraLine ) {
+ timeSpacer = "<br>";
+ }
+
if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
&& ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
- msg += "<br>All day";
+ msg += tr ( "All day" );
} else {
// start time of event
- QDate tempDate = (ev).event().start().date();
- msg += "<br>"
- + ampmTime( QTime( (ev).event().start().time() ) )
+// QDate tempDate = (ev).event().start().date();
+ msg += timeSpacer;
+ msg += ampmTime( QTime( (ev).event().start().time() ) )
// end time of event
- + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) )
- + differDate( tempDate );
+ + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) );
+ }
+
+ if ( (ev).date() != QDate::currentDate() ) {
+ msg += differDate( (ev).date() /* tempDate*/ );
}
@@ -103,14 +113,14 @@ QString DateBookEvent::ampmTime( QTime tm ) {
QString DateBookEvent::differDate( QDate date ) {
- QDate currentDate = QDate::currentDate();
+// QDate currentDate = QDate::currentDate();
QString returnText = "<font color = #407DD9><b> ";
- int differDate = currentDate.daysTo( date );
- if ( currentDate.dayOfWeek() == date.dayOfWeek() ) {
- returnText += "" ;
- // not working right for recurring events
- //} else if ( differDate == 1 ) {
- //returnText += tr( "tomorrow" );
- } else {
- //returnText += tr( "in %1 days" ).arg( differDate );
- returnText += " [ " + date.dayName( date.dayOfWeek() ) + " ] ";
- }
+// int differDate = currentDate.daysTo( date );
+// if ( currentDate.dayOfWeek() == date.dayOfWeek() ) {
+// returnText += "" ;
+// // not working right for recurring events
+// //} else if ( differDate == 1 ) {
+// //returnText += tr( "tomorrow" );
+// } else {
+// returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
+// }
+ returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
returnText += "</b></font>";
@@ -128,3 +138,3 @@ void DateBookEvent::editEventSlot( const Event &e ) {
} else {
- QCopEnvelope env( "QPE/Datebook", "editEvent(int)" );
+ QCopEnvelope env( "QPE/Application/datebook", "editEvent(int)" );
env << e.uid();
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
@@ -3,3 +3,3 @@
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003 by Maximilian Reiß
* email : harlekin@handhelds.org
@@ -32,2 +32,3 @@ public:
bool show_notes = 0,
+ bool timeExtraLine = 0,
int maxCharClip = 0,
@@ -36,2 +37,3 @@ public:
~DateBookEvent();
+
signals:
@@ -42,2 +44,3 @@ private slots:
void editMe();
+
private:
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
@@ -71 +71,8 @@ void DatebookPlugin::refresh() {
}
+
+void DatebookPlugin::reinitialize() {
+ if ( m_widget ) {
+ m_widget->reinitialize();
+ }
+}
+
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
@@ -41,2 +41,3 @@ public:
void refresh();
+ void reinitialize();
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
@@ -32,7 +32,2 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
- if ( db ) {
- delete db;
- }
- db = new DateBookDB;
-
if ( m_layoutDates ) {
@@ -47,3 +42,2 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
getDates();
- m_layoutDates->addStretch(5);
}
@@ -64,2 +58,8 @@ void DatebookPluginWidget::readConfig() {
m_moreDays = cfg.readNumEntry( "moredays", 0 );
+ m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
+}
+
+void DatebookPluginWidget::reinitialize() {
+ readConfig();
+ refresh();
}
@@ -76,3 +76,2 @@ void DatebookPluginWidget::refresh() {
getDates();
- m_layoutDates->addStretch(5);
}
@@ -84,2 +83,8 @@ void DatebookPluginWidget::getDates() {
+
+ if ( db ) {
+ delete db;
+ }
+ db = new DateBookDB;
+
QDate date = QDate::currentDate();
@@ -96,10 +101,3 @@ void DatebookPluginWidget::getDates() {
count++;
- DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
- m_eventsList.append( l );
- l->show();
- QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
- } else if ( QDateTime::currentDateTime() <= (*it).event().end() || (*it).event().start().date() != date ) {
- count++;
- // show only later appointments
- DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
+ DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
@@ -107,3 +105,23 @@ void DatebookPluginWidget::getDates() {
QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
- }
+ } else {
+ if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
+ // Show events which span over many days and are not elapsed.
+ || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
+ // Show repeated event for today that is not elapsed.
+ || ( ( (*it).event().repeatType() != Event::NoRepeat )
+ && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
+ && ( QTime::currentTime() < (*it).event().start().time() ) ) )
+ // Show repeated event for next days.
+ || ( ( (*it).event().repeatType() != Event::NoRepeat )
+ && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
+ )
+ {
+ count++;
+ // show only later appointments
+ DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
+ m_eventsList.append( l );
+ l->show();
+ QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
+ }
+ }
}
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
@@ -36,2 +36,3 @@ public:
void refresh();
+ void reinitialize();
@@ -54,3 +55,4 @@ private:
int m_moreDays;
-
+ // true if time of an appointment should be an extra line
+ bool m_timeExtraLine;
};
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,3 +1,3 @@
config TODAY_MAIL
- boolean "opie-today-mailplugin (mail plugin)"
+ boolean "mail"
default "y"
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
@@ -2,3 +2,3 @@ TEMPLATE = lib
CONFIG -= moc
-CONFIG += qt plugin release
+CONFIG += qt release
@@ -18,2 +18,20 @@ TARGET = todaymailplugin
+TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
+ ../../../../../i18n/nl/libtodaymailplugin.ts \
+ ../../../../../i18n/xx/libtodaymailplugin.ts \
+ ../../../../../i18n/en/libtodaymailplugin.ts \
+ ../../../../../i18n/es/libtodaymailplugin.ts \
+ ../../../../../i18n/fr/libtodaymailplugin.ts \
+ ../../../../../i18n/hu/libtodaymailplugin.ts \
+ ../../../../../i18n/ja/libtodaymailplugin.ts \
+ ../../../../../i18n/ko/libtodaymailplugin.ts \
+ ../../../../../i18n/no/libtodaymailplugin.ts \
+ ../../../../../i18n/pl/libtodaymailplugin.ts \
+ ../../../../../i18n/pt/libtodaymailplugin.ts \
+ ../../../../../i18n/pt_BR/libtodaymailplugin.ts \
+ ../../../../../i18n/sl/libtodaymailplugin.ts \
+ ../../../../../i18n/zh_CN/libtodaymailplugin.ts \
+ ../../../../../i18n/zh_TW/libtodaymailplugin.ts \
+ ../../../../../i18n/it/libtodaymailplugin.ts \
+ ../../../../../i18n/da/libtodaymailplugin.ts
include ( $(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
@@ -69 +69,4 @@ void MailPlugin::refresh() {
}
+
+void MailPlugin::reinitialize() {
+}
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
@@ -43,2 +43,3 @@ public:
void refresh();
+ void reinitialize();
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
@@ -31,3 +31,3 @@ MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
m_mailLabel = new OClickableLabel( this );
- m_mailLabel->setMaximumHeight( 15 );
+ //m_mailLabel->setMaximumHeight( 15 );
connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
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 @@
-Package: opie-today-mailplugin
-Files: plugins/today/libtodaymailplugin.so*
-Priority: optional
-Section: opie/applications
-Maintainer: Maximilian Reiss <harlekin@handhelds.org>
-Architecture: arm
-Version: $QPE_VERSION-$SUB_VERSION
-Depends: libqte2, opie-today
-Description: 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 @@
Makefile*
+todopluginconfigbase*
moc*
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,3 +1,3 @@
config TODAY_TODOLIST
- boolean "opie-today-todolistplugin (shows the next todo entries)"
+ boolean "todolist"
default "y"
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
@@ -21,2 +21,21 @@ TARGET = todaytodolistplugin
+TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \
+ ../../../../../i18n/nl/libtodaytodolistplugin.ts \
+ ../../../../../i18n/xx/libtodaytodolistplugin.ts \
+ ../../../../../i18n/en/libtodaytodolistplugin.ts \
+ ../../../../../i18n/es/libtodaytodolistplugin.ts \
+ ../../../../../i18n/fr/libtodaytodolistplugin.ts \
+ ../../../../../i18n/hu/libtodaytodolistplugin.ts \
+ ../../../../../i18n/ja/libtodaytodolistplugin.ts \
+ ../../../../../i18n/ko/libtodaytodolistplugin.ts \
+ ../../../../../i18n/no/libtodaytodolistplugin.ts \
+ ../../../../../i18n/pl/libtodaytodolistplugin.ts \
+ ../../../../../i18n/pt/libtodaytodolistplugin.ts \
+ ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \
+ ../../../../../i18n/sl/libtodaytodolistplugin.ts \
+ ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \
+ ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \
+ ../../../../../i18n/it/libtodaytodolistplugin.ts \
+ ../../../../../i18n/da/libtodaytodolistplugin.ts
+
include ( $(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
@@ -3,3 +3,3 @@
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002,2003 by Maximilian Reiß
* email : harlekin@handhelds.org
@@ -70 +70,7 @@ void TodolistPlugin::refresh() {
}
+
+void TodolistPlugin::reinitialize() {
+ if ( m_widget ) {
+ m_widget->reinitialize();
+ }
+}
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
@@ -43,2 +43,3 @@ public:
void refresh();
+ void reinitialize();
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
@@ -65,3 +65,10 @@ void TodolistPluginWidget::readConfig() {
-void TodolistPluginWidget:: refresh() {
+void TodolistPluginWidget:: refresh() {
+ todo->reload();
+ getTodo();
+}
+
+void TodolistPluginWidget::reinitialize() {
+ readConfig();
+ todo->reload();
getTodo();
@@ -81,3 +88,3 @@ void TodolistPluginWidget::getTodo() {
// get overdue todos first
- m_list = todo->overDue();
+ m_list = todo->sorted( true, 3, 2, 1);
@@ -89,3 +96,3 @@ void TodolistPluginWidget::getTodo() {
}
- tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
+ tmpout += "<font color=#e00000><b>[" + QString("%1").arg((*m_it).priority() ) + "]" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
ammount++ ;
@@ -106,3 +113,3 @@ void TodolistPluginWidget::getTodo() {
}
- tmpout += "<b>-</b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
+ tmpout += "<b> [" + QString("%1").arg((*m_it).priority() ) + "] </b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
ammount++;
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
@@ -34,2 +34,3 @@ public:
void refresh();
+ void reinitialize();
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
@@ -194,8 +194,3 @@ void Today::loadPlugins() {
QString path = QPEApplication::qpeDir() + "/plugins/today";
- qWarning("Searching for Plugins in: %s", path.latin1());
-#ifdef Q_OS_MACX
- QDir dir( path, "lib*.dylib" );
-#else
QDir dir( path, "lib*.so" );
-#endif
@@ -222,18 +217,14 @@ void Today::loadPlugins() {
- // grr, sharp rom does not know Global::languageList();
- // QStringList langs = Global::languageList();
- QString tfn = QPEApplication::qpeDir() + "/i18n/";
- QDir langDir = tfn;
- QStringList langs = langDir.entryList("*", QDir::Dirs );
-
- for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) {
- QString lang = *lit;
- qDebug( "Languages: " + lang );
- QTranslator * trans = new QTranslator( qApp );
- QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
- if ( trans->load( tfn ) ) {
- qApp->installTranslator( trans );
- } else {
- delete trans;
- }
+ QString lang;
+ Config config("locale");
+ config.setGroup("Language");
+ lang = config.readEntry( "Language", "en" );
+
+ qDebug( "Languages: " + lang );
+ QTranslator * trans = new QTranslator( qApp );
+ QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
+ if ( trans->load( tfn ) ) {
+ qApp->installTranslator( trans );
+ } else {
+ delete trans;
}
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
@@ -3,3 +3,5 @@ CONFIG += qt warn on release quick-app
HEADERS = today.h todaybase.h todayconfig.h
-SOURCES = today.cpp todaybase.cpp todayconfig.cpp
+SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp
+INTERFACES = todayconfigmiscbase.ui
+
INCLUDEPATH += $(OPIEDIR)/include
@@ -7,3 +9,3 @@ DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
-INTERFACES =
+
TARGET = today
@@ -11 +13,2 @@ TARGET = today
include ( $(OPIEDIR)/include.pro )
+}
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
@@ -3,3 +3,3 @@
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003 by Maximilian Reiß
* email : harlekin@handhelds.org
@@ -78,50 +78,9 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
+ // Misc tab
tab_3 = new QWidget( TabWidget3, "tab_3" );
QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
- tab3Layout->setMargin( 20 );
- QHBox *hbox_auto = new QHBox( tab_3 );
- TextLabel2 = new QLabel( hbox_auto, "AutoStart" );
- TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) );
- QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
- CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
- QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
-
- QHBox *hbox_hide = new QHBox( tab_3 );
- TextLabel4 = new QLabel( hbox_hide, "HideBanner" );
- TextLabel4->setText( tr( "Tiny Banner" ) );
- //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
- CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" );
- // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
-
- QHBox *hbox_inactive = new QHBox( tab_3 );
- TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
- TimeLabel->setText( tr( "minutes inactive" ) );
- QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
- SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
- SpinBoxTime->setMaxValue ( 1440 );
- QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
- QHBox *hbox_iconSize = new QHBox( tab_3 );
- QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
- iconSizeLabel->setText( tr( "Icon size" ) );
- QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) );
- SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" );
- SpinBoxIconSize->setMaxValue( 32 );
- QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) );
-
- QHBox *hbox_refresh = new QHBox( tab_3 );
- QLabel *refreshLabel = new QLabel( hbox_refresh );
- refreshLabel->setText( tr( "Refresh" ) );
- QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
- SpinRefresh = new QSpinBox( hbox_refresh );
- SpinRefresh->setMinValue( 0 );
- SpinRefresh->setSuffix( tr( " sec" ) );
- SpinRefresh->setMaxValue ( 7200 );
- SpinRefresh->setSpecialValueText ( tr("never") );
- QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
-
- tab3Layout->addWidget( hbox_auto );
- tab3Layout->addWidget( hbox_hide );
- tab3Layout->addWidget( hbox_inactive );
- tab3Layout->addWidget( hbox_iconSize );
- tab3Layout->addWidget( hbox_refresh );
+
+ m_guiMisc = new TodayConfigMiscBase( tab_3 );
+
+ tab3Layout->addWidget( m_guiMisc );
TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
@@ -163,5 +122,5 @@ void TodayConfig::readConfig() {
m_autoStart = cfg.readNumEntry( "autostart", 1 );
- CheckBoxAuto->setChecked( m_autoStart );
+ m_guiMisc->CheckBoxAuto->setChecked( m_autoStart );
m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 );
- SpinBoxTime->setValue( m_autoStartTimer );
+ m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer );
@@ -169,5 +128,5 @@ void TodayConfig::readConfig() {
m_iconSize = cfg.readNumEntry( "IconSize", 18 );
- SpinBoxIconSize->setValue( m_iconSize );
- SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
- CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
+ m_guiMisc->SpinBoxIconSize->setValue( m_iconSize );
+ m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
+ m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
@@ -211,7 +170,7 @@ void TodayConfig::writeConfig() {
cfg.setGroup( "Autostart" );
- m_autoStart = CheckBoxAuto->isChecked();
+ m_autoStart = m_guiMisc->CheckBoxAuto->isChecked();
cfg.writeEntry( "autostart", m_autoStart );
- m_autoStartTimer = SpinBoxTime->value();
+ m_autoStartTimer = m_guiMisc->SpinBoxTime->value();
cfg.writeEntry( "autostartdelay", m_autoStartTimer );
- m_iconSize = SpinBoxIconSize->value();
+ m_iconSize = m_guiMisc->SpinBoxIconSize->value();
@@ -219,4 +178,4 @@ void TodayConfig::writeConfig() {
cfg.writeEntry( "IconSize", m_iconSize );
- cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() );
- cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 );
+ cfg.writeEntry( "HideBanner", m_guiMisc->CheckBoxHide->isChecked() );
+ cfg.writeEntry( "checkinterval", m_guiMisc->SpinRefresh->value()*1000 );
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
@@ -3,3 +3,3 @@
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002,2003 by Maximilian Reiß
* email : harlekin@handhelds.org
@@ -24,2 +24,5 @@
+
+#include "todayconfigmiscbase.h"
+
class QCheckBox;
@@ -61,4 +64,2 @@ private:
- QLabel* TextLabel2;
- QCheckBox* CheckBoxAuto, *CheckBoxHide;
QWidget* tab_2;
@@ -67,6 +68,4 @@ private:
QSpinBox* SpinBox7;
- QLabel* TimeLabel;
- QSpinBox* SpinBoxTime;
- QSpinBox* SpinRefresh;
- QSpinBox* SpinBoxIconSize;
+
+ TodayConfigMiscBase *m_guiMisc;
};