summaryrefslogtreecommitdiff
authorzecke <zecke>2004-11-20 18:50:20 (UTC)
committer zecke <zecke>2004-11-20 18:50:20 (UTC)
commit047944e061799d24fa337e8a20fcb7ef6916805b (patch) (side-by-side diff)
tree88e1868e06787544ebfb98d433c2057eeeaed89d
parent244e3fd05f01859a82243347ddc11318788cefb2 (diff)
downloadopie-047944e061799d24fa337e8a20fcb7ef6916805b.zip
opie-047944e061799d24fa337e8a20fcb7ef6916805b.tar.gz
opie-047944e061799d24fa337e8a20fcb7ef6916805b.tar.bz2
Temporary compile fix. Needs better updating for
OPimOccurrences and some rethinking
Diffstat (more/less context) (show 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
@@ -273,7 +273,7 @@ void MainWindow::slotLoadForDay(const QDate& date) {
/* all todos for today including the ones without dueDate */
m_todoView->set( m_tb.effectiveToDos(date, date ) );
- m_dateView->set( m_db.effectiveEvents( date, date ) );
+ m_dateView->set( m_db.occurrences( date, date ) );
}
/* we want to show the current record */
@@ -408,13 +408,13 @@ void PIMListView::set( Opie::OPimTodoAccess::List list ) {
}
}
-void PIMListView::set( const Opie::OEffectiveEvent::ValueList& lst ) {
+void PIMListView::set( const Opie::OPimOccurrence::List& lst ) {
/* clear first and then add items */
clear();
- Opie::OEffectiveEvent::ValueList::ConstIterator it;
+ Opie::OPimOccurrence::List::ConstIterator it;
for ( it = lst.begin(); it != lst.end(); ++it ) {
- PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimEvent( (*it).event() ) );
+ PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimEvent( (*it).toEvent() ) );
i->setText( 0, PIMListView::makeString( (*it) ) );
}
@@ -436,18 +436,23 @@ void PIMListView::showCurrentRecord() {
emit showRecord( (*item->record() ) );
}
-QString PIMListView::makeString( const Opie::OEffectiveEvent& ev ) {
+QString PIMListView::makeString( const Opie::OPimOccurrence& _ev ) {
QString str;
- str += ev.description();
- if ( !ev.event().isAllDay() ) {
+ str += _ev.summary();
+
+ Opie::OPimEvent ev = _ev.toEvent();
+ if ( !ev.isAllDay() ) {
+#if 0
if ( ev.startDate() != ev.endDate() ) {
- str += tr("Start ") + TimeString::timeString( ev.event().startDateTime().time() );
- str += " - " + TimeString::longDateString( ev.startDate() );
- str += tr("End ") + TimeString::timeString( ev.event().endDateTime().time() );
- str += " - " + TimeString::longDateString( ev.endDate() );
- }else{
- str += tr("Time ") + TimeString::timeString( ev.startTime() );
- str += " - " + TimeString::timeString( ev.endTime() );
+ str += tr("Start ") + TimeString::timeString( ev.startDateTime().time() );
+ str += " - " + TimeString::longDateString( ev.startDateTime().date() );
+ str += tr("End ") + TimeString::timeString( ev.endDateTime().time() );
+ str += " - " + TimeString::longDateString( ev.endDateTime().date() );
+ }else
+#endif
+ {
+ str += tr("Time ") + TimeString::timeString( _ev.startTime() );
+ str += " - " + TimeString::timeString( _ev.endTime() );
}
}else
str += tr(" This is an All-Day Event");
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
@@ -85,14 +85,14 @@ public:
void set( Opie::OPimTodoAccess::List );
- void set( const Opie::OEffectiveEvent::ValueList& );
+ void set( const Opie::OPimOccurrence::List& );
void showCurrentRecord();
signals:
void showRecord( const Opie::OPimRecord& );
private:
- static QString makeString( const Opie::OEffectiveEvent& ev );
+ static QString makeString( const Opie::OPimOccurrence& ev );
};