summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/datenavigatorcontainer.cpp20
-rw-r--r--korganizer/kdatenavigator.cpp7
-rw-r--r--korganizer/kdatenavigator.h5
-rw-r--r--korganizer/kodaymatrix.cpp2
5 files changed, 24 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 29c530b..9acbbb1 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1858,3 +1858,2 @@ void CalendarView::readSettings()
1858 mLeftFrame->setSizes(sizes); 1858 mLeftFrame->setSizes(sizes);
1859 qDebug("sizes count %d ", sizes.count());
1860 if ( dateCount == 5 ) mNavigator->selectWorkWeek(); 1859 if ( dateCount == 5 ) mNavigator->selectWorkWeek();
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 3f6e29b..d09f484 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -129,2 +129,7 @@ void DateNavigatorContainer::selectDates( const DateList &dateList )
129 setBaseDates(); 129 setBaseDates();
130 if ( mExtraViews.count() ) {
131 KDateNavigator *view = mExtraViews.at( 0 );
132 view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end()));
133 view->dayMatrix()->repaint();
134 }
130} 135}
@@ -139,5 +144,7 @@ void DateNavigatorContainer::setBaseDates()
139 KDateNavigator *n; 144 KDateNavigator *n;
145 bool doRepaint = false; // skip first repaint
140 for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { 146 for( n = mExtraViews.first(); n; n = mExtraViews.next() ) {
141 baseDate = baseDate.addDays( baseDate.daysInMonth () ); 147 baseDate = baseDate.addDays( baseDate.daysInMonth () );
142 n->setBaseDate( baseDate ); 148 n->setBaseDate( baseDate, doRepaint );
149 doRepaint = true;
143 } 150 }
@@ -145,3 +152,3 @@ void DateNavigatorContainer::setBaseDates()
145 152
146void DateNavigatorContainer::resizeEvent( QResizeEvent * ) 153void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
147{ 154{
@@ -154,4 +161,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
154#endif 161#endif
155 162 QSize minSize = mNavigatorView->yourSizeHint();
156 QSize minSize = mNavigatorView->minimumSizeHint();
157 163
@@ -161,2 +167,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
161 int horizontalCount = size().width() / minSize.width(); 167 int horizontalCount = size().width() / minSize.width();
168 //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() );
162 //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); 169 //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount );
@@ -165,3 +172,6 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
165 uint count = horizontalCount * verticalCount; 172 uint count = horizontalCount * verticalCount;
166 if ( count == 0 ) return; 173 if ( count == 0 ) {
174 mNavigatorView->resize( minSize );
175 return;
176 }
167 177
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index ab9a40f..b097dc1 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -117,3 +117,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
117 enableRollover(FollowMonth); 117 enableRollover(FollowMonth);
118 //setFixedSize ( sizeHint() ); 118 mySizeHint = sizeHint();
119} 119}
@@ -132,3 +132,3 @@ void KDateNavigator::setCalendar( Calendar *cal )
132 132
133void KDateNavigator::setBaseDate( const QDate &date ) 133void KDateNavigator::setBaseDate( const QDate &date , bool doRepaint ) // = true
134{ 134{
@@ -144,3 +144,4 @@ void KDateNavigator::setBaseDate( const QDate &date )
144 daymatrix->clearSelection(); 144 daymatrix->clearSelection();
145 daymatrix->repaint(); 145 if ( doRepaint )
146 daymatrix->repaint();
146} 147}
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 56822fa..292e71c 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -62,3 +62,3 @@ class KDateNavigator: public QFrame
62 void setCalendar( Calendar * ); 62 void setCalendar( Calendar * );
63 void setBaseDate( const QDate & ); 63 void setBaseDate( const QDate & , bool doRepaint = true );
64 KCal::DateList selectedDates() const { return mSelectedDates; } 64 KCal::DateList selectedDates() const { return mSelectedDates; }
@@ -66,2 +66,4 @@ class KDateNavigator: public QFrame
66 void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off;} 66 void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off;}
67 QSize yourSizeHint() { return mySizeHint; }
68 KODayMatrix *dayMatrix() { return daymatrix ;}
67 public slots: 69 public slots:
@@ -116,2 +118,3 @@ class KDateNavigator: public QFrame
116 private: 118 private:
119 QSize mySizeHint;
117 int mMonthSignalOffset; 120 int mMonthSignalOffset;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index a886f4a..17a8546 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -203,3 +203,3 @@ void KODayMatrix::clearSelection()
203{ 203{
204 mSelEnd = mSelStart = NOSELECTION; 204 mSelEnd = mSelStart = NOSELECTION;
205} 205}