-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 74 | ||||
-rw-r--r-- | korganizer/datenavigatorcontainer.h | 8 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 4 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 18 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
6 files changed, 65 insertions, 45 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index d1caff3..2290c53 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp | |||
@@ -73,63 +73,77 @@ void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v ) | |||
73 | 73 | ||
74 | connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) ); | 74 | connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) ); |
75 | connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) ); | 75 | connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) ); |
76 | 76 | ||
77 | connect( v, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) ); | 77 | connect( v, SIGNAL( goNextMonth() ), SLOT( slotgoNextMonth() ) ); |
78 | connect( v, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) ); | 78 | connect( v, SIGNAL( goPrevMonth() ), SLOT( slotgoPrevMonth() ) ); |
79 | connect( v, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) ); | 79 | connect( v, SIGNAL( goNextYear() ), SLOT( slotgoNextYear() ) ); |
80 | connect( v, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) ); | 80 | connect( v, SIGNAL( goPrevYear() ), SLOT( slotgoPrevYear() ) ); |
81 | 81 | ||
82 | connect( v, SIGNAL( monthSelected( int ) ), SLOT( slotMonthSelected( int ) ) ); | 82 | connect( v, SIGNAL( monthSelected( int ) ), SLOT( slotMonthSelected( int ) ) ); |
83 | } | 83 | } |
84 | void DateNavigatorContainer::slotgoNextYear() | ||
85 | { | ||
86 | jumpMonth( 12 ); | ||
87 | emit goNextYear(); | ||
88 | |||
89 | } | ||
90 | void DateNavigatorContainer::slotgoPrevYear() | ||
91 | { | ||
92 | jumpMonth( -12 ); | ||
93 | emit goPrevYear(); | ||
94 | |||
95 | } | ||
96 | void DateNavigatorContainer::slotgoPrevMonth() | ||
97 | { | ||
98 | jumpMonth( -1 ); | ||
99 | emit goPrevMonth(); | ||
100 | |||
101 | } | ||
102 | void DateNavigatorContainer::slotgoNextMonth() | ||
103 | { | ||
104 | jumpMonth( 1 ); | ||
105 | emit goNextMonth(); | ||
106 | } | ||
107 | void DateNavigatorContainer::jumpMonth( int month ) | ||
108 | { | ||
84 | 109 | ||
110 | QDate baseDate = mNavigatorView->baseDate(); | ||
111 | computeMonthSelected( baseDate.month() + month, false ); | ||
112 | } | ||
85 | void DateNavigatorContainer::slotMonthSelected( int month ) | 113 | void DateNavigatorContainer::slotMonthSelected( int month ) |
86 | { | 114 | { |
87 | //qDebug("slotMonthSelected %d ", month); | 115 | computeMonthSelected( month, true ); |
116 | } | ||
117 | void DateNavigatorContainer::computeMonthSelected( int month , bool forceEmit ) | ||
118 | { | ||
119 | //qDebug("slotMonthSelected %d ", month); | ||
88 | QDate baseDate = mNavigatorView->baseDate(); | 120 | QDate baseDate = mNavigatorView->baseDate(); |
89 | if ( baseDate.month() == month ) | 121 | if ( baseDate.month() == month ) |
90 | return; | 122 | return; |
91 | //qDebug("month %d %d ",baseDate.month(),month); | 123 | //qDebug("month %d %d ",baseDate.month(),month); |
92 | QDate date = QDate ( baseDate.year(), baseDate.month() , 15 ); | 124 | QDate date = QDate ( baseDate.year(), baseDate.month() , 15 ); |
93 | date = date.addDays( -(baseDate.month()-month ) *30 ); | 125 | date = date.addDays( -(baseDate.month()-month ) *30 ); |
94 | QDate newBase = QDate ( date.year(), date.month() , baseDate.day() ); | 126 | QDate newBase = QDate ( date.year(), date.month() , baseDate.day() ); |
95 | 127 | ||
96 | #if 0 | ||
97 | mFirstSelectedDate = dateList.first() ; | ||
98 | mSelectedDateCount = dateList.count() ; | ||
99 | |||
100 | KDateNavigator *view = mExtraViews.at( 0 ); | ||
101 | QDate date = view->baseDate(); | ||
102 | |||
103 | QDate curEnd = date.addDays( (mLastDisplayedDN)*30 +7); | ||
104 | //qDebug("End %s %s ",lDate.toString().latin1(),curEnd.toString().latin1() ); | ||
105 | if ( lDate < curEnd && date.addDays( -30 ) < fDate) { | ||
106 | mNavigatorView->dayMatrix()->setSelectedDaysFrom( fDate , lDate ); | ||
107 | mNavigatorView->dayMatrix()->repaint( false ); | ||
108 | for( uint i = 0; i < mLastDisplayedDN; ++i ) { | ||
109 | KDateNavigator *n = mExtraViews.at( i ); | ||
110 | if ( n->dayMatrix()->setSelectedDaysFrom( fDate , lDate ) ) { | ||
111 | n->dayMatrix()->repaint( false ); | ||
112 | } | ||
113 | } | ||
114 | return; | ||
115 | } | ||
116 | #endif | ||
117 | //qDebug("NEW BASE %s", newBase.toString().latin1()); | 128 | //qDebug("NEW BASE %s", newBase.toString().latin1()); |
118 | mNavigatorView->setBaseDate( newBase ); | 129 | mNavigatorView->setBaseDate( newBase ); |
119 | QDate last = lastAvailableDate(); | 130 | QDate last = lastAvailableDate(); |
120 | QDate first = firstAvailableDate(); | 131 | QDate first = firstAvailableDate(); |
121 | 132 | ||
122 | QDate selFirst = mFirstSelectedDate; | 133 | QDate selFirst = mFirstSelectedDate; |
123 | QDate selLast = selFirst.addDays( mSelectedDateCount-1 ); | 134 | QDate selLast = selFirst.addDays( mSelectedDateCount-1 ); |
124 | if ( selFirst >= first && selLast <= last ) { | 135 | if ( selFirst >= first && selLast <= last ) { |
125 | setBaseDates(); | 136 | setBaseDates(); |
126 | updateDayMatrixDates(); | 137 | if ( forceEmit ) |
138 | updateDayMatrixDates(); | ||
127 | } | 139 | } |
128 | else { | 140 | else { |
129 | setBaseDates(); | 141 | setBaseDates(); |
130 | updateDayMatrixDates(); | 142 | if ( forceEmit ) |
131 | emit monthSelected( month ); | 143 | updateDayMatrixDates(); |
144 | if ( forceEmit ) | ||
145 | emit monthSelected( month ); | ||
132 | } | 146 | } |
133 | } | 147 | } |
134 | void DateNavigatorContainer::setCalendar( Calendar *cal ) | 148 | void DateNavigatorContainer::setCalendar( Calendar *cal ) |
135 | { | 149 | { |
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index 9a64720..d2f397d 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h | |||
@@ -57,9 +57,13 @@ class DateNavigatorContainer: public QWidget | |||
57 | void updateDayMatrix(); | 57 | void updateDayMatrix(); |
58 | void updateDayMatrixDates(); | 58 | void updateDayMatrixDates(); |
59 | void checkUpdateDayMatrixDates(); | 59 | void checkUpdateDayMatrixDates(); |
60 | void updateToday(); | 60 | void updateToday(); |
61 | void slotMonthSelected( int month ); | 61 | void slotMonthSelected( int month ); |
62 | void slotgoNextMonth(); | ||
63 | void slotgoPrevMonth(); | ||
64 | void slotgoNextYear(); | ||
65 | void slotgoPrevYear(); | ||
62 | 66 | ||
63 | signals: | 67 | signals: |
64 | void datesSelected( const KCal::DateList & ); | 68 | void datesSelected( const KCal::DateList & ); |
65 | void incidenceDropped( Incidence *, const QDate & ); | 69 | void incidenceDropped( Incidence *, const QDate & ); |
@@ -76,8 +80,10 @@ class DateNavigatorContainer: public QWidget | |||
76 | 80 | ||
77 | void monthSelected( int month ); | 81 | void monthSelected( int month ); |
78 | 82 | ||
79 | protected: | 83 | protected: |
84 | void computeMonthSelected( int month , bool forceEmit ); | ||
85 | void jumpMonth( int month ); | ||
80 | void resizeEvent( QResizeEvent * ); | 86 | void resizeEvent( QResizeEvent * ); |
81 | 87 | ||
82 | void setBaseDates(); | 88 | void setBaseDates(); |
83 | void connectNavigatorView( KDateNavigator *v ); | 89 | void connectNavigatorView( KDateNavigator *v ); |
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index d62402f..6438c9a 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp | |||
@@ -118,9 +118,9 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) | |||
118 | enableRollover(FollowMonth); | 118 | enableRollover(FollowMonth); |
119 | mySizeHint = sizeHintTwoButtons(); | 119 | mySizeHint = sizeHintTwoButtons(); |
120 | myFullSizeHint = sizeHintTwoButtons( 4 ); | 120 | myFullSizeHint = sizeHintTwoButtons( 4 ); |
121 | mFontChanged = false; | 121 | mFontChanged = false; |
122 | resize ( mySizeHint ); | 122 | resize ( 0,0 ); |
123 | } | 123 | } |
124 | void KDateNavigator::changeFont ( QFont fo ) | 124 | void KDateNavigator::changeFont ( QFont fo ) |
125 | { | 125 | { |
126 | setFont( fo ); | 126 | setFont( fo ); |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 82d1eab..b30ad75 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -504,16 +504,16 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) | |||
504 | rw = rw + xx; | 504 | rw = rw + xx; |
505 | rx -= xx; | 505 | rx -= xx; |
506 | xx = 0; | 506 | xx = 0; |
507 | if ( rw <= 1 ) { | 507 | if ( rw <= 1 ) { |
508 | qDebug("KOAgendaItem::Width1 <= 1 (%d). Returning. %s",rw,mDisplayedText.latin1()); | 508 | //qDebug("KOAgendaItem::Width1 <= 1 (%d). Returning. %s",rw,mDisplayedText.latin1()); |
509 | return; | 509 | return; |
510 | } | 510 | } |
511 | } | 511 | } |
512 | if ( paintFrom->width() < xx+rw ) { | 512 | if ( paintFrom->width() < xx+rw ) { |
513 | rw = paintFrom->width() - xx; | 513 | rw = paintFrom->width() - xx; |
514 | if ( rw <= 1 ) { | 514 | if ( rw <= 1 ) { |
515 | qDebug("KOAgendaItem::Width2 <= 1 (%d). Returning.%s ",rw,mDisplayedText.latin1() ); | 515 | //qDebug("KOAgendaItem::Width2 <= 1 (%d). Returning.%s ",rw,mDisplayedText.latin1() ); |
516 | return; | 516 | return; |
517 | } | 517 | } |
518 | } | 518 | } |
519 | //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh); | 519 | //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh); |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 40e8a99..74037e6 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -589,17 +589,9 @@ void KOPrefsDialog::setupViewsTab() | |||
589 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 589 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
590 | 590 | ||
591 | 591 | ||
592 | 592 | ||
593 | if ( QApplication::desktop()->width() > 640 ) { | 593 | |
594 | |||
595 | KPrefsDialogWidBool *enableToolTips = | ||
596 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | ||
597 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | ||
598 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | ||
599 | |||
600 | } | ||
601 | |||
602 | 594 | ||
603 | 595 | ||
604 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 596 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
605 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 597 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
@@ -660,8 +652,16 @@ void KOPrefsDialog::setupViewsTab() | |||
660 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 652 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
661 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 653 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
662 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 654 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
663 | 655 | ||
656 | |||
657 | KPrefsDialogWidBool *enableToolTips = | ||
658 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | ||
659 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | ||
660 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | ||
661 | |||
662 | // ********************************************************* | ||
663 | |||
664 | topFrame = addPage(i18n("Agenda View"),0,0); | 664 | topFrame = addPage(i18n("Agenda View"),0,0); |
665 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 665 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
666 | 666 | ||
667 | topLayout = new QGridLayout(topFrame,5,1); | 667 | topLayout = new QGridLayout(topFrame,5,1); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index bd9efc8..7faf675 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -999,8 +999,10 @@ void MainWindow::initActions() | |||
999 | if (p->mShowIconNewTodo ) | 999 | if (p->mShowIconNewTodo ) |
1000 | nt_action->addTo( iconToolBar ); | 1000 | nt_action->addTo( iconToolBar ); |
1001 | if (p-> mShowIconSearch) | 1001 | if (p-> mShowIconSearch) |
1002 | search_action->addTo( iconToolBar ); | 1002 | search_action->addTo( iconToolBar ); |
1003 | if (p-> mShowIconWhatsThis) | ||
1004 | QWhatsThis::whatsThisButton ( iconToolBar ); | ||
1003 | if (p-> mShowIconNext) | 1005 | if (p-> mShowIconNext) |
1004 | whatsnext_action->addTo( iconToolBar ); | 1006 | whatsnext_action->addTo( iconToolBar ); |
1005 | if (p-> mShowIconNextDays) | 1007 | if (p-> mShowIconNextDays) |
1006 | xdays_action->addTo( iconToolBar ); | 1008 | xdays_action->addTo( iconToolBar ); |
@@ -1105,10 +1107,8 @@ void MainWindow::initActions() | |||
1105 | if (!p-> mShowIconStretch) | 1107 | if (!p-> mShowIconStretch) |
1106 | iconToolBar->setStretchableWidget ( dummy ) ; | 1108 | iconToolBar->setStretchableWidget ( dummy ) ; |
1107 | else | 1109 | else |
1108 | configureToolBarMenu->setItemChecked( 5, true ); | 1110 | configureToolBarMenu->setItemChecked( 5, true ); |
1109 | if (p-> mShowIconWhatsThis) | ||
1110 | QWhatsThis::whatsThisButton ( iconToolBar ); | ||
1111 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1111 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1112 | configureAgenda( p->mHourSize ); | 1112 | configureAgenda( p->mHourSize ); |
1113 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1113 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1114 | } | 1114 | } |