summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-31 11:47:44 (UTC)
committer zautrix <zautrix>2005-01-31 11:47:44 (UTC)
commit0ee7cc932ca9c973b086f847a38d29531a815712 (patch) (unidiff)
treec16662cdcfffb31d517ff700aa6dcd13f2f8c643
parent3e0b1c7cd48903b6886e081210cd83b7441b48ac (diff)
downloadkdepimpi-0ee7cc932ca9c973b086f847a38d29531a815712.zip
kdepimpi-0ee7cc932ca9c973b086f847a38d29531a815712.tar.gz
kdepimpi-0ee7cc932ca9c973b086f847a38d29531a815712.tar.bz2
many fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/komonthview.cpp1
-rw-r--r--korganizer/kotodoview.cpp17
-rw-r--r--korganizer/kotodoview.h2
-rw-r--r--korganizer/koviewmanager.cpp13
-rw-r--r--korganizer/koviewmanager.h2
6 files changed, 28 insertions, 8 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index db33017..cca73f2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2160,7 +2160,6 @@ void CalendarView::changeEventDisplay(Event *which, int action)
2160 2160
2161void CalendarView::updateTodoViews() 2161void CalendarView::updateTodoViews()
2162{ 2162{
2163
2164 mTodoList->updateView(); 2163 mTodoList->updateView();
2165 mViewManager->currentView()->updateView(); 2164 mViewManager->currentView()->updateView();
2166 2165
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4cefb26..770a42b 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -973,6 +973,7 @@ void KOMonthView::updateView()
973void KOMonthView::resizeEvent(QResizeEvent * e) 973void KOMonthView::resizeEvent(QResizeEvent * e)
974{ 974{
975 computeLayout(); 975 computeLayout();
976 mCells[0]->setFocus();
976} 977}
977void KOMonthView::computeLayout() 978void KOMonthView::computeLayout()
978{ 979{
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 8d8fc2a..82437d8 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -334,6 +334,7 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
334KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : 334KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
335 KOrg::BaseView(calendar,parent,name) 335 KOrg::BaseView(calendar,parent,name)
336{ 336{
337 mPendingUpdateBeforeRepaint = false;
337 isFlatDisplay = false; 338 isFlatDisplay = false;
338 mNavigator = 0; 339 mNavigator = 0;
339 QBoxLayout *topLayout = new QVBoxLayout(this); 340 QBoxLayout *topLayout = new QVBoxLayout(this);
@@ -533,14 +534,26 @@ void KOTodoView::jumpToDate ()
533// if ( mActiveItem->todo()->hasDueDate() ) 534// if ( mActiveItem->todo()->hasDueDate() )
534// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); 535// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() );
535} 536}
536 537void KOTodoView::paintEvent(QPaintEvent * pevent)
538{
539 if ( mPendingUpdateBeforeRepaint ) {
540 updateView();
541 mPendingUpdateBeforeRepaint = false;
542 }
543 KOrg::BaseView::paintEvent( pevent);
544}
545 bool mPendingUpdateBeforeRepaint;
537void KOTodoView::updateView() 546void KOTodoView::updateView()
538{ 547{
539 pendingSubtodo = 0; 548 pendingSubtodo = 0;
540 if ( mBlockUpdate ) { 549 if ( mBlockUpdate ) {
541 //qDebug("blocked ");
542 return; 550 return;
543 } 551 }
552 if ( !isVisible() ) {
553 mPendingUpdateBeforeRepaint = true;
554 return;
555 }
556 //qDebug("KOTodoView::updateView() %x", this);
544 if ( isFlatDisplay ) { 557 if ( isFlatDisplay ) {
545 setAllFlat(); 558 setAllFlat();
546 return; 559 return;
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 68e29bb..16bc133 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -213,6 +213,8 @@ class KOTodoView : public KOrg::BaseView
213 * 3. add a private method for setting a todo modified + friend here? 213 * 3. add a private method for setting a todo modified + friend here?
214 * -- zecke 2002-07-08 214 * -- zecke 2002-07-08
215 */ 215 */
216 void paintEvent(QPaintEvent * pevent);
217 bool mPendingUpdateBeforeRepaint;
216 friend class KOTodoViewItem; 218 friend class KOTodoViewItem;
217 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 219 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
218 void restoreItemState( QListViewItem * ); 220 void restoreItemState( QListViewItem * );
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 35774d6..2cd8792 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -204,12 +204,12 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
204 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); 204 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
205 //raiseCurrentView( full ); 205 //raiseCurrentView( full );
206 mMainView->processIncidenceSelection( 0 ); 206 mMainView->processIncidenceSelection( 0 );
207 mMainView->updateView(); 207 //mMainView->updateView();
208 raiseCurrentView( full ); 208 raiseCurrentView( full, true );
209 mMainView->adaptNavigationUnits(); 209 mMainView->adaptNavigationUnits();
210} 210}
211 211
212void KOViewManager::raiseCurrentView( bool fullScreen ) 212void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
213{ 213{
214 mCurrentAgendaView = 0; 214 mCurrentAgendaView = 0;
215 int wid = mMainView->width() ; 215 int wid = mMainView->width() ;
@@ -231,6 +231,9 @@ void KOViewManager::raiseCurrentView( bool fullScreen )
231 wid -= mMainView->leftFrame()->width(); 231 wid -= mMainView->leftFrame()->width();
232 } 232 }
233 emit signalFullScreen( !fullScreen ); 233 emit signalFullScreen( !fullScreen );
234 if ( callUpdateView )
235 mMainView->updateView();
236
234 if ( globalFlagBlockAgenda == 5 ) { 237 if ( globalFlagBlockAgenda == 5 ) {
235 globalFlagBlockAgenda = 4; 238 globalFlagBlockAgenda = 4;
236 globalFlagBlockAgendaItemPaint = 1; 239 globalFlagBlockAgendaItemPaint = 1;
@@ -272,7 +275,7 @@ void KOViewManager::updateView(const QDate &start, const QDate &end)
272 275
273 if (mCurrentView) mCurrentView->showDates(start, end); 276 if (mCurrentView) mCurrentView->showDates(start, end);
274 277
275 if (mTodoView) mTodoView->updateView(); 278 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
276} 279}
277 280
278 281
@@ -520,7 +523,9 @@ void KOViewManager::showMonthView()
520 globalFlagBlockAgenda = 1; 523 globalFlagBlockAgenda = 1;
521 //mFlagShowNextxDays = false; 524 //mFlagShowNextxDays = false;
522 // if(mMonthView == mCurrentView) return; 525 // if(mMonthView == mCurrentView) return;
526 mMainView->dateNavigator()->blockSignals( true );
523 mMainView->dateNavigator()->selectMonth(); 527 mMainView->dateNavigator()->selectMonth();
528 mMainView->dateNavigator()->blockSignals( false);
524 // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); 529 // DateList tmpList = mMainView->dateNavigator()->selectedDates( );
525 //mMonthView->showDates(tmpList.first(), tmpList.last()); 530 //mMonthView->showDates(tmpList.first(), tmpList.last());
526 531
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 137eb2d..66ab138 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -68,7 +68,7 @@ class KOViewManager : public QObject
68 68
69 void updateView( const QDate &start, const QDate &end ); 69 void updateView( const QDate &start, const QDate &end );
70 70
71 void raiseCurrentView( bool fullScreen = false ); 71 void raiseCurrentView( bool fullScreen = false , bool updateView = false);
72 72
73 void addView(KOrg::BaseView *); 73 void addView(KOrg::BaseView *);
74 74