author | zautrix <zautrix> | 2005-03-25 15:07:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-25 15:07:31 (UTC) |
commit | 3326831dbf6f962e97a978781361db5198f6a035 (patch) (unidiff) | |
tree | 9bf6e78ba06b0db2e321ee8f8b95e66b66cca852 | |
parent | 5a0130ffdbf03fa5b881f856b41d081e91e1958b (diff) | |
download | kdepimpi-3326831dbf6f962e97a978781361db5198f6a035.zip kdepimpi-3326831dbf6f962e97a978781361db5198f6a035.tar.gz kdepimpi-3326831dbf6f962e97a978781361db5198f6a035.tar.bz2 |
layout fix
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 42 | ||||
-rw-r--r-- | korganizer/datenavigatorcontainer.h | 2 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 3 |
4 files changed, 33 insertions, 16 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 9a4e719..6ed6a1c 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1919,5 +1919,4 @@ void CalendarView::readSettings() | |||
1919 | } | 1919 | } |
1920 | mMainFrame->setSizes(sizes); | 1920 | mMainFrame->setSizes(sizes); |
1921 | |||
1922 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); | 1921 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); |
1923 | else if ( dateCount == 7 ) mNavigator->selectWeek(); | 1922 | else if ( dateCount == 7 ) mNavigator->selectWeek(); |
@@ -1927,4 +1926,5 @@ void CalendarView::readSettings() | |||
1927 | globalFlagBlockAgenda = 2; | 1926 | globalFlagBlockAgenda = 2; |
1928 | mViewManager->readSettings( config ); | 1927 | mViewManager->readSettings( config ); |
1928 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); | ||
1929 | } | 1929 | } |
1930 | 1930 | ||
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 2290c53..11dc592 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp | |||
@@ -41,8 +41,9 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, | |||
41 | mHorizontalCount( 1 ), mVerticalCount( 1 ) | 41 | mHorizontalCount( 1 ), mVerticalCount( 1 ) |
42 | { | 42 | { |
43 | mResizeEnabled = false; | ||
43 | mExtraViews.setAutoDelete( true ); | 44 | mExtraViews.setAutoDelete( true ); |
44 | 45 | ||
45 | mNavigatorView = new KDateNavigator( this, name ); | 46 | mNavigatorView = new KDateNavigator( this, name ); |
46 | 47 | mNavigatorView->hide(); | |
47 | connectNavigatorView( mNavigatorView ); | 48 | connectNavigatorView( mNavigatorView ); |
48 | //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | 49 | //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); |
@@ -219,14 +220,7 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() | |||
219 | n->setCalendar( mCalendar ); | 220 | n->setCalendar( mCalendar ); |
220 | connectNavigatorView( n ); | 221 | connectNavigatorView( n ); |
221 | n->show(); | 222 | // n->show(); |
222 | } | ||
223 | int iii = 0; | ||
224 | while ( iii < ( mExtraViews.count() ) ) { | ||
225 | if ( iii < count-1 ) | ||
226 | mExtraViews.at( iii )->show(); | ||
227 | else | ||
228 | mExtraViews.at( iii )->hide(); | ||
229 | ++iii; | ||
230 | } | 223 | } |
224 | |||
231 | 225 | ||
232 | setBaseDates(); | 226 | setBaseDates(); |
@@ -267,4 +261,14 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() | |||
267 | y * theight, twidth, theight ); | 261 | y * theight, twidth, theight ); |
268 | } | 262 | } |
263 | int iii = 0; | ||
264 | int ccc = mHorizontalCount * mVerticalCount; | ||
265 | mNavigatorView->show(); | ||
266 | while ( iii < ( mExtraViews.count() ) ) { | ||
267 | if ( iii < ccc-1 ) | ||
268 | mExtraViews.at( iii )->show(); | ||
269 | else | ||
270 | mExtraViews.at( iii )->hide(); | ||
271 | ++iii; | ||
272 | } | ||
269 | } | 273 | } |
270 | 274 | ||
@@ -394,12 +398,22 @@ void DateNavigatorContainer::setBaseDates() | |||
394 | } | 398 | } |
395 | } | 399 | } |
396 | 400 | void DateNavigatorContainer::setResizeEnabled() | |
401 | { | ||
402 | mResizeEnabled = true; | ||
403 | //qDebug("DateNavigatorContainer::setResizeEnabled "); | ||
404 | checkUpdateDayMatrixDates(); | ||
405 | } | ||
397 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) | 406 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) |
398 | { | 407 | { |
399 | 408 | ||
400 | 409 | //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height()); | |
401 | //qDebug("COUNT %d ", mExtraViews.count()); | 410 | //qDebug("COUNT %d ", mExtraViews.count()); |
402 | 411 | if ( ! mResizeEnabled ) { | |
403 | mUpdateTimer->start( 250 ); | 412 | //qDebug("NOT ResizeEnabled"); |
413 | return; | ||
414 | } | ||
415 | else | ||
416 | mUpdateTimer->start( 250 ); | ||
417 | |||
404 | //updateDayMatrixDates(); | 418 | //updateDayMatrixDates(); |
405 | } | 419 | } |
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index d2f397d..ac9745d 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h | |||
@@ -64,4 +64,5 @@ class DateNavigatorContainer: public QWidget | |||
64 | void slotgoNextYear(); | 64 | void slotgoNextYear(); |
65 | void slotgoPrevYear(); | 65 | void slotgoPrevYear(); |
66 | void setResizeEnabled(); | ||
66 | 67 | ||
67 | signals: | 68 | signals: |
@@ -90,4 +91,5 @@ class DateNavigatorContainer: public QWidget | |||
90 | 91 | ||
91 | private: | 92 | private: |
93 | bool mResizeEnabled; | ||
92 | QTimer* mUpdateTimer; | 94 | QTimer* mUpdateTimer; |
93 | int mLastDisplayedDN; | 95 | int mLastDisplayedDN; |
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 0cb767f..5eccfd6 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp | |||
@@ -120,5 +120,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) | |||
120 | myFullSizeHint = sizeHintTwoButtons( 4 ); | 120 | myFullSizeHint = sizeHintTwoButtons( 4 ); |
121 | mFontChanged = false; | 121 | mFontChanged = false; |
122 | resize ( 3,3 ); | 122 | //resize ( 3,3 ); |
123 | 123 | ||
124 | } | 124 | } |
@@ -372,4 +372,5 @@ void KDateNavigator::updateConfig() | |||
372 | void KDateNavigator::setShowWeekNums(bool enabled) | 372 | void KDateNavigator::setShowWeekNums(bool enabled) |
373 | { | 373 | { |
374 | qDebug("KDateNavigator::setShowWeekNums***************************** "); | ||
374 | m_bShowWeekNums = enabled; | 375 | m_bShowWeekNums = enabled; |
375 | for(int i=0; i<6; i++) { | 376 | for(int i=0; i<6; i++) { |