summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/simple-pim/simple.cpp33
-rw-r--r--examples/simple-pim/simple.h4
2 files changed, 21 insertions, 16 deletions
diff --git a/examples/simple-pim/simple.cpp b/examples/simple-pim/simple.cpp
index efd5070..d3ce2cc 100644
--- a/examples/simple-pim/simple.cpp
+++ b/examples/simple-pim/simple.cpp
@@ -274,5 +274,5 @@ void MainWindow::slotLoadForDay(const QDate& date) {
274 /* all todos for today including the ones without dueDate */ 274 /* all todos for today including the ones without dueDate */
275 m_todoView->set( m_tb.effectiveToDos(date, date ) ); 275 m_todoView->set( m_tb.effectiveToDos(date, date ) );
276 m_dateView->set( m_db.effectiveEvents( date, date ) ); 276 m_dateView->set( m_db.occurrences( date, date ) );
277} 277}
278 278
@@ -409,11 +409,11 @@ void PIMListView::set( Opie::OPimTodoAccess::List list ) {
409} 409}
410 410
411void PIMListView::set( const Opie::OEffectiveEvent::ValueList& lst ) { 411void PIMListView::set( const Opie::OPimOccurrence::List& lst ) {
412 /* clear first and then add items */ 412 /* clear first and then add items */
413 clear(); 413 clear();
414 414
415 Opie::OEffectiveEvent::ValueList::ConstIterator it; 415 Opie::OPimOccurrence::List::ConstIterator it;
416 for ( it = lst.begin(); it != lst.end(); ++it ) { 416 for ( it = lst.begin(); it != lst.end(); ++it ) {
417 PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimEvent( (*it).event() ) ); 417 PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimEvent( (*it).toEvent() ) );
418 i->setText( 0, PIMListView::makeString( (*it) ) ); 418 i->setText( 0, PIMListView::makeString( (*it) ) );
419 } 419 }
@@ -437,16 +437,21 @@ void PIMListView::showCurrentRecord() {
437} 437}
438 438
439QString PIMListView::makeString( const Opie::OEffectiveEvent& ev ) { 439QString PIMListView::makeString( const Opie::OPimOccurrence& _ev ) {
440 QString str; 440 QString str;
441 str += ev.description(); 441 str += _ev.summary();
442 if ( !ev.event().isAllDay() ) { 442
443 Opie::OPimEvent ev = _ev.toEvent();
444 if ( !ev.isAllDay() ) {
445#if 0
443 if ( ev.startDate() != ev.endDate() ) { 446 if ( ev.startDate() != ev.endDate() ) {
444 str += tr("Start ") + TimeString::timeString( ev.event().startDateTime().time() ); 447 str += tr("Start ") + TimeString::timeString( ev.startDateTime().time() );
445 str += " - " + TimeString::longDateString( ev.startDate() ); 448 str += " - " + TimeString::longDateString( ev.startDateTime().date() );
446 str += tr("End ") + TimeString::timeString( ev.event().endDateTime().time() ); 449 str += tr("End ") + TimeString::timeString( ev.endDateTime().time() );
447 str += " - " + TimeString::longDateString( ev.endDate() ); 450 str += " - " + TimeString::longDateString( ev.endDateTime().date() );
448 }else{ 451 }else
449 str += tr("Time ") + TimeString::timeString( ev.startTime() ); 452 #endif
450 str += " - " + TimeString::timeString( ev.endTime() ); 453 {
454 str += tr("Time ") + TimeString::timeString( _ev.startTime() );
455 str += " - " + TimeString::timeString( _ev.endTime() );
451 } 456 }
452 }else 457 }else
diff --git a/examples/simple-pim/simple.h b/examples/simple-pim/simple.h
index 2a6e8ce..a537dde 100644
--- a/examples/simple-pim/simple.h
+++ b/examples/simple-pim/simple.h
@@ -86,5 +86,5 @@ public:
86 86
87 void set( Opie::OPimTodoAccess::List ); 87 void set( Opie::OPimTodoAccess::List );
88 void set( const Opie::OEffectiveEvent::ValueList& ); 88 void set( const Opie::OPimOccurrence::List& );
89 void showCurrentRecord(); 89 void showCurrentRecord();
90 90
@@ -93,5 +93,5 @@ signals:
93 93
94private: 94private:
95 static QString makeString( const Opie::OEffectiveEvent& ev ); 95 static QString makeString( const Opie::OPimOccurrence& ev );
96 96
97}; 97};