author | zautrix <zautrix> | 2005-03-21 14:24:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-21 14:24:44 (UTC) |
commit | 3bd97904e69bf586122ad82d279c37db0861eefb (patch) (side-by-side diff) | |
tree | 34630b2d02421a61f7664226aee60a4ce76fa2ab /korganizer | |
parent | 41f264fea6caaf9ca0f8b34509a07157c210f851 (diff) | |
download | kdepimpi-3bd97904e69bf586122ad82d279c37db0861eefb.zip kdepimpi-3bd97904e69bf586122ad82d279c37db0861eefb.tar.gz kdepimpi-3bd97904e69bf586122ad82d279c37db0861eefb.tar.bz2 |
repaint fixes
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 2 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index d4173e8..9506768 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -110,49 +110,49 @@ void DateNavigatorContainer::updateView() { mNavigatorView->updateView(); KDateNavigator *n; for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { n->updateView(); } } void DateNavigatorContainer::updateConfig() { mNavigatorView->updateConfig(); KDateNavigator *n; for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { n->updateConfig(); } } void DateNavigatorContainer::selectDates( const DateList &dateList ) { mNavigatorView->selectDates( dateList ); setBaseDates(); if ( mExtraViews.count() ) { KDateNavigator *view = mExtraViews.at( 0 ); view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); - view->dayMatrix()->repaint(); + view->dayMatrix()->repaint( false ); } } void DateNavigatorContainer::setBaseDates() { KCal::DateList dateList = mNavigatorView->selectedDates(); if ( dateList.isEmpty() ) { kdError() << "DateNavigatorContainer::selectDates() empty list." << endl; } QDate baseDate = dateList.first(); KDateNavigator *n; bool doRepaint = false; // skip first repaint for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); n->setBaseDate( baseDate, doRepaint ); doRepaint = true; } } void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) { #if 0 kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl; kdDebug(5850) << " CURRENT SIZE: " << size() << endl; diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 2321acb..fe83e09 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -174,98 +174,98 @@ void KDateNavigator::slotMonthSelected( int m ) if ( m_MthYr.month() <= mMonthSignalOffset) m += 12; //qDebug("%d mMonthSignalOffset %d emit %d", m, mMonthSignalOffset, m - mMonthSignalOffset); emit monthSelected( m - mMonthSignalOffset ); } void KDateNavigator::setCalendar( Calendar *cal ) { daymatrix->setCalendar( cal ); } void KDateNavigator::setBaseDate( const QDate &date , bool doRepaint ) // = true { m_MthYr = date; updateDates(); updateView(); KCal::DateList dates; dates.append( date ); mNavigatorBar->selectDates( dates ); daymatrix->clearSelection(); if ( doRepaint ) - daymatrix->repaint(); + daymatrix->repaint( false ); } void KDateNavigator::enableRollover(RolloverType r) { switch(r) { case None : if (updateTimer) { updateTimer->stop(); delete updateTimer; updateTimer=0L; } break; case FollowDay : case FollowMonth : if (!updateTimer) { updateTimer = new QTimer(this); QObject::connect(updateTimer,SIGNAL(timeout()), this,SLOT(possiblyPastMidnight())); } updateTimer->start(0,true); lastDayChecked = QDate::currentDate(); } updateRollover=r; } KDateNavigator::~KDateNavigator() { } void KDateNavigator::passedMidnight() { QDate today = QDate::currentDate(); bool emitMonth = false; if (today.month() != lastDayChecked.month()) { if (updateRollover==FollowMonth && daymatrix->isEndOfMonth()) { goNextMonth(); emitMonth=true; } } daymatrix->recalculateToday(); - daymatrix->repaint(); + daymatrix->repaint( false ); emit dayPassed(today); if (emitMonth) { emit monthPassed(today); } } /* slot */ void KDateNavigator::possiblyPastMidnight() { if (lastDayChecked!=QDate::currentDate()) { passedMidnight(); lastDayChecked=QDate::currentDate(); } // Set the timer to go off 1 second after midnight // or after 8 minutes, whichever comes first. if (updateTimer) { QTime now = QTime::currentTime(); QTime midnight = QTime(23,59,59); int msecsWait = QMIN(480000,now.msecsTo(midnight)+2000); // qDebug(QString("Waiting %1 msec from %2 to %3.").arg(msecsWait)) // .arg(now.toString()).arg(midnight.toString())); updateTimer->stop(); updateTimer->start(msecsWait,true); |