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 /korganizer/datenavigatorcontainer.cpp | |
parent | 5a0130ffdbf03fa5b881f856b41d081e91e1958b (diff) | |
download | kdepimpi-3326831dbf6f962e97a978781361db5198f6a035.zip kdepimpi-3326831dbf6f962e97a978781361db5198f6a035.tar.gz kdepimpi-3326831dbf6f962e97a978781361db5198f6a035.tar.bz2 |
layout fix
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 2290c53..11dc592 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -40,10 +40,11 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, : QWidget( parent, name ), mCalendar( 0 ), mHorizontalCount( 1 ), mVerticalCount( 1 ) { + mResizeEnabled = false; mExtraViews.setAutoDelete( true ); mNavigatorView = new KDateNavigator( this, name ); - + mNavigatorView->hide(); connectNavigatorView( mNavigatorView ); //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); mLastDisplayedDN = 0; @@ -218,17 +219,10 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() mExtraViews.append( n ); 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 ) { //mNavigatorView->changeFont( fo ); @@ -266,6 +260,16 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() view->setGeometry( x * twidth, 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; + } } QDate last = lastAvailableDate(); @@ -393,14 +397,24 @@ void DateNavigatorContainer::setBaseDates() n->setBaseDate( baseDate, doRepaint ); } } - +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(); } |