Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 92abae6..e57daa4 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp | |||
@@ -378,62 +378,66 @@ void DateNavigatorContainer::selectDates( const DateList &dateList ) | |||
378 | QDate fDate = dateList.first(); | 378 | QDate fDate = dateList.first(); |
379 | QDate lDate = dateList.last(); | 379 | QDate lDate = dateList.last(); |
380 | //qDebug("%s %s ", lastAvailableDate().toString().latin1(), firstAvailableDate().toString().latin1() ); | 380 | //qDebug("%s %s ", lastAvailableDate().toString().latin1(), firstAvailableDate().toString().latin1() ); |
381 | //qDebug("End %s %s ",lDate.toString().latin1(),curEnd.toString().latin1() ); | 381 | //qDebug("End %s %s ",lDate.toString().latin1(),curEnd.toString().latin1() ); |
382 | if ( lDate <= lastAvailableDate() && firstAvailableDate() <= fDate) { | 382 | if ( lDate <= lastAvailableDate() && firstAvailableDate() <= fDate) { |
383 | updateDayMatrixDates(); | 383 | updateDayMatrixDates(); |
384 | return; | 384 | return; |
385 | } | 385 | } |
386 | mNavigatorView->selectDates( dateList ); | 386 | mNavigatorView->selectDates( dateList ); |
387 | setBaseDates(); | 387 | setBaseDates(); |
388 | if ( mLastDisplayedDN ) { | 388 | if ( mLastDisplayedDN ) { |
389 | KDateNavigator *view = mExtraViews.at( 0 ); | 389 | KDateNavigator *view = mExtraViews.at( 0 ); |
390 | view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); | 390 | view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); |
391 | view->dayMatrix()->repaint( false ); | 391 | view->dayMatrix()->repaint( false ); |
392 | if ( mLastDisplayedDN > 1 ) { | 392 | if ( mLastDisplayedDN > 1 ) { |
393 | KDateNavigator *view = mExtraViews.at( 1 ); | 393 | KDateNavigator *view = mExtraViews.at( 1 ); |
394 | view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); | 394 | view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); |
395 | view->dayMatrix()->repaint( false ); | 395 | view->dayMatrix()->repaint( false ); |
396 | } | 396 | } |
397 | } | 397 | } |
398 | } | 398 | } |
399 | 399 | ||
400 | void DateNavigatorContainer::setBaseDates() | 400 | void DateNavigatorContainer::setBaseDates() |
401 | { | 401 | { |
402 | QDate baseDate = mNavigatorView->baseDate(); | 402 | QDate baseDate = mNavigatorView->baseDate(); |
403 | bool doRepaint = true; | 403 | bool doRepaint = true; |
404 | for( uint i = 0; i < mLastDisplayedDN; ++i ) { | 404 | for( uint i = 0; i < mLastDisplayedDN; ++i ) { |
405 | KDateNavigator *n = mExtraViews.at( i ); | 405 | KDateNavigator *n = mExtraViews.at( i ); |
406 | baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); | 406 | baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); |
407 | n->setBaseDate( baseDate, doRepaint ); | 407 | n->setBaseDate( baseDate, doRepaint ); |
408 | } | 408 | } |
409 | } | 409 | } |
410 | void DateNavigatorContainer::setResizeEnabled() | 410 | void DateNavigatorContainer::setResizeEnabled() |
411 | { | 411 | { |
412 | mResizeEnabled = true; | 412 | mResizeEnabled = true; |
413 | //qDebug("DateNavigatorContainer::setResizeEnabled "); | 413 | //qDebug("DateNavigatorContainer::setResizeEnabled "); |
414 | checkUpdateDayMatrixDates(); | 414 | checkUpdateDayMatrixDates(); |
415 | } | 415 | } |
416 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) | 416 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) |
417 | { | 417 | { |
418 | 418 | ||
419 | //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height()); | 419 | //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height()); |
420 | //qDebug("COUNT %d ", mExtraViews.count()); | 420 | //qDebug("COUNT %d ", mExtraViews.count()); |
421 | if ( ! mResizeEnabled ) { | 421 | if ( ! mResizeEnabled ) { |
422 | //qDebug("NOT ResizeEnabled"); | 422 | //qDebug("NOT ResizeEnabled"); |
423 | return; | 423 | return; |
424 | } | 424 | } |
425 | else | 425 | else |
426 | mUpdateTimer->start( 250 ); | 426 | #ifdef DESKTOP_VERSION |
427 | mUpdateTimer->start( 100 ); | ||
428 | #else | ||
429 | mUpdateTimer->start( 50 ); | ||
430 | #endif | ||
427 | 431 | ||
428 | //updateDayMatrixDates(); | 432 | //updateDayMatrixDates(); |
429 | } | 433 | } |
430 | 434 | ||
431 | QSize DateNavigatorContainer::minimumSizeHint() const | 435 | QSize DateNavigatorContainer::minimumSizeHint() const |
432 | { | 436 | { |
433 | return mNavigatorView->minimumSizeHint(); | 437 | return mNavigatorView->minimumSizeHint(); |
434 | } | 438 | } |
435 | 439 | ||
436 | QSize DateNavigatorContainer::sizeHint() const | 440 | QSize DateNavigatorContainer::sizeHint() const |
437 | { | 441 | { |
438 | return mNavigatorView->yourSizeHint(); | 442 | return mNavigatorView->yourSizeHint(); |
439 | } | 443 | } |