summaryrefslogtreecommitdiffabout
path: root/korganizer/datenavigatorcontainer.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp42
1 files changed, 28 insertions, 14 deletions
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,14 +220,7 @@ 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();
@@ -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());
-
- mUpdateTimer->start( 250 );
+ if ( ! mResizeEnabled ) {
+ //qDebug("NOT ResizeEnabled");
+ return;
+ }
+ else
+ mUpdateTimer->start( 250 );
+
//updateDayMatrixDates();
}