author | zautrix <zautrix> | 2005-03-25 15:07:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-25 15:07:31 (UTC) |
commit | 3326831dbf6f962e97a978781361db5198f6a035 (patch) (side-by-side diff) | |
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 | 40 | ||||
-rw-r--r-- | korganizer/datenavigatorcontainer.h | 2 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 3 |
4 files changed, 32 insertions, 15 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() } mMainFrame->setSizes(sizes); - if ( dateCount == 5 ) mNavigator->selectWorkWeek(); else if ( dateCount == 7 ) mNavigator->selectWeek(); @@ -1927,4 +1926,5 @@ void CalendarView::readSettings() globalFlagBlockAgenda = 2; mViewManager->readSettings( config ); + QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); } 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, mHorizontalCount( 1 ), mVerticalCount( 1 ) { + mResizeEnabled = false; mExtraViews.setAutoDelete( true ); mNavigatorView = new KDateNavigator( this, name ); - + mNavigatorView->hide(); connectNavigatorView( mNavigatorView ); //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); @@ -219,15 +220,8 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() n->setCalendar( mCalendar ); connectNavigatorView( n ); - n->show(); - } - int iii = 0; - while ( iii < ( mExtraViews.count() ) ) { - if ( iii < count-1 ) - mExtraViews.at( iii )->show(); - else - mExtraViews.at( iii )->hide(); - ++iii; + // n->show(); } + setBaseDates(); if ( fontchange ) { @@ -267,4 +261,14 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() y * theight, twidth, theight ); } + int iii = 0; + int ccc = mHorizontalCount * mVerticalCount; + mNavigatorView->show(); + while ( iii < ( mExtraViews.count() ) ) { + if ( iii < ccc-1 ) + mExtraViews.at( iii )->show(); + else + mExtraViews.at( iii )->hide(); + ++iii; + } } @@ -394,12 +398,22 @@ void DateNavigatorContainer::setBaseDates() } } - +void DateNavigatorContainer::setResizeEnabled() +{ + mResizeEnabled = true; + //qDebug("DateNavigatorContainer::setResizeEnabled "); + checkUpdateDayMatrixDates(); +} void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) { - + //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height()); //qDebug("COUNT %d ", mExtraViews.count()); - + if ( ! mResizeEnabled ) { + //qDebug("NOT ResizeEnabled"); + return; + } + else mUpdateTimer->start( 250 ); + //updateDayMatrixDates(); } 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 void slotgoNextYear(); void slotgoPrevYear(); + void setResizeEnabled(); signals: @@ -90,4 +91,5 @@ class DateNavigatorContainer: public QWidget private: + bool mResizeEnabled; QTimer* mUpdateTimer; 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 ) myFullSizeHint = sizeHintTwoButtons( 4 ); mFontChanged = false; - resize ( 3,3 ); + //resize ( 3,3 ); } @@ -372,4 +372,5 @@ void KDateNavigator::updateConfig() void KDateNavigator::setShowWeekNums(bool enabled) { + qDebug("KDateNavigator::setShowWeekNums***************************** "); m_bShowWeekNums = enabled; for(int i=0; i<6; i++) { |