summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-17 17:46:56 (UTC)
committer zautrix <zautrix>2005-04-17 17:46:56 (UTC)
commit0ff0dca7ccb94ebb1381351e4e4081fe0bac500a (patch) (side-by-side diff)
tree72af4e8ebfa3ebc3f4d475e762070ed39778dc9e /korganizer
parente3e76014e70643b0828f30f5c5277e212495d37c (diff)
downloadkdepimpi-0ff0dca7ccb94ebb1381351e4e4081fe0bac500a.zip
kdepimpi-0ff0dca7ccb94ebb1381351e4e4081fe0bac500a.tar.gz
kdepimpi-0ff0dca7ccb94ebb1381351e4e4081fe0bac500a.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index a1bf9ff..bbf83d9 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -71,98 +71,104 @@ class KOListViewWhatsThis :public QWhatsThis
{
public:
KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
protected:
virtual QString text( const QPoint& p)
{
return _view->getWhatsThisText(p) ;
}
private:
QWidget* _wid;
KOListView * _view;
};
ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date )
{
mItem = item;
mDate = date;
}
ListItemVisitor::~ListItemVisitor()
{
}
bool ListItemVisitor::visit(Event *e)
{
bool ok = false;
QString start, end;
QDate ds, de;
if ( e->doesRecur() ) {
ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date();
if ( ok ) {
int days = e->dtStart().date().daysTo(e->dtEnd().date() );
start = KGlobal::locale()->formatDate(ds,true);
de = ds.addDays( days);
end = KGlobal::locale()->formatDate(de,true);
}
}
if ( ! ok ) {
start =e->dtStartDateStr();
end = e->dtEndDateStr();
ds = e->dtStart().date();
de = e->dtEnd().date();
}
mItem->setText(0,e->summary());
mItem->setText(1,start);
+ if ( e->doesFloat() )
+ mItem->setText(2,"---");
+ else
mItem->setText(2,e->dtStartTimeStr());
mItem->setText(3,end);
+ if ( e->doesFloat() )
+ mItem->setText(4,"---");
+ else
mItem->setText(4,e->dtEndTimeStr());
if ( e->isAlarmEnabled() ) {
mItem->setText(5,e->alarms().first()->offsetText() );
} else {
mItem->setText(5, i18n("No"));
}
mItem->setText(6, e->recurrence()->recurrenceText());
if( ! e->doesRecur() )
mItem->setSortKey( 6, "-" );
mItem->setText(7,"---");
mItem->setText(8,"---");
mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No"));
mItem->setText(10,e->categoriesStr());
QString key;
QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time();
key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute());
mItem->setSortKey(1,key);
t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time();
key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute());
mItem->setSortKey(3,key);
return true;
}
bool ListItemVisitor::visit(Todo *t)
{
mItem->setText(0,i18n("Todo: %1").arg(t->summary()));
if (t->hasStartDate()) {
mItem->setText(1,t->dtStartDateStr());
if (t->doesFloat()) {
mItem->setText(2,"---");
} else {
mItem->setText(2,t->dtStartTimeStr());
}
} else {
mItem->setText(1,"---");
mItem->setText(2,"---");
}
mItem->setText(3,"---");
mItem->setText(4,"---");
if ( t->isAlarmEnabled() ) {
mItem->setText(5,t->alarms().first()->offsetText() );
} else {
mItem->setText(5, i18n("No"));
}
mItem->setText(6, t->recurrence()->recurrenceText());
if( ! t->doesRecur() )