summaryrefslogtreecommitdiff
path: root/core/pim
Unidiff
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp6
-rw-r--r--core/pim/datebook/datebookweekheaderimpl.cpp8
-rw-r--r--core/pim/datebook/datebookweeklst.cpp4
-rw-r--r--core/pim/datebook/dateentryimpl.cpp6
4 files changed, 12 insertions, 12 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 3d1bc0c..0a47bb8 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -67,17 +67,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
67 syncing(FALSE), 67 syncing(FALSE),
68 inSearch(FALSE), 68 inSearch(FALSE),
69 alarmCounter(0) 69 alarmCounter(0)
70{ 70{
71 bool needEvilHack= false; // if we need an Evil Hack 71 bool needEvilHack= false; // if we need an Evil Hack
72 QTime t; 72 QTime t;
73 t.start(); 73 t.start();
74 db = new DateBookDBHack; 74 db = new DateBookDBHack;
75 Opie::Core::odebug << "loading db t=" << t.elapsed() << oendl; 75 odebug << "loading db t=" << t.elapsed() << oendl;
76 loadSettings(); 76 loadSettings();
77 setCaption( tr("Calendar") ); 77 setCaption( tr("Calendar") );
78 setIcon( Resource::loadPixmap( "datebook_icon" ) ); 78 setIcon( Resource::loadPixmap( "datebook_icon" ) );
79 79
80 setToolBarsMovable( FALSE ); 80 setToolBarsMovable( FALSE );
81 81
82 views = new QWidgetStack( this ); 82 views = new QWidgetStack( this );
83 setCentralWidget( views ); 83 setCentralWidget( views );
@@ -171,17 +171,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
171#if !defined(QT_NO_COP) 171#if !defined(QT_NO_COP)
172 QCopChannel *channel = new QCopChannel( "QPE/System", this ); 172 QCopChannel *channel = new QCopChannel( "QPE/System", this );
173 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&)) );
174 channel = new QCopChannel( "QPE/Datebook", this ); 174 channel = new QCopChannel( "QPE/Datebook", this );
175 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&)) );
176#endif 176#endif
177#endif 177#endif
178 178
179 Opie::Core::odebug << "done t=" << t.elapsed() << oendl; 179 odebug << "done t=" << t.elapsed() << oendl;
180 180
181 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); 181 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
182 connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); 182 connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
183 /* 183 /*
184 * Here is a problem description: 184 * Here is a problem description:
185 * When Weekview is the default view 185 * When Weekview is the default view
186 * a DateBookWeekView get's created 186 * a DateBookWeekView get's created
187 * redraw() get's called. So what? 187 * redraw() get's called. So what?
@@ -897,17 +897,17 @@ void DateBook::setDocument( const QString &filename )
897 db->addEvent( *it ); 897 db->addEvent( *it );
898 } 898 }
899} 899}
900 900
901static const char * beamfile = "/tmp/obex/event.vcs"; 901static const char * beamfile = "/tmp/obex/event.vcs";
902 902
903void DateBook::beamEvent( const Event &e ) 903void DateBook::beamEvent( const Event &e )
904{ 904{
905 Opie::Core::odebug << "trying to beam" << oendl; 905 odebug << "trying to beam" << oendl;
906 unlink( beamfile ); // delete if exists 906 unlink( beamfile ); // delete if exists
907 mkdir("/tmp/obex/", 0755); 907 mkdir("/tmp/obex/", 0755);
908 Event::writeVCalendar( beamfile, e ); 908 Event::writeVCalendar( beamfile, e );
909 Ir *ir = new Ir( this ); 909 Ir *ir = new Ir( this );
910 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 910 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
911 QString description = e.description(); 911 QString description = e.description();
912 ir->send( beamfile, description, "text/x-vCalendar" ); 912 ir->send( beamfile, description, "text/x-vCalendar" );
913} 913}
diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp
index 123a478..7462de7 100644
--- a/core/pim/datebook/datebookweekheaderimpl.cpp
+++ b/core/pim/datebook/datebookweekheaderimpl.cpp
@@ -64,32 +64,32 @@ void DateBookWeekHeader::pickDate()
64 } 64 }
65 picker->setDate( date.year(), date.month(), date.day() ); 65 picker->setDate( date.year(), date.month(), date.day() );
66 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); 66 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
67 picker->setFocus(); 67 picker->setFocus();
68} 68}
69 69
70void DateBookWeekHeader::nextMonth() 70void DateBookWeekHeader::nextMonth()
71{ 71{
72 Opie::Core::owarn << "nextMonth()" << oendl; 72 owarn << "nextMonth()" << oendl;
73 setDate(date.addDays(28)); 73 setDate(date.addDays(28));
74} 74}
75void DateBookWeekHeader::prevMonth() 75void DateBookWeekHeader::prevMonth()
76{ 76{
77 Opie::Core::owarn << "prevMonth()" << oendl; 77 owarn << "prevMonth()" << oendl;
78 setDate(date.addDays(-28)); 78 setDate(date.addDays(-28));
79} 79}
80void DateBookWeekHeader::nextWeek() 80void DateBookWeekHeader::nextWeek()
81{ 81{
82 Opie::Core::owarn << "nextWeek()" << oendl; 82 owarn << "nextWeek()" << oendl;
83 setDate(date.addDays(7)); 83 setDate(date.addDays(7));
84} 84}
85void DateBookWeekHeader::prevWeek() 85void DateBookWeekHeader::prevWeek()
86{ 86{
87 Opie::Core::owarn << "prevWeek()" << oendl; 87 owarn << "prevWeek()" << oendl;
88 setDate(date.addDays(-7)); 88 setDate(date.addDays(-7));
89} 89}
90 90
91void DateBookWeekHeader::setDate( int y, int m, int d ) 91void DateBookWeekHeader::setDate( int y, int m, int d )
92{ 92{
93 setDate(QDate(y,m,d)); 93 setDate(QDate(y,m,d));
94} 94}
95 95
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index de74d46..fe2ab51 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -155,17 +155,17 @@ DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
155 int weeklistviewconfig, 155 int weeklistviewconfig,
156 QWidget* parent, 156 QWidget* parent,
157 const char* name, 157 const char* name,
158 WFlags fl ) : OClickableLabel(parent,name,fl), event(ev) 158 WFlags fl ) : OClickableLabel(parent,name,fl), event(ev)
159{ 159{
160 // old values... lastday = "__|__", middle=" |---", Firstday="00:00", 160 // old values... lastday = "__|__", middle=" |---", Firstday="00:00",
161 QString s,start,middle,end,day; 161 QString s,start,middle,end,day;
162 162
163 Opie::Core::odebug << "weeklistviewconfig=" << weeklistviewconfig << oendl; 163 odebug << "weeklistviewconfig=" << weeklistviewconfig << oendl;
164 if(weeklistviewconfig==NONE) {// No times displayed. 164 if(weeklistviewconfig==NONE) {// No times displayed.
165 // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); 165 // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute());
166 // middle.sprintf("<--->"); 166 // middle.sprintf("<--->");
167 // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); 167 // end.sprintf("-%.2d:%.2d",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 // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute());
169 } else if(weeklistviewconfig==NORMAL) {// "Normal", only display start time. 169 } else if(weeklistviewconfig==NORMAL) {// "Normal", only display start time.
170 start.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute()); 170 start.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute());
171 middle.sprintf(" |---"); 171 middle.sprintf(" |---");
@@ -204,17 +204,17 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
204 const QDate &d, bool onM, 204 const QDate &d, bool onM,
205 QWidget* parent, 205 QWidget* parent,
206 const char* name, WFlags fl) 206 const char* name, WFlags fl)
207 : QWidget( parent, name, fl ) 207 : QWidget( parent, name, fl )
208{ 208{
209 Config config("DateBook"); 209 Config config("DateBook");
210 config.setGroup("Main"); 210 config.setGroup("Main");
211 int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL); 211 int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL);
212 Opie::Core::odebug << "weeklistviewconfig: " << weeklistviewconfig << oendl; 212 odebug << "weeklistviewconfig: " << weeklistviewconfig << oendl;
213 213
214 bStartOnMonday=onM; 214 bStartOnMonday=onM;
215 setPalette(white); 215 setPalette(white);
216 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); 216 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
217 217
218 QVBoxLayout *layout = new QVBoxLayout( this ); 218 QVBoxLayout *layout = new QVBoxLayout( this );
219 219
220 qBubbleSort(ev); 220 qBubbleSort(ev);
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index 42bdbe2..297da94 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -426,35 +426,35 @@ Event DateEntry::event()
426 endTime.setHMS( 23, 59, 59 ); 426 endTime.setHMS( 23, 59, 59 );
427 } 427 }
428 428
429 // adjust start and end times based on timezone 429 // adjust start and end times based on timezone
430 QDateTime start( startDate, startTime ); 430 QDateTime start( startDate, startTime );
431 QDateTime end( endDate, endTime ); 431 QDateTime end( endDate, endTime );
432 time_t start_utc, end_utc; 432 time_t start_utc, end_utc;
433 433
434 //Opie::Core::odebug << "tz: " << timezone->currentZone() << oendl; 434 //odebug << "tz: " << timezone->currentZone() << oendl;
435 435
436 // get real timezone 436 // get real timezone
437 QString realTZ; 437 QString realTZ;
438 realTZ = QString::fromLocal8Bit( getenv("TZ") ); 438 realTZ = QString::fromLocal8Bit( getenv("TZ") );
439 439
440 // set timezone 440 // set timezone
441 if ( setenv( "TZ", timezone->currentZone(), true ) != 0 ) 441 if ( setenv( "TZ", timezone->currentZone(), true ) != 0 )
442 Opie::Core::owarn << "There was a problem setting the timezone." << oendl; 442 owarn << "There was a problem setting the timezone." << oendl;
443 443
444 // convert to UTC based on selected TZ (calling tzset internally) 444 // convert to UTC based on selected TZ (calling tzset internally)
445 start_utc = TimeConversion::toUTC( start ); 445 start_utc = TimeConversion::toUTC( start );
446 end_utc = TimeConversion::toUTC( end ); 446 end_utc = TimeConversion::toUTC( end );
447 447
448 // done playing around... put it all back 448 // done playing around... put it all back
449 unsetenv( "TZ" ); 449 unsetenv( "TZ" );
450 if ( !realTZ.isNull() ) 450 if ( !realTZ.isNull() )
451 if ( setenv( "TZ", realTZ, true ) != 0 ) 451 if ( setenv( "TZ", realTZ, true ) != 0 )
452 Opie::Core::owarn << "There was a problem setting the timezone." << oendl; 452 owarn << "There was a problem setting the timezone." << oendl;
453 453
454 // convert UTC to local time (calling tzset internally) 454 // convert UTC to local time (calling tzset internally)
455 ev.setStart( TimeConversion::fromUTC( start_utc ) ); 455 ev.setStart( TimeConversion::fromUTC( start_utc ) );
456 ev.setEnd( TimeConversion::fromUTC( end_utc ) ); 456 ev.setEnd( TimeConversion::fromUTC( end_utc ) );
457 457
458 // we only have one type of sound at the moment... LOUD!!! 458 // we only have one type of sound at the moment... LOUD!!!
459 if ( comboSound->currentItem() != 0 ) 459 if ( comboSound->currentItem() != 0 )
460 st = Event::Loud; 460 st = Event::Loud;