summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-19 22:56:08 (UTC)
committer zautrix <zautrix>2005-03-19 22:56:08 (UTC)
commit84c18843bbd1203878367572d3a6800a0586c7f1 (patch) (side-by-side diff)
tree9f58b7356ea700d47e6ec84fb4a462a666a24049
parent39b719bdc75d95913c3aaf9a03aaa57b1161cc61 (diff)
downloadkdepimpi-84c18843bbd1203878367572d3a6800a0586c7f1.zip
kdepimpi-84c18843bbd1203878367572d3a6800a0586c7f1.tar.gz
kdepimpi-84c18843bbd1203878367572d3a6800a0586c7f1.tar.bz2
mochn fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/datenavigatorcontainer.cpp20
-rw-r--r--korganizer/kdatenavigator.cpp7
-rw-r--r--korganizer/kdatenavigator.h5
-rw-r--r--korganizer/kodaymatrix.cpp2
5 files changed, 24 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 29c530b..9acbbb1 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1858,3 +1858,2 @@ void CalendarView::readSettings()
mLeftFrame->setSizes(sizes);
- qDebug("sizes count %d ", sizes.count());
if ( dateCount == 5 ) mNavigator->selectWorkWeek();
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 3f6e29b..d09f484 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -129,2 +129,7 @@ void DateNavigatorContainer::selectDates( const DateList &dateList )
setBaseDates();
+ if ( mExtraViews.count() ) {
+ KDateNavigator *view = mExtraViews.at( 0 );
+ view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end()));
+ view->dayMatrix()->repaint();
+ }
}
@@ -139,5 +144,7 @@ void DateNavigatorContainer::setBaseDates()
KDateNavigator *n;
+ bool doRepaint = false; // skip first repaint
for( n = mExtraViews.first(); n; n = mExtraViews.next() ) {
baseDate = baseDate.addDays( baseDate.daysInMonth () );
- n->setBaseDate( baseDate );
+ n->setBaseDate( baseDate, doRepaint );
+ doRepaint = true;
}
@@ -145,3 +152,3 @@ void DateNavigatorContainer::setBaseDates()
-void DateNavigatorContainer::resizeEvent( QResizeEvent * )
+void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
{
@@ -154,4 +161,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
#endif
-
- QSize minSize = mNavigatorView->minimumSizeHint();
+ QSize minSize = mNavigatorView->yourSizeHint();
@@ -161,2 +167,3 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
int horizontalCount = size().width() / minSize.width();
+ //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() );
//qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount );
@@ -165,3 +172,6 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
uint count = horizontalCount * verticalCount;
- if ( count == 0 ) return;
+ if ( count == 0 ) {
+ mNavigatorView->resize( minSize );
+ return;
+ }
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index ab9a40f..b097dc1 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -117,3 +117,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
enableRollover(FollowMonth);
- //setFixedSize ( sizeHint() );
+ mySizeHint = sizeHint();
}
@@ -132,3 +132,3 @@ void KDateNavigator::setCalendar( Calendar *cal )
-void KDateNavigator::setBaseDate( const QDate &date )
+void KDateNavigator::setBaseDate( const QDate &date , bool doRepaint ) // = true
{
@@ -144,3 +144,4 @@ void KDateNavigator::setBaseDate( const QDate &date )
daymatrix->clearSelection();
- daymatrix->repaint();
+ if ( doRepaint )
+ daymatrix->repaint();
}
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 56822fa..292e71c 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -62,3 +62,3 @@ class KDateNavigator: public QFrame
void setCalendar( Calendar * );
- void setBaseDate( const QDate & );
+ void setBaseDate( const QDate & , bool doRepaint = true );
KCal::DateList selectedDates() const { return mSelectedDates; }
@@ -66,2 +66,4 @@ class KDateNavigator: public QFrame
void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off;}
+ QSize yourSizeHint() { return mySizeHint; }
+ KODayMatrix *dayMatrix() { return daymatrix ;}
public slots:
@@ -116,2 +118,3 @@ class KDateNavigator: public QFrame
private:
+ QSize mySizeHint;
int mMonthSignalOffset;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index a886f4a..17a8546 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -203,3 +203,3 @@ void KODayMatrix::clearSelection()
{
- mSelEnd = mSelStart = NOSELECTION;
+ mSelEnd = mSelStart = NOSELECTION;
}