-rw-r--r-- | korganizer/calendarview.cpp | 22 | ||||
-rw-r--r-- | korganizer/calendarview.h | 2 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 89 | ||||
-rw-r--r-- | korganizer/komonthview.h | 8 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 6 |
5 files changed, 85 insertions, 42 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 12af655..f9af769 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -232,8 +232,9 @@ CalendarView::CalendarView( Calendar *calendar, | |||
232 | init();} | 232 | init();} |
233 | 233 | ||
234 | void CalendarView::init() | 234 | void CalendarView::init() |
235 | { | 235 | { |
236 | mBlockShowDates = false; | ||
236 | beamDialog = new KOBeamPrefs(); | 237 | beamDialog = new KOBeamPrefs(); |
237 | mDatePickerMode = 0; | 238 | mDatePickerMode = 0; |
238 | mCurrentSyncDevice = ""; | 239 | mCurrentSyncDevice = ""; |
239 | writeLocale(); | 240 | writeLocale(); |
@@ -345,23 +346,23 @@ void CalendarView::init() | |||
345 | #endif | 346 | #endif |
346 | 347 | ||
347 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 348 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
348 | SLOT( showDates( const KCal::DateList & ) ) ); | 349 | SLOT( showDates( const KCal::DateList & ) ) ); |
350 | |||
349 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 351 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
350 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 352 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
351 | |||
352 | connect( mNavigatorBar, SIGNAL( goPrevYear() ), | 353 | connect( mNavigatorBar, SIGNAL( goPrevYear() ), |
353 | mNavigator, SLOT( selectPreviousYear() ) ); | 354 | mNavigator, SLOT( selectPreviousYear() ) ); |
354 | connect( mNavigatorBar, SIGNAL( goNextYear() ), | 355 | connect( mNavigatorBar, SIGNAL( goNextYear() ), |
355 | mNavigator, SLOT( selectNextYear() ) ); | 356 | mNavigator, SLOT( selectNextYear() ) ); |
356 | connect( mNavigatorBar, SIGNAL( goPrevMonth() ), | 357 | connect( mNavigatorBar, SIGNAL( goPrevMonth() ), |
357 | mNavigator, SLOT( selectPreviousMonth() ) ); | 358 | mNavigator, SLOT( selectPreviousMonth() ) ); |
358 | connect( mNavigatorBar, SIGNAL( goNextMonth() ), | 359 | connect( mNavigatorBar, SIGNAL( goNextMonth() ), |
359 | mNavigator, SLOT( selectNextMonth() ) ); | 360 | mNavigator, SLOT( selectNextMonth() ) ); |
360 | 361 | ||
361 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 362 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
362 | mNavigatorBar, SLOT( selectDates( const KCal::DateList & ) ) ); | 363 | mNavigatorBar, SLOT( selectDates( const KCal::DateList & ) ) ); |
363 | 364 | ||
364 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 365 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
365 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 366 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
366 | 367 | ||
367 | connect( mDateNavigator, SIGNAL( goPrevYear() ), | 368 | connect( mDateNavigator, SIGNAL( goPrevYear() ), |
@@ -496,9 +497,11 @@ CalendarView::~CalendarView() | |||
496 | } | 497 | } |
497 | 498 | ||
498 | void CalendarView::showDay( QDate d ) | 499 | void CalendarView::showDay( QDate d ) |
499 | { | 500 | { |
501 | dateNavigator()->blockSignals( true ); | ||
500 | dateNavigator()->selectDate( d ); | 502 | dateNavigator()->selectDate( d ); |
503 | dateNavigator()->blockSignals( false ); | ||
501 | mViewManager->showWeekView(); | 504 | mViewManager->showWeekView(); |
502 | dateNavigator()->selectDate( d ); | 505 | dateNavigator()->selectDate( d ); |
503 | } | 506 | } |
504 | void CalendarView::timerAlarm() | 507 | void CalendarView::timerAlarm() |
@@ -671,9 +674,11 @@ void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) | |||
671 | mAlarmTimer->stop(); | 674 | mAlarmTimer->stop(); |
672 | } | 675 | } |
673 | void CalendarView::selectWeekNum ( int num ) | 676 | void CalendarView::selectWeekNum ( int num ) |
674 | { | 677 | { |
678 | dateNavigator()->blockSignals( true ); | ||
675 | dateNavigator()->selectWeek( num ); | 679 | dateNavigator()->selectWeek( num ); |
680 | dateNavigator()->blockSignals( false ); | ||
676 | mViewManager->showWeekView(); | 681 | mViewManager->showWeekView(); |
677 | } | 682 | } |
678 | KOViewManager *CalendarView::viewManager() | 683 | KOViewManager *CalendarView::viewManager() |
679 | { | 684 | { |
@@ -3464,12 +3469,15 @@ void CalendarView::checkClipboard() | |||
3464 | void CalendarView::showDates(const DateList &selectedDates) | 3469 | void CalendarView::showDates(const DateList &selectedDates) |
3465 | { | 3470 | { |
3466 | // kdDebug() << "CalendarView::selectDates()" << endl; | 3471 | // kdDebug() << "CalendarView::selectDates()" << endl; |
3467 | 3472 | ||
3468 | if ( mViewManager->currentView() ) { | 3473 | |
3469 | updateView( selectedDates.first(), selectedDates.last() ); | 3474 | if ( !mBlockShowDates ) { |
3470 | } else { | 3475 | if ( mViewManager->currentView() ) { |
3471 | mViewManager->showAgendaView(); | 3476 | updateView( selectedDates.first(), selectedDates.last() ); |
3477 | } else { | ||
3478 | mViewManager->showAgendaView(); | ||
3479 | } | ||
3472 | } | 3480 | } |
3473 | 3481 | ||
3474 | QString selDates; | 3482 | QString selDates; |
3475 | selDates = KGlobal::locale()->formatDate( selectedDates.first(), true); | 3483 | selDates = KGlobal::locale()->formatDate( selectedDates.first(), true); |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 646973d..e27da9a 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -479,8 +479,9 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
479 | void adaptNavigationUnits(); | 479 | void adaptNavigationUnits(); |
480 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); | 480 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); |
481 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); | 481 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); |
482 | //Attendee* getYourAttendee(Event *event); | 482 | //Attendee* getYourAttendee(Event *event); |
483 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} | ||
483 | protected: | 484 | protected: |
484 | void schedule(Scheduler::Method, Incidence *incidence = 0); | 485 | void schedule(Scheduler::Method, Incidence *incidence = 0); |
485 | 486 | ||
486 | // returns KMsgBox::OKCandel() | 487 | // returns KMsgBox::OKCandel() |
@@ -490,8 +491,9 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
490 | void writeLocale(); | 491 | void writeLocale(); |
491 | Todo *selectedTodo(); | 492 | Todo *selectedTodo(); |
492 | 493 | ||
493 | private: | 494 | private: |
495 | bool mBlockShowDates; | ||
494 | KSyncManager* mSyncManager; | 496 | KSyncManager* mSyncManager; |
495 | AlarmDialog * mAlarmDialog; | 497 | AlarmDialog * mAlarmDialog; |
496 | QString mAlarmNotification; | 498 | QString mAlarmNotification; |
497 | QString mSuspendAlarmNotification; | 499 | QString mSuspendAlarmNotification; |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 9344567..842f6eb 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -78,11 +78,14 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) | |||
78 | { | 78 | { |
79 | #ifndef DESKTOP_VERSION | 79 | #ifndef DESKTOP_VERSION |
80 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 80 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
81 | #endif | 81 | #endif |
82 | new KNOWhatsThis(this); | 82 | mWT = new KNOWhatsThis(this); |
83 | } | ||
84 | KNoScrollListBox::~KNoScrollListBox() | ||
85 | { | ||
86 | delete mWT; | ||
83 | } | 87 | } |
84 | |||
85 | QString KNoScrollListBox::getWhatsThisText(QPoint p) | 88 | QString KNoScrollListBox::getWhatsThisText(QPoint p) |
86 | { | 89 | { |
87 | QListBoxItem* item = itemAt ( p ); | 90 | QListBoxItem* item = itemAt ( p ); |
88 | if ( ! item ) { | 91 | if ( ! item ) { |
@@ -307,22 +310,11 @@ QToolTipGroup *MonthViewCell::toolTipGroup() | |||
307 | 310 | ||
308 | void MonthViewCell::setDate( const QDate &date ) | 311 | void MonthViewCell::setDate( const QDate &date ) |
309 | { | 312 | { |
310 | // kdDebug() << "MonthViewCell::setDate(): " << date.toString() << endl; | 313 | // kdDebug() << "MonthViewCell::setDate(): " << date.toString() << endl; |
311 | |||
312 | mDate = date; | 314 | mDate = date; |
313 | 315 | ||
314 | QString text; | 316 | |
315 | bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; | ||
316 | if ( KOGlobals::self()->calendarSystem()->day( date ) == 1 || (date.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { | ||
317 | text = KOGlobals::self()->calendarSystem()->monthName( date, true ) + " "; | ||
318 | mLabel->resize( mLabelBigSize ); | ||
319 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | ||
320 | } else { | ||
321 | mLabel->resize( mLabelSize ); | ||
322 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | ||
323 | } | ||
324 | mLabel->setText( text ); | ||
325 | 317 | ||
326 | //resizeEvent( 0 ); | 318 | //resizeEvent( 0 ); |
327 | } | 319 | } |
328 | 320 | ||
@@ -391,17 +383,24 @@ void MonthViewCell::keyPressEvent ( QKeyEvent * e ) | |||
391 | 383 | ||
392 | } | 384 | } |
393 | void MonthViewCell::updateCell() | 385 | void MonthViewCell::updateCell() |
394 | { | 386 | { |
395 | 387 | if ( !mMonthView->isUpdatePossible() ) | |
388 | return; | ||
389 | if ( !isVisible() ){ | ||
390 | return; | ||
391 | } | ||
396 | setPrimary( mDate.month()%2 ); | 392 | setPrimary( mDate.month()%2 ); |
397 | setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); | 393 | setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); |
398 | if ( mDate == QDate::currentDate() ) { | 394 | if ( mDate == QDate::currentDate() ) { |
399 | mItemList->setLineWidth( 3 ); | 395 | mItemList->setLineWidth( 3 ); |
400 | } else { | 396 | } else { |
401 | mItemList->setLineWidth( 1 ); | 397 | mItemList->setLineWidth( 1 ); |
402 | } | 398 | } |
403 | mItemList->clear(); | 399 | mItemList->clear(); |
400 | |||
401 | |||
402 | |||
404 | #ifdef DESKTOP_VERSION | 403 | #ifdef DESKTOP_VERSION |
405 | QToolTip::remove(this); | 404 | QToolTip::remove(this); |
406 | #endif | 405 | #endif |
407 | QString tipText(""); | 406 | QString tipText(""); |
@@ -414,9 +413,18 @@ void MonthViewCell::updateCell() | |||
414 | } | 413 | } |
415 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); | 414 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); |
416 | QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); | 415 | QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); |
417 | Event *event; | 416 | Event *event; |
418 | for( event = events.first(); event; event = events.next() ) { | 417 | for( event = events.first(); event; event = events.next() ) { // for event |
418 | |||
419 | if ( !(event->doesRecur() == Recurrence::rNone) ) { | ||
420 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) | ||
421 | continue; | ||
422 | else | ||
423 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) | ||
424 | continue; | ||
425 | } | ||
426 | |||
419 | if ( event->categories().contains("Holiday") || | 427 | if ( event->categories().contains("Holiday") || |
420 | event->categories().contains(i18n("Holiday"))) { | 428 | event->categories().contains(i18n("Holiday"))) { |
421 | setHoliday( true ); | 429 | setHoliday( true ); |
422 | if ( mDate.dayOfWeek() == 7 ) | 430 | if ( mDate.dayOfWeek() == 7 ) |
@@ -482,8 +490,9 @@ void MonthViewCell::updateCell() | |||
482 | item->setPalette( pal ); | 490 | item->setPalette( pal ); |
483 | item->setRecur( event->recurrence()->doesRecur() ); | 491 | item->setRecur( event->recurrence()->doesRecur() ); |
484 | item->setAlarm( event->isAlarmEnabled() ); | 492 | item->setAlarm( event->isAlarmEnabled() ); |
485 | item->setMoreInfo( event->description().length() > 0 ); | 493 | item->setMoreInfo( event->description().length() > 0 ); |
494 | #ifdef DESKTOP_VERSION | ||
486 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, | 495 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, |
487 | KOPrefs::instance()->email()); | 496 | KOPrefs::instance()->email()); |
488 | if ( me != 0 ) { | 497 | if ( me != 0 ) { |
489 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) | 498 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) |
@@ -491,22 +500,12 @@ void MonthViewCell::updateCell() | |||
491 | else | 500 | else |
492 | item->setReply(false); | 501 | item->setReply(false); |
493 | } else | 502 | } else |
494 | item->setReply(false); | 503 | item->setReply(false); |
495 | bool insert = true; | 504 | #endif |
496 | if ( !(event->doesRecur() == Recurrence::rNone) ) { | 505 | mItemList->insertItem( item ); |
497 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) | 506 | tipText += "\n"; |
498 | insert = false; | 507 | |
499 | else | ||
500 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) | ||
501 | insert = false; | ||
502 | |||
503 | } | ||
504 | if ( insert ) { | ||
505 | mItemList->insertItem( item ); | ||
506 | tipText += "\n"; | ||
507 | } else | ||
508 | tipText = ""; | ||
509 | } | 508 | } |
510 | 509 | ||
511 | // insert due todos | 510 | // insert due todos |
512 | QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); | 511 | QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); |
@@ -556,11 +555,22 @@ void MonthViewCell::updateCell() | |||
556 | #endif | 555 | #endif |
557 | 556 | ||
558 | //setMyPalette(); | 557 | //setMyPalette(); |
559 | setMyPalette(); | 558 | setMyPalette(); |
559 | QString text; | ||
560 | bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; | ||
561 | if ( KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { | ||
562 | text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; | ||
563 | mLabel->resize( mLabelBigSize ); | ||
564 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | ||
565 | } else { | ||
566 | mLabel->resize( mLabelSize ); | ||
567 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | ||
568 | } | ||
569 | mLabel->setText( text ); | ||
560 | resizeEvent( 0 ); | 570 | resizeEvent( 0 ); |
561 | // if ( isVisible()) | 571 | // if ( isVisible()) |
562 | // qApp->processEvents(); | 572 | qApp->processEvents(); |
563 | } | 573 | } |
564 | 574 | ||
565 | void MonthViewCell::updateConfig() | 575 | void MonthViewCell::updateConfig() |
566 | { | 576 | { |
@@ -637,8 +647,13 @@ void MonthViewCell::select() | |||
637 | } | 647 | } |
638 | 648 | ||
639 | void MonthViewCell::resizeEvent ( QResizeEvent * ) | 649 | void MonthViewCell::resizeEvent ( QResizeEvent * ) |
640 | { | 650 | { |
651 | if ( !mMonthView->isUpdatePossible() ) | ||
652 | return; | ||
653 | if ( !isVisible() ){ | ||
654 | return; | ||
655 | } | ||
641 | int size = height() - mLabel->height(); | 656 | int size = height() - mLabel->height(); |
642 | if ( size > 0 ) | 657 | if ( size > 0 ) |
643 | mItemList->verticalScrollBar()->setMaximumHeight( size ); | 658 | mItemList->verticalScrollBar()->setMaximumHeight( size ); |
644 | size = width() - mLabel->width(); | 659 | size = width() - mLabel->width(); |
@@ -712,8 +727,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
712 | : KOEventView( calendar, parent, name ), | 727 | : KOEventView( calendar, parent, name ), |
713 | mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), | 728 | mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), |
714 | mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) | 729 | mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) |
715 | { | 730 | { |
731 | updatePossible = false; | ||
716 | mCells.setAutoDelete( true ); | 732 | mCells.setAutoDelete( true ); |
717 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | 733 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; |
718 | // mDayLayout = new QGridLayout( this ); | 734 | // mDayLayout = new QGridLayout( this ); |
719 | // create the day of the week labels (Sun, Mon, etc) and add them to | 735 | // create the day of the week labels (Sun, Mon, etc) and add them to |
@@ -919,9 +935,12 @@ void KOMonthView::changeEventDisplay(Event *, int) | |||
919 | } | 935 | } |
920 | 936 | ||
921 | void KOMonthView::updateView() | 937 | void KOMonthView::updateView() |
922 | { | 938 | { |
923 | 939 | static int iii = 0; | |
940 | ++iii; | ||
941 | if ( !updatePossible ) | ||
942 | return; | ||
924 | uint i; | 943 | uint i; |
925 | for( i = 0; i < mCells.count(); ++i ) { | 944 | for( i = 0; i < mCells.count(); ++i ) { |
926 | mCells[i]->updateCell(); | 945 | mCells[i]->updateCell(); |
927 | } | 946 | } |
@@ -953,9 +972,9 @@ void KOMonthView::computeLayout() | |||
953 | int hei = size().height()-1; | 972 | int hei = size().height()-1; |
954 | 973 | ||
955 | if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) | 974 | if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) |
956 | return; | 975 | return; |
957 | 976 | //qDebug("KOMonthView::computeLayout()------------------------------------ "); | |
958 | QFontMetrics fm ( mWeekLabels[0]->font() ); | 977 | QFontMetrics fm ( mWeekLabels[0]->font() ); |
959 | int weeklabelwid = fm.width( "888" ); | 978 | int weeklabelwid = fm.width( "888" ); |
960 | wid -= weeklabelwid; | 979 | wid -= weeklabelwid; |
961 | 980 | ||
@@ -1031,8 +1050,12 @@ void KOMonthView::computeLayout() | |||
1031 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); | 1050 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); |
1032 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1051 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1033 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; | 1052 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; |
1034 | updateDayLabels(); | 1053 | updateDayLabels(); |
1054 | bool forceUpdate = !updatePossible; | ||
1055 | updatePossible = true; | ||
1056 | if ( forceUpdate ) | ||
1057 | updateView(); | ||
1035 | } | 1058 | } |
1036 | 1059 | ||
1037 | void KOMonthView::showContextMenu( Incidence *incidence ) | 1060 | void KOMonthView::showContextMenu( Incidence *incidence ) |
1038 | { | 1061 | { |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 4c1567c..727f511 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -39,8 +39,9 @@ | |||
39 | #ifdef DESKTOP_VERSION | 39 | #ifdef DESKTOP_VERSION |
40 | class QToolTipGroup; | 40 | class QToolTipGroup; |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | class KNOWhatsThis; | ||
43 | class KOWeekButton : public QPushButton | 44 | class KOWeekButton : public QPushButton |
44 | { | 45 | { |
45 | Q_OBJECT | 46 | Q_OBJECT |
46 | public: | 47 | public: |
@@ -64,9 +65,9 @@ class KNoScrollListBox: public QListBox | |||
64 | { | 65 | { |
65 | Q_OBJECT | 66 | Q_OBJECT |
66 | public: | 67 | public: |
67 | KNoScrollListBox(QWidget *parent=0, const char *name=0); | 68 | KNoScrollListBox(QWidget *parent=0, const char *name=0); |
68 | ~KNoScrollListBox() {} | 69 | ~KNoScrollListBox(); |
69 | QString getWhatsThisText(QPoint p) ; | 70 | QString getWhatsThisText(QPoint p) ; |
70 | 71 | ||
71 | signals: | 72 | signals: |
72 | void shiftDown(); | 73 | void shiftDown(); |
@@ -76,8 +77,11 @@ class KNoScrollListBox: public QListBox | |||
76 | protected slots: | 77 | protected slots: |
77 | void keyPressEvent(QKeyEvent *); | 78 | void keyPressEvent(QKeyEvent *); |
78 | void keyReleaseEvent(QKeyEvent *); | 79 | void keyReleaseEvent(QKeyEvent *); |
79 | void mousePressEvent(QMouseEvent *); | 80 | void mousePressEvent(QMouseEvent *); |
81 | |||
82 | private: | ||
83 | KNOWhatsThis * mWT; | ||
80 | }; | 84 | }; |
81 | 85 | ||
82 | 86 | ||
83 | class MonthViewItem: public QListBoxItem | 87 | class MonthViewItem: public QListBoxItem |
@@ -211,8 +215,9 @@ class KOMonthView: public KOEventView | |||
211 | 215 | ||
212 | virtual void printPreview(CalPrinter *calPrinter, | 216 | virtual void printPreview(CalPrinter *calPrinter, |
213 | const QDate &, const QDate &); | 217 | const QDate &, const QDate &); |
214 | bool isMonthView() { return true; } | 218 | bool isMonthView() { return true; } |
219 | bool isUpdatePossible() { return updatePossible; } | ||
215 | 220 | ||
216 | MonthViewCell * selectedCell(); | 221 | MonthViewCell * selectedCell(); |
217 | public slots: | 222 | public slots: |
218 | virtual void updateView(); | 223 | virtual void updateView(); |
@@ -238,8 +243,9 @@ class KOMonthView: public KOEventView | |||
238 | void viewChanged(); | 243 | void viewChanged(); |
239 | void updateDayLabels(); | 244 | void updateDayLabels(); |
240 | 245 | ||
241 | private: | 246 | private: |
247 | bool updatePossible; | ||
242 | int mDaysPerWeek; | 248 | int mDaysPerWeek; |
243 | int mNumWeeks; | 249 | int mNumWeeks; |
244 | int mNumCells; | 250 | int mNumCells; |
245 | bool mWeekStartsMonday; | 251 | bool mWeekStartsMonday; |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index cf56fcf..00a5842 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -44,8 +44,9 @@ | |||
44 | #include "kojournalview.h" | 44 | #include "kojournalview.h" |
45 | #include "kotimespanview.h" | 45 | #include "kotimespanview.h" |
46 | #include "koprefs.h" | 46 | #include "koprefs.h" |
47 | #include "navigatorbar.h" | 47 | #include "navigatorbar.h" |
48 | #include "kdatenavigator.h" | ||
48 | 49 | ||
49 | #include "koviewmanager.h" | 50 | #include "koviewmanager.h" |
50 | //extern bool externFlagMonthviewBlockPainting; | 51 | //extern bool externFlagMonthviewBlockPainting; |
51 | 52 | ||
@@ -275,10 +276,13 @@ void KOViewManager::showListView() | |||
275 | } | 276 | } |
276 | // bool temp = mFlagShowNextxDays; | 277 | // bool temp = mFlagShowNextxDays; |
277 | //globalFlagBlockPainting = true; | 278 | //globalFlagBlockPainting = true; |
278 | globalFlagBlockAgenda = 1; | 279 | globalFlagBlockAgenda = 1; |
279 | if ( KOPrefs::instance()->mListViewMonthTimespan ) | 280 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { |
281 | mMainView->setBlockShowDates( true ); | ||
280 | mMainView->dateNavigator()->selectMonth(); | 282 | mMainView->dateNavigator()->selectMonth(); |
283 | mMainView->setBlockShowDates( false ); | ||
284 | } | ||
281 | showView(mListView, KOPrefs::instance()->mFullViewTodo); | 285 | showView(mListView, KOPrefs::instance()->mFullViewTodo); |
282 | //mFlagShowNextxDays = temp; | 286 | //mFlagShowNextxDays = temp; |
283 | } | 287 | } |
284 | 288 | ||