summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 8c1953d..14e8b5c 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -325,24 +325,25 @@ void KOQuickTodo::focusInEvent(QFocusEvent *ev)
void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
{
setText(i18n("Click to add a new Todo"));
QLineEdit::focusOutEvent(ev);
}
/////////////////////////////////////////////////////////////////////////////
KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
KOrg::BaseView(calendar,parent,name)
{
+ isFlatDisplay = false;
mNavigator = 0;
QBoxLayout *topLayout = new QVBoxLayout(this);
mName = QString ( name );
mBlockUpdate = false;
mQuickAdd = new KOQuickTodo(this);
topLayout->addWidget(mQuickAdd);
if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide();
mTodoListView = new KOTodoListView(calendar,this, name );
topLayout->addWidget(mTodoListView);
//mTodoListView->header()->setMaximumHeight(30);
@@ -943,35 +944,43 @@ void KOTodoView::itemClicked(QListViewItem *item)
if ( !allowReparent ) {
topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
qDebug("Recursive reparenting not possible ");
pendingSubtodo = 0;
} else {
Todo* newParent = todoItem->todo();
Todo* newSub = pendingSubtodo->todo();
pendingSubtodo = 0;
emit reparentTodoSignal( newParent,newSub );
return;
}
}
- int completed = todoItem->todo()->isCompleted(); // Completed or not?
-
+#if 0
+ // handled by the item itself
+ bool completed = todoItem->todo()->isCompleted(); // Completed or not?
+ qDebug("com %d ",completed );
+ qDebug("itemclicked ");
if (todoItem->isOn()) {
+ qDebug("on ");
if (!completed) {
+ qDebug("set true ");
todoItem->todo()->setCompleted(QDateTime::currentDateTime());
}
} else {
+ qDebug("not on ");
if (completed) {
+ qDebug("set false ");
todoItem->todo()->setCompleted(false);
}
}
+#endif
}
void KOTodoView::setDocumentId( const QString &id )
{
kdDebug() << "KOTodoView::setDocumentId()" << endl;
mDocPrefs->setDoc( id );
}
void KOTodoView::itemStateChanged( QListViewItem *item )
{
if (!item) return;