summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
authorzautrix <zautrix>2005-08-06 09:54:42 (UTC)
committer zautrix <zautrix>2005-08-06 09:54:42 (UTC)
commitb841f4f2d54ac531c1f9ec88852d31307b9145f2 (patch) (unidiff)
treec334106e75e73bbc3fc33cd3c0d6480314a42774 /korganizer/kotodoview.cpp
parentcd215c243d0636cabbc73006652b9b6783319de1 (diff)
downloadkdepimpi-b841f4f2d54ac531c1f9ec88852d31307b9145f2.zip
kdepimpi-b841f4f2d54ac531c1f9ec88852d31307b9145f2.tar.gz
kdepimpi-b841f4f2d54ac531c1f9ec88852d31307b9145f2.tar.bz2
fixes
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 00c2d97..27d755e 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -505,2 +505,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
505{ 505{
506 mActiveItem = 0;
506 mCategoryPopupMenu = 0; 507 mCategoryPopupMenu = 0;
@@ -809,4 +810,14 @@ void KOTodoView::paintEvent(QPaintEvent * pevent)
809 810
811void KOTodoView::clearList( bool saveCurrentItem ) // default true
812{
813 if ( mTodoListView->childCount() ) {
814 if ( saveCurrentItem )
815 storeCurrentItem();
816 mTodoListView->clear();
817 mTodoMap.clear();
818 }
819}
810void KOTodoView::updateView() 820void KOTodoView::updateView()
811{ 821{
822 mActiveItem = 0;
812 pendingSubtodo = 0; 823 pendingSubtodo = 0;
@@ -816,2 +827,3 @@ void KOTodoView::updateView()
816 if ( !isVisible() ) { 827 if ( !isVisible() ) {
828 clearList ();
817 mPendingUpdateBeforeRepaint = true; 829 mPendingUpdateBeforeRepaint = true;
@@ -824,3 +836,2 @@ void KOTodoView::updateView()
824 } 836 }
825 storeCurrentItem();
826 //qDebug("update "); 837 //qDebug("update ");
@@ -829,4 +840,4 @@ void KOTodoView::updateView()
829 840
841 clearList ();
830 842
831 mTodoListView->clear();
832 if ( mName == "todolistsmall" ) { 843 if ( mName == "todolistsmall" ) {
@@ -866,3 +877,2 @@ void KOTodoView::updateView()
866 // recursively for proper hierarchical display of Todos. 877 // recursively for proper hierarchical display of Todos.
867 mTodoMap.clear();
868 Todo *todo; 878 Todo *todo;
@@ -976,2 +986,3 @@ void KOTodoView::resetCurrentItem()
976 processSelectionChange(); 986 processSelectionChange();
987 if ( mName != "todolistsmall" )
977 QTimer::singleShot( 100, this, SLOT ( resetFocusToList() )); 988 QTimer::singleShot( 100, this, SLOT ( resetFocusToList() ));
@@ -1102,2 +1113,3 @@ void KOTodoView::editItem(QListViewItem *item )
1102{ 1113{
1114 if ( item )
1103 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 1115 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
@@ -1107,2 +1119,3 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
1107{ 1119{
1120 if ( item )
1108 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 1121 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
@@ -1359,3 +1372,3 @@ void KOTodoView::toggleRunningItem()
1359 tp.exec(); 1372 tp.exec();
1360 updateTodo ( t, 0 ); 1373 updateTodo ( t, KOGlobals::EVENTEDITED );
1361 } else { 1374 } else {
@@ -1376,3 +1389,3 @@ void KOTodoView::toggleRunningItem()
1376 t->setRunning( true ); 1389 t->setRunning( true );
1377 updateTodo ( t, 0 ); 1390 updateTodo ( t, KOGlobals::EVENTEDITED );
1378 } 1391 }
@@ -1507,3 +1520,4 @@ void KOTodoView::displayAllFlat()
1507{ 1520{
1508 storeCurrentItem(); 1521
1522 mActiveItem = 0;
1509 pendingSubtodo = 0; 1523 pendingSubtodo = 0;
@@ -1512,2 +1526,3 @@ void KOTodoView::displayAllFlat()
1512 } 1526 }
1527 clearList ();
1513 mPopupMenu->setItemChecked( 8,true ); 1528 mPopupMenu->setItemChecked( 8,true );
@@ -1515,4 +1530,2 @@ void KOTodoView::displayAllFlat()
1515 QPtrList<Todo> todoList = calendar()->todos(); 1530 QPtrList<Todo> todoList = calendar()->todos();
1516 mTodoMap.clear();
1517 mTodoListView->clear();
1518 Todo *todo; 1531 Todo *todo;
@@ -1698,2 +1711,3 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e )
1698} 1711}
1712
1699void KOTodoView::updateTodo( Todo * t, int type ) 1713void KOTodoView::updateTodo( Todo * t, int type )