author | zautrix <zautrix> | 2005-03-21 13:08:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-21 13:08:02 (UTC) |
commit | 098a3c6dd844a880beb2851be53314613c3a038d (patch) (unidiff) | |
tree | bac6a915e906760c48b1756c5b0564b04def0b63 /korganizer/datenavigatorcontainer.cpp | |
parent | ad4ecbb0cbf79f37140041eb9a14e71e6fd393f1 (diff) | |
download | kdepimpi-098a3c6dd844a880beb2851be53314613c3a038d.zip kdepimpi-098a3c6dd844a880beb2851be53314613c3a038d.tar.gz kdepimpi-098a3c6dd844a880beb2851be53314613c3a038d.tar.bz2 |
fixes
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 5941337..d4173e8 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp | |||
@@ -139,49 +139,50 @@ void DateNavigatorContainer::setBaseDates() | |||
139 | { | 139 | { |
140 | KCal::DateList dateList = mNavigatorView->selectedDates(); | 140 | KCal::DateList dateList = mNavigatorView->selectedDates(); |
141 | if ( dateList.isEmpty() ) { | 141 | if ( dateList.isEmpty() ) { |
142 | kdError() << "DateNavigatorContainer::selectDates() empty list." << endl; | 142 | kdError() << "DateNavigatorContainer::selectDates() empty list." << endl; |
143 | } | 143 | } |
144 | QDate baseDate = dateList.first(); | 144 | QDate baseDate = dateList.first(); |
145 | KDateNavigator *n; | 145 | KDateNavigator *n; |
146 | bool doRepaint = false; // skip first repaint | 146 | bool doRepaint = false; // skip first repaint |
147 | for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { | 147 | for( n = mExtraViews.first(); n; n = mExtraViews.next() ) { |
148 | baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); | 148 | baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); |
149 | n->setBaseDate( baseDate, doRepaint ); | 149 | n->setBaseDate( baseDate, doRepaint ); |
150 | doRepaint = true; | 150 | doRepaint = true; |
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) | 154 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) |
155 | { | 155 | { |
156 | #if 0 | 156 | #if 0 |
157 | kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl; | 157 | kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl; |
158 | kdDebug(5850) << " CURRENT SIZE: " << size() << endl; | 158 | kdDebug(5850) << " CURRENT SIZE: " << size() << endl; |
159 | kdDebug(5850) << " MINIMUM SIZEHINT: " << minimumSizeHint() << endl; | 159 | kdDebug(5850) << " MINIMUM SIZEHINT: " << minimumSizeHint() << endl; |
160 | kdDebug(5850) << " SIZEHINT: " << sizeHint() << endl; | 160 | kdDebug(5850) << " SIZEHINT: " << sizeHint() << endl; |
161 | kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl; | 161 | kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl; |
162 | #endif | 162 | #endif |
163 | QSize minSize = mNavigatorView->sizeHintTwoButtons(); | 163 | //QSize minSize = mNavigatorView->sizeHintTwoButtons(); |
164 | QSize minSize = mNavigatorView->yourSizeHint(); | ||
164 | 165 | ||
165 | // kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl; | 166 | // kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl; |
166 | 167 | ||
167 | int verticalCount = size().height() / minSize.height(); | 168 | int verticalCount = size().height() / minSize.height(); |
168 | int horizontalCount = size().width() / minSize.width(); | 169 | int horizontalCount = size().width() / minSize.width(); |
169 | //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() ); | 170 | //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() ); |
170 | //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); | 171 | //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); |
171 | bool fontchange = false; | 172 | bool fontchange = false; |
172 | QFont fo; | 173 | QFont fo; |
173 | if ( horizontalCount != mHorizontalCount || | 174 | if ( horizontalCount != mHorizontalCount || |
174 | verticalCount != mVerticalCount ) { | 175 | verticalCount != mVerticalCount ) { |
175 | uint count = horizontalCount * verticalCount; | 176 | uint count = horizontalCount * verticalCount; |
176 | if ( count == 0 ) { | 177 | if ( count == 0 ) { |
177 | bool ok; | 178 | bool ok; |
178 | fo = mNavigatorView->yourFontHint( size() , &ok); | 179 | fo = mNavigatorView->yourFontHint( size() , &ok); |
179 | //mNavigatorView->resize( size() ); | 180 | //mNavigatorView->resize( size() ); |
180 | //if ( ! ok ) | 181 | //if ( ! ok ) |
181 | // return; | 182 | // return; |
182 | minSize = mNavigatorView->sizeHintTwoButtons(); | 183 | minSize = mNavigatorView->sizeHintTwoButtons(); |
183 | verticalCount = size().height() / minSize.height(); | 184 | verticalCount = size().height() / minSize.height(); |
184 | horizontalCount = size().width() / minSize.width(); | 185 | horizontalCount = size().width() / minSize.width(); |
185 | if ( horizontalCount == 0 ) | 186 | if ( horizontalCount == 0 ) |
186 | horizontalCount = 1; | 187 | horizontalCount = 1; |
187 | if ( verticalCount == 0 ) | 188 | if ( verticalCount == 0 ) |