author | zautrix <zautrix> | 2005-04-01 14:41:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 14:41:00 (UTC) |
commit | e5ec0ef6a256b96a758815ef861526f53d1ad7a5 (patch) (side-by-side diff) | |
tree | 3fa188da9108c867c1437157731c7b7a3d4e641d | |
parent | 93003b1f8348f112648d3cc20acb21b062220e21 (diff) | |
download | kdepimpi-e5ec0ef6a256b96a758815ef861526f53d1ad7a5.zip kdepimpi-e5ec0ef6a256b96a758815ef861526f53d1ad7a5.tar.gz kdepimpi-e5ec0ef6a256b96a758815ef861526f53d1ad7a5.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagendaview.cpp | 10 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 2 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 17 | ||||
-rw-r--r-- | korganizer/kodaymatrix.h | 1 |
4 files changed, 26 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 2996acb..218396d 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -83,4 +83,6 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : { + myPix.resize( 1, 1 ); mRows = rows; + mRedrawNeeded = true; setMinimumHeight( 20 ); @@ -118,2 +120,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) // these two assignments fix the weird redraw bug + if ( mRedrawNeeded ) { cx = contentsX() + 2; @@ -185,2 +188,8 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) } + } else { + //qDebug("NO redraw "); + } + // double buffer not yet implemented + //bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); + //mRedrawNeeded = false; } @@ -198,2 +207,3 @@ void TimeLabels::updateConfig() { + mRedrawNeeded = true; // set the font diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 6dc81c6..30c9b05 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -103,2 +103,4 @@ class TimeLabels : public QScrollView { private: + QPixmap myPix; + bool mRedrawNeeded; int mMiniWidth; diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index d543aaf..dfc6af7 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -112,2 +112,3 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const { + mRedrawNeeded = true; mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); @@ -388,2 +389,3 @@ void KODayMatrix::updateViewTimed() } + mRedrawNeeded = true; if ( ! mPendingUpdateBeforeRepaint ) @@ -422,2 +424,3 @@ void KODayMatrix::updateView(QDate actdate) recalculateToday(); + mRedrawNeeded = true; } @@ -430,3 +433,3 @@ void KODayMatrix::updateView(QDate actdate) //updateViewTimed(); - mUpdateTimer->start( 20 ); + mUpdateTimer->start( 50 ); #else @@ -680,3 +683,7 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) myPix.resize(size() ); + mRedrawNeeded = true; } + + if ( mRedrawNeeded ) { + //qDebug("REDRAW "); QPainter p(&myPix); @@ -929,5 +936,7 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) } - int off = 0;//xyOff; - bitBlt (this, off, off, &myPix, 0 ,0,width(), height() ,CopyROP); - //qDebug("ffffffffff %d ", off); + } else { + //qDebug("NO redraw "); + } + bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); + mRedrawNeeded = false; } diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index 38a7f92..731117c 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h @@ -229,2 +229,3 @@ protected: private: + bool mRedrawNeeded; KODaymatrixWhatsThis* mKODaymatrixWhatsThis; |