summaryrefslogtreecommitdiff
path: root/core/pim/datebook
authordrw <drw>2004-04-02 21:00:39 (UTC)
committer drw <drw>2004-04-02 21:00:39 (UTC)
commit8b67cce78d89fdbb5c2a70f257aaef0e8162d767 (patch) (unidiff)
tree1a897ca501a0ebadcec94af493ff11cb071a2b0a /core/pim/datebook
parentb4d07df7854800fd3613034f54488c6fa27d94ee (diff)
downloadopie-8b67cce78d89fdbb5c2a70f257aaef0e8162d767.zip
opie-8b67cce78d89fdbb5c2a70f257aaef0e8162d767.tar.gz
opie-8b67cce78d89fdbb5c2a70f257aaef0e8162d767.tar.bz2
Use ODebug (another 43 down...)
Diffstat (limited to 'core/pim/datebook') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/config.in2
-rw-r--r--core/pim/datebook/datebook.cpp10
-rw-r--r--core/pim/datebook/datebook.pro12
-rw-r--r--core/pim/datebook/datebookweekheaderimpl.cpp11
-rw-r--r--core/pim/datebook/datebookweeklst.cpp7
-rw-r--r--core/pim/datebook/dateentryimpl.cpp10
-rw-r--r--core/pim/datebook/opie-datebook.control2
7 files changed, 31 insertions, 23 deletions
diff --git a/core/pim/datebook/config.in b/core/pim/datebook/config.in
index d1dd44f..4658f3c 100644
--- a/core/pim/datebook/config.in
+++ b/core/pim/datebook/config.in
@@ -1,4 +1,4 @@
1 config DATEBOOK 1 config DATEBOOK
2 boolean "opie-datebook (a datebook/appointment manager)" 2 boolean "opie-datebook (a datebook/appointment manager)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 3934411..3d1bc0c 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -26,29 +26,31 @@
26#include "datebookday.h" 26#include "datebookday.h"
27#include "datebooksettings.h" 27#include "datebooksettings.h"
28#include "datebookweek.h" 28#include "datebookweek.h"
29#include "datebookweeklst.h" 29#include "datebookweeklst.h"
30#include "dateentryimpl.h" 30#include "dateentryimpl.h"
31 31
32#include <opie2/odebug.h>
33
32#include <qpe/datebookmonth.h> 34#include <qpe/datebookmonth.h>
33#include <qpe/qpeapplication.h> 35#include <qpe/qpeapplication.h>
34#include <qpe/config.h> 36#include <qpe/config.h>
35#include <qpe/finddialog.h> 37#include <qpe/finddialog.h>
36#include <qpe/ir.h> 38#include <qpe/ir.h>
37#include <qpe/qpemessagebox.h> 39#include <qpe/qpemessagebox.h>
38#include <qpe/resource.h> 40#include <qpe/resource.h>
39#include <qpe/sound.h> 41#include <qpe/sound.h>
40#include <qtoolbar.h>
41#include <qpe/tzselect.h> 42#include <qpe/tzselect.h>
42 43
43#include <qaction.h> 44#include <qaction.h>
44#include <qcopchannel_qws.h> 45#include <qcopchannel_qws.h>
45#include <qlayout.h> 46#include <qlayout.h>
46#include <qmessagebox.h> 47#include <qmessagebox.h>
47#include <qtimer.h> 48#include <qtimer.h>
48#include <qtl.h> 49#include <qtl.h>
50#include <qtoolbar.h>
49#include <qwidgetstack.h> 51#include <qwidgetstack.h>
50 52
51#include <sys/stat.h> 53#include <sys/stat.h>
52#include <sys/types.h> 54#include <sys/types.h>
53#include <fcntl.h> 55#include <fcntl.h>
54#include <unistd.h> 56#include <unistd.h>
@@ -67,13 +69,13 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
67 alarmCounter(0) 69 alarmCounter(0)
68{ 70{
69 bool needEvilHack= false; // if we need an Evil Hack 71 bool needEvilHack= false; // if we need an Evil Hack
70 QTime t; 72 QTime t;
71 t.start(); 73 t.start();
72 db = new DateBookDBHack; 74 db = new DateBookDBHack;
73 qDebug("loading db t=%d", t.elapsed() ); 75 Opie::Core::odebug << "loading db t=" << t.elapsed() << oendl;
74 loadSettings(); 76 loadSettings();
75 setCaption( tr("Calendar") ); 77 setCaption( tr("Calendar") );
76 setIcon( Resource::loadPixmap( "datebook_icon" ) ); 78 setIcon( Resource::loadPixmap( "datebook_icon" ) );
77 79
78 setToolBarsMovable( FALSE ); 80 setToolBarsMovable( FALSE );
79 81
@@ -171,13 +173,13 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
171 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); 173 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) );
172 channel = new QCopChannel( "QPE/Datebook", this ); 174 channel = new QCopChannel( "QPE/Datebook", this );
173 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); 175 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) );
174#endif 176#endif
175#endif 177#endif
176 178
177 qDebug("done t=%d", t.elapsed() ); 179 Opie::Core::odebug << "done t=" << t.elapsed() << oendl;
178 180
179 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); 181 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
180 connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); 182 connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
181 /* 183 /*
182 * Here is a problem description: 184 * Here is a problem description:
183 * When Weekview is the default view 185 * When Weekview is the default view
@@ -897,13 +899,13 @@ void DateBook::setDocument( const QString &filename )
897} 899}
898 900
899static const char * beamfile = "/tmp/obex/event.vcs"; 901static const char * beamfile = "/tmp/obex/event.vcs";
900 902
901void DateBook::beamEvent( const Event &e ) 903void DateBook::beamEvent( const Event &e )
902{ 904{
903 qDebug("trying to beamn"); 905 Opie::Core::odebug << "trying to beam" << oendl;
904 unlink( beamfile ); // delete if exists 906 unlink( beamfile ); // delete if exists
905 mkdir("/tmp/obex/", 0755); 907 mkdir("/tmp/obex/", 0755);
906 Event::writeVCalendar( beamfile, e ); 908 Event::writeVCalendar( beamfile, e );
907 Ir *ir = new Ir( this ); 909 Ir *ir = new Ir( this );
908 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 910 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
909 QString description = e.description(); 911 QString description = e.description();
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro
index bf9a2cc..a79c25c 100644
--- a/core/pim/datebook/datebook.pro
+++ b/core/pim/datebook/datebook.pro
@@ -1,41 +1,41 @@
1 CONFIG += qt warn_on quick-app 1 CONFIG += qt warn_on quick-app
2 HEADERS= datebookday.h \ 2 HEADERS= datebookday.h \
3 datebook.h \ 3 datebook.h \
4 dateentryimpl.h \ 4 dateentryimpl.h \
5 datebookdayheaderimpl.h \ 5 datebookdayheaderimpl.h \
6 datebooksettings.h \ 6 datebooksettings.h \
7 datebookweek.h \ 7 datebookweek.h \
8 datebookweeklst.h \ 8 datebookweeklst.h \
9 datebookweekheaderimpl.h \ 9 datebookweekheaderimpl.h \
10 repeatentry.h \ 10 repeatentry.h \
11 noteentryimpl.h \ 11 noteentryimpl.h \
12 onoteedit.h \ 12 onoteedit.h \
13 datebookdayallday.h \ 13 datebookdayallday.h \
14 namespace_hack.h 14 namespace_hack.h
15 SOURCES= main.cpp \ 15 SOURCES= main.cpp \
16 datebookday.cpp \ 16 datebookday.cpp \
17 datebook.cpp \ 17 datebook.cpp \
18 dateentryimpl.cpp \ 18 dateentryimpl.cpp \
19 datebookdayheaderimpl.cpp \ 19 datebookdayheaderimpl.cpp \
20 datebooksettings.cpp \ 20 datebooksettings.cpp \
21 datebookweek.cpp \ 21 datebookweek.cpp \
22 datebookweeklst.cpp \ 22 datebookweeklst.cpp \
23 datebookweekheaderimpl.cpp \ 23 datebookweekheaderimpl.cpp \
24 repeatentry.cpp \ 24 repeatentry.cpp \
25 noteentryimpl.cpp \ 25 noteentryimpl.cpp \
26 onoteedit.cpp \ 26 onoteedit.cpp \
27 datebookdayallday.cpp 27 datebookdayallday.cpp
28 INTERFACES= dateentry.ui \ 28 INTERFACES= dateentry.ui \
29 datebookdayheader.ui \ 29 datebookdayheader.ui \
30 datebookweekheader.ui \ 30 datebookweekheader.ui \
31 datebookweeklstheader.ui \ 31 datebookweeklstheader.ui \
32 datebookweeklstdayhdr.ui \ 32 datebookweeklstdayhdr.ui \
33 repeatentrybase.ui \ 33 repeatentrybase.ui \
34 datebooksettingsbase.ui \ 34 datebooksettingsbase.ui \
35 noteentry.ui 35 noteentry.ui
36INCLUDEPATH += $(OPIEDIR)/include 36INCLUDEPATH += $(OPIEDIR)/include
37 DEPENDPATH+= $(OPIEDIR)/include 37 DEPENDPATH+= $(OPIEDIR)/include
38LIBS += -lqpe -lopieui2 -lopiecore2 38LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2
39 TARGET = datebook 39 TARGET = datebook
40 40
41include ( $(OPIEDIR)/include.pro ) 41include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp
index c237b2d..123a478 100644
--- a/core/pim/datebook/datebookweekheaderimpl.cpp
+++ b/core/pim/datebook/datebookweekheaderimpl.cpp
@@ -16,12 +16,15 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "datebookweekheaderimpl.h" 20#include "datebookweekheaderimpl.h"
21#include "datebookweek.h" 21#include "datebookweek.h"
22
23#include <opie2/odebug.h>
24
22#include <qpe/resource.h> 25#include <qpe/resource.h>
23#include <qpe/datebookmonth.h> 26#include <qpe/datebookmonth.h>
24 27
25#include <qtoolbutton.h> 28#include <qtoolbutton.h>
26 29
27/* 30/*
@@ -63,28 +66,28 @@ void DateBookWeekHeader::pickDate()
63 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); 66 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
64 picker->setFocus(); 67 picker->setFocus();
65} 68}
66 69
67void DateBookWeekHeader::nextMonth() 70void DateBookWeekHeader::nextMonth()
68{ 71{
69 qWarning("nextMonth() " ); 72 Opie::Core::owarn << "nextMonth()" << oendl;
70 setDate(date.addDays(28)); 73 setDate(date.addDays(28));
71} 74}
72void DateBookWeekHeader::prevMonth() 75void DateBookWeekHeader::prevMonth()
73{ 76{
74 qWarning("prevMonth() " ); 77 Opie::Core::owarn << "prevMonth()" << oendl;
75 setDate(date.addDays(-28)); 78 setDate(date.addDays(-28));
76} 79}
77void DateBookWeekHeader::nextWeek() 80void DateBookWeekHeader::nextWeek()
78{ 81{
79 qWarning("nextWeek() " ); 82 Opie::Core::owarn << "nextWeek()" << oendl;
80 setDate(date.addDays(7)); 83 setDate(date.addDays(7));
81} 84}
82void DateBookWeekHeader::prevWeek() 85void DateBookWeekHeader::prevWeek()
83{ 86{
84 qWarning("prevWeek() "); 87 Opie::Core::owarn << "prevWeek()" << oendl;
85 setDate(date.addDays(-7)); 88 setDate(date.addDays(-7));
86} 89}
87 90
88void DateBookWeekHeader::setDate( int y, int m, int d ) 91void DateBookWeekHeader::setDate( int y, int m, int d )
89{ 92{
90 setDate(QDate(y,m,d)); 93 setDate(QDate(y,m,d));
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index abaf3ea..de74d46 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -1,12 +1,13 @@
1#include "namespace_hack.h" 1#include "namespace_hack.h"
2#include "datebookweeklst.h" 2#include "datebookweeklst.h"
3 3
4
5#include "datebook.h" 4#include "datebook.h"
6 5
6#include <opie2/odebug.h>
7
7#include <qpe/datebookmonth.h> 8#include <qpe/datebookmonth.h>
8#include <qpe/config.h> 9#include <qpe/config.h>
9#include <qpe/resource.h> 10#include <qpe/resource.h>
10 11
11#include <qlayout.h> 12#include <qlayout.h>
12#include <qtoolbutton.h> 13#include <qtoolbutton.h>
@@ -156,13 +157,13 @@ DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
156 const char* name, 157 const char* name,
157 WFlags fl ) : OClickableLabel(parent,name,fl), event(ev) 158 WFlags fl ) : OClickableLabel(parent,name,fl), event(ev)
158{ 159{
159 // old values... lastday = "__|__", middle=" |---", Firstday="00:00", 160 // old values... lastday = "__|__", middle=" |---", Firstday="00:00",
160 QString s,start,middle,end,day; 161 QString s,start,middle,end,day;
161 162
162 qDebug("weeklistviewconfig=%d",weeklistviewconfig); 163 Opie::Core::odebug << "weeklistviewconfig=" << weeklistviewconfig << oendl;
163 if(weeklistviewconfig==NONE) {// No times displayed. 164 if(weeklistviewconfig==NONE) {// No times displayed.
164 // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); 165 // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute());
165 // middle.sprintf("<--->"); 166 // middle.sprintf("<--->");
166 // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); 167 // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute());
167 // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute()); 168 // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute());
168 } else if(weeklistviewconfig==NORMAL) {// "Normal", only display start time. 169 } else if(weeklistviewconfig==NORMAL) {// "Normal", only display start time.
@@ -205,13 +206,13 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
205 const char* name, WFlags fl) 206 const char* name, WFlags fl)
206 : QWidget( parent, name, fl ) 207 : QWidget( parent, name, fl )
207{ 208{
208 Config config("DateBook"); 209 Config config("DateBook");
209 config.setGroup("Main"); 210 config.setGroup("Main");
210 int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL); 211 int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL);
211 qDebug("Read weeklistviewconfig: %d",weeklistviewconfig); 212 Opie::Core::odebug << "weeklistviewconfig: " << weeklistviewconfig << oendl;
212 213
213 bStartOnMonday=onM; 214 bStartOnMonday=onM;
214 setPalette(white); 215 setPalette(white);
215 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); 216 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
216 217
217 QVBoxLayout *layout = new QVBoxLayout( this ); 218 QVBoxLayout *layout = new QVBoxLayout( this );
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index 7b4716f..42bdbe2 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -19,21 +19,23 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "namespace_hack.h" 21#include "namespace_hack.h"
22#include "dateentryimpl.h" 22#include "dateentryimpl.h"
23#include "repeatentry.h" 23#include "repeatentry.h"
24 24
25#include <opie2/odebug.h>
26#include <opie2/otimepicker.h>
27
25#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
26#include <qpe/categoryselect.h> 29#include <qpe/categoryselect.h>
27#include <qpe/datebookmonth.h> 30#include <qpe/datebookmonth.h>
28#include <qpe/tzselect.h> 31#include <qpe/tzselect.h>
29 32
30#include <qlineedit.h> 33#include <qlineedit.h>
31#include <qspinbox.h> 34#include <qspinbox.h>
32 35
33#include <opie2/otimepicker.h>
34#include "onoteedit.h" 36#include "onoteedit.h"
35 37
36#include <stdlib.h> 38#include <stdlib.h>
37#include <stdio.h> 39#include <stdio.h>
38 40
39/* 41/*
@@ -426,31 +428,31 @@ Event DateEntry::event()
426 428
427 // adjust start and end times based on timezone 429 // adjust start and end times based on timezone
428 QDateTime start( startDate, startTime ); 430 QDateTime start( startDate, startTime );
429 QDateTime end( endDate, endTime ); 431 QDateTime end( endDate, endTime );
430 time_t start_utc, end_utc; 432 time_t start_utc, end_utc;
431 433
432// qDebug( "tz: %s", timezone->currentZone().latin1() ); 434 //Opie::Core::odebug << "tz: " << timezone->currentZone() << oendl;
433 435
434 // get real timezone 436 // get real timezone
435 QString realTZ; 437 QString realTZ;
436 realTZ = QString::fromLocal8Bit( getenv("TZ") ); 438 realTZ = QString::fromLocal8Bit( getenv("TZ") );
437 439
438 // set timezone 440 // set timezone
439 if ( setenv( "TZ", timezone->currentZone(), true ) != 0 ) 441 if ( setenv( "TZ", timezone->currentZone(), true ) != 0 )
440 qWarning( "There was a problem setting the timezone." ); 442 Opie::Core::owarn << "There was a problem setting the timezone." << oendl;
441 443
442 // convert to UTC based on selected TZ (calling tzset internally) 444 // convert to UTC based on selected TZ (calling tzset internally)
443 start_utc = TimeConversion::toUTC( start ); 445 start_utc = TimeConversion::toUTC( start );
444 end_utc = TimeConversion::toUTC( end ); 446 end_utc = TimeConversion::toUTC( end );
445 447
446 // done playing around... put it all back 448 // done playing around... put it all back
447 unsetenv( "TZ" ); 449 unsetenv( "TZ" );
448 if ( !realTZ.isNull() ) 450 if ( !realTZ.isNull() )
449 if ( setenv( "TZ", realTZ, true ) != 0 ) 451 if ( setenv( "TZ", realTZ, true ) != 0 )
450 qWarning( "There was a problem setting the timezone." ); 452 Opie::Core::owarn << "There was a problem setting the timezone." << oendl;
451 453
452 // convert UTC to local time (calling tzset internally) 454 // convert UTC to local time (calling tzset internally)
453 ev.setStart( TimeConversion::fromUTC( start_utc ) ); 455 ev.setStart( TimeConversion::fromUTC( start_utc ) );
454 ev.setEnd( TimeConversion::fromUTC( end_utc ) ); 456 ev.setEnd( TimeConversion::fromUTC( end_utc ) );
455 457
456 // we only have one type of sound at the moment... LOUD!!! 458 // we only have one type of sound at the moment... LOUD!!!
diff --git a/core/pim/datebook/opie-datebook.control b/core/pim/datebook/opie-datebook.control
index 730b09d..acf28a7 100644
--- a/core/pim/datebook/opie-datebook.control
+++ b/core/pim/datebook/opie-datebook.control
@@ -2,10 +2,10 @@ Package: opie-datebook
2Files: plugins/application/libdatebook.so* bin/datebook apps/1Pim/datebook.desktop 2Files: plugins/application/libdatebook.so* bin/datebook apps/1Pim/datebook.desktop
3Priority: optional 3Priority: optional
4Section: opie/pim 4Section: opie/pim
5Conflicts: qpe-tkccalendar 5Conflicts: qpe-tkccalendar
6Maintainer: Holger 'Zecke' Freyther <zecke@handhelds.org> 6Maintainer: Holger 'Zecke' Freyther <zecke@handhelds.org>
7Architecture: arm 7Architecture: arm
8Depends: task-opie-minimal, libopiecore2, libopieui2,libopiepim2, opie-pics 8Depends: task-opie-minimal, libopiecore2, libopieui2, libopiepim2, opie-pics
9Description: A datebook/appointment manager 9Description: A datebook/appointment manager
10 A datebook/appointment manager for the Opie environment. 10 A datebook/appointment manager for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION 11Version: $QPE_VERSION$EXTRAVERSION