-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 6 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 8 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 26 | ||||
-rw-r--r-- | korganizer/komonthview.h | 3 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 1 |
6 files changed, 36 insertions, 9 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 548c364..d1caff3 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -52,2 +52,4 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, connect (mUpdateTimer ,SIGNAL(timeout()), this, SLOT ( checkUpdateDayMatrixDates() )); + mFirstSelectedDate = QDate::currentDate(); + mSelectedDateCount = 1; } @@ -142,3 +144,3 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() { - qDebug("wid %d hei %d ", width(), height()); + //qDebug("KODNC: wid %d hei %d ", width(), height()); mUpdateTimer->stop(); @@ -150,3 +152,3 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates() if ( lastWid == width() && height() == lastHei ) { - qDebug("no layout computing needed. "); + qDebug("KODNC: No layout computing needed. "); } else { diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 7e6fa48..82d1eab 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -506,4 +506,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) xx = 0; - if ( rw < 0 ) { - qDebug("KOAgendaItem::Width1 < 0. Returning "); + if ( rw <= 1 ) { + qDebug("KOAgendaItem::Width1 <= 1 (%d). Returning. %s",rw,mDisplayedText.latin1()); return; @@ -513,4 +513,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) rw = paintFrom->width() - xx; - if ( rw < 0 ) { - qDebug("KOAgendaItem::Width2 < 0. Returning "); + if ( rw <= 1 ) { + qDebug("KOAgendaItem::Width2 <= 1 (%d). Returning.%s ",rw,mDisplayedText.latin1() ); return; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index eb3a6cd..5508210 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -269,2 +269,3 @@ EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) mEnabled.resize(mColumns); + mEnabled.fill( false ); setMinimumHeight(mPixmap.height()); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 9fd1f68..8ee5bc3 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -996,2 +996,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) emit incidenceSelected( 0 ); + + mComputeLayoutTimer = new QTimer( this ); + connect (mComputeLayoutTimer ,SIGNAL(timeout()), this, SLOT ( slotComputeLayout())); + + #ifndef DESKTOP_VERSION @@ -1353,3 +1358,14 @@ void KOMonthView::resizeEvent(QResizeEvent * e) { - //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); + qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); + if ( isVisible() ) { + qDebug("KOMonthView::isVisible "); + slotComputeLayout(); + } else + mComputeLayoutTimer->start( 100 ); +} + +void KOMonthView::slotComputeLayout() +{ + mComputeLayoutTimer->stop(); + qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() ); computeLayout(); @@ -1360,2 +1376,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e) mCells[0]->setFocus(); + } @@ -1380,4 +1397,6 @@ void KOMonthView::computeLayoutWeek() - if ( lastWid == width() && lastHei == height() ) + if ( lastWid == width() && lastHei == height() ) { + qDebug("KOListWeekView::No compute layout needed "); return; + } lastWid = width(); @@ -1507,2 +1526,3 @@ void KOMonthView::computeLayout() if ( lastWid == width() && lastHei == height() ){ + qDebug("KOMonthview::No compute layout needed "); return; @@ -1512,3 +1532,3 @@ void KOMonthView::computeLayout() lastHei = height(); - //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ "); + qDebug("KOMonthView::computeLayout() MMM ------------------- "); QFontMetrics fm ( mWeekLabels[0]->font() ); diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index a92421b..89912e0 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -29,2 +29,3 @@ #include <qlayout.h> +#include <qtimer.h> #include <qintdict.h> @@ -253,2 +254,3 @@ class KOMonthView: public KOEventView protected slots: + void slotComputeLayout(); void selectInternalWeekNum ( int ); @@ -267,2 +269,3 @@ class KOMonthView: public KOEventView private: + QTimer* mComputeLayoutTimer; NavigatorBar* mNavigatorBar; diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index cc0ce9b..94d74f1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -243,2 +243,3 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) } + //if ( mCurrentView == mMonthView ) qApp->processEvents(); emit signalFullScreen( !fullScreen ); |