-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 21 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 71 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 5 |
3 files changed, 47 insertions, 50 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 965cf47..10d9a8c 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -99,2 +99,12 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) + mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); + layoutTimeBox->addWidget(mStartCheck,0,0); + connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); + + mStartDateEdit = new KDateEdit(timeBoxFrame); + layoutTimeBox->addWidget(mStartDateEdit,0,1); + + mStartTimeEdit = new KOTimeEdit(timeBoxFrame); + layoutTimeBox->addWidget(mStartTimeEdit,0,2); + mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); @@ -112,13 +122,2 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) - mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); - layoutTimeBox->addWidget(mStartCheck,0,0); - connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); - - mStartDateEdit = new KDateEdit(timeBoxFrame); - layoutTimeBox->addWidget(mStartDateEdit,0,1); - - mStartTimeEdit = new KOTimeEdit(timeBoxFrame); - layoutTimeBox->addWidget(mStartTimeEdit,0,2); - - mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e7a5e0e..e560ce4 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -130,16 +130,15 @@ bool ListItemVisitor::visit(Event *e) mItem->setText(4,e->dtEndTimeStr()); + mItem->setText(5, e->durationText()); if ( e->isAlarmEnabled() ) { - mItem->setText(5,e->alarms().first()->offsetText() ); + mItem->setText(6,e->alarms().first()->offsetText() ); } else { - mItem->setText(5, i18n("No")); + mItem->setText(6, i18n("No")); } - mItem->setText(6, e->recurrenceText()); + mItem->setText(7, e->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()); - mItem->setText(11, KOPrefs::instance()->calName( e->calID() )); - mItem->setText(12, KGlobal::locale()->formatDateTime( e->lastModified(), true, true )); + mItem->setSortKey( 7, "-" ); + mItem->setText(8, e->cancelled() ? i18n("Yes") : i18n("No")); + mItem->setText(9,e->categoriesStr()); + mItem->setText(10, KOPrefs::instance()->calName( e->calID() )); + mItem->setText(11, KGlobal::locale()->formatDateTime( e->lastModified(), true, true )); @@ -179,27 +178,26 @@ bool ListItemVisitor::visit(Todo *t) } - mItem->setText(3,"---"); - mItem->setText(4,"---"); if ( t->isAlarmEnabled() ) { - mItem->setText(5,t->alarms().first()->offsetText() ); + mItem->setText(6,t->alarms().first()->offsetText() ); } else { - mItem->setText(5, i18n("No")); + mItem->setText(6, i18n("No")); } - mItem->setText(6, t->recurrenceText()); + mItem->setText(7, t->recurrenceText()); if( ! t->doesRecur() ) - mItem->setSortKey( 6, "-" ); + mItem->setSortKey( 7, "-" ); if (t->hasDueDate()) { - mItem->setText(7,t->dtDueDateStr()); + mItem->setText(3,t->dtDueDateStr()); if (t->doesFloat()) { - mItem->setText(8,"---"); + mItem->setText(4,"---"); } else { - mItem->setText(8,t->dtDueTimeStr()); + mItem->setText(4,t->dtDueTimeStr()); } } else { - mItem->setText(7,"---"); - mItem->setText(8,"---"); + mItem->setText(3,"---"); + mItem->setText(4,"---"); } - mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); - mItem->setText(10,t->categoriesStr()); - mItem->setText(11, KOPrefs::instance()->calName( t->calID() )); - mItem->setText(12, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); + mItem->setText(5, t->durationText()); + mItem->setText(8, t->cancelled() ? i18n("Yes") : i18n("No")); + mItem->setText(9,t->categoriesStr()); + mItem->setText(10, KOPrefs::instance()->calName( t->calID() )); + mItem->setText(11, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); QString key; @@ -208,3 +206,3 @@ bool ListItemVisitor::visit(Todo *t) key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); - mItem->setSortKey(12,key); + mItem->setSortKey(11,key); if (t->hasDueDate()) { @@ -213,3 +211,3 @@ bool ListItemVisitor::visit(Todo *t) key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); - mItem->setSortKey(7,key); + mItem->setSortKey(3,key); } @@ -245,8 +243,7 @@ bool ListItemVisitor::visit(Journal * j) mItem->setText(6,"---"); - mItem->setText(7,j->dtStartDateStr()); + mItem->setText(7,"---"); mItem->setText(8,"---"); - mItem->setText(9,"---"); - mItem->setText(10,j->categoriesStr()); - mItem->setText(11, KOPrefs::instance()->calName( j->calID() )); - mItem->setText(12, KGlobal::locale()->formatDateTime( j->lastModified(), true, true )); + mItem->setText(9,j->categoriesStr()); + mItem->setText(10, KOPrefs::instance()->calName( j->calID() )); + mItem->setText(11, KGlobal::locale()->formatDateTime( j->lastModified(), true, true )); @@ -276,8 +273,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->addColumn(i18n("Start Time")); - mListView->addColumn(i18n("End Date")); - mListView->addColumn(i18n("End Time")); + mListView->addColumn(i18n("End/Due Date")); + mListView->addColumn(i18n("End/Due Time")); + mListView->addColumn(i18n("Duration")); mListView->addColumn(i18n("Alarm")); // alarm set? mListView->addColumn(i18n("Recurs")); // recurs? - mListView->addColumn(i18n("Due Date")); - mListView->addColumn(i18n("Due Time")); mListView->addColumn(i18n("Cancelled")); @@ -299,3 +295,2 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->setColumnAlignment(11,AlignLeft); - mListView->setColumnAlignment(12,AlignLeft); mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); @@ -303,3 +298,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, int iii = 0; - for ( iii = 0; iii< 13 ; ++iii ) + for ( iii = 0; iii< 12 ; ++iii ) mListView->setColumnWidthMode( iii, QListView::Manual ); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 77d0ac8..98a820d 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -227,3 +227,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : QFontMetrics fm ( filterMenubar->font() ); - +#ifndef DESKTOP_VERSION + filterToolBar->setFocusPolicy( NoFocus ); + filterMenubar->setFocusPolicy( NoFocus ); +#endif filterPopupMenu = new QPopupMenu( this ); |