author | zautrix <zautrix> | 2005-04-01 14:41:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 14:41:00 (UTC) |
commit | e5ec0ef6a256b96a758815ef861526f53d1ad7a5 (patch) (unidiff) | |
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 | |||
@@ -82,6 +82,8 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : | |||
82 | QScrollView(parent,name,f) | 82 | QScrollView(parent,name,f) |
83 | { | 83 | { |
84 | myPix.resize( 1, 1 ); | ||
84 | mRows = rows; | 85 | mRows = rows; |
85 | 86 | ||
87 | mRedrawNeeded = true; | ||
86 | setMinimumHeight( 20 ); | 88 | setMinimumHeight( 20 ); |
87 | mCellHeight = KOPrefs::instance()->mHourSize*4; | 89 | mCellHeight = KOPrefs::instance()->mHourSize*4; |
@@ -117,4 +119,5 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) | |||
117 | // now, for a workaround... | 119 | // now, for a workaround... |
118 | // these two assignments fix the weird redraw bug | 120 | // these two assignments fix the weird redraw bug |
121 | if ( mRedrawNeeded ) { | ||
119 | cx = contentsX() + 2; | 122 | cx = contentsX() + 2; |
120 | cw = contentsWidth() - 2; | 123 | cw = contentsWidth() - 2; |
@@ -184,4 +187,10 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) | |||
184 | cell++; | 187 | cell++; |
185 | } | 188 | } |
189 | } else { | ||
190 | //qDebug("NO redraw "); | ||
191 | } | ||
192 | // double buffer not yet implemented | ||
193 | //bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); | ||
194 | //mRedrawNeeded = false; | ||
186 | } | 195 | } |
187 | 196 | ||
@@ -197,4 +206,5 @@ int TimeLabels::minimumWidth() const | |||
197 | void TimeLabels::updateConfig() | 206 | void TimeLabels::updateConfig() |
198 | { | 207 | { |
208 | mRedrawNeeded = true; | ||
199 | // set the font | 209 | // set the font |
200 | // config->setGroup("Fonts"); | 210 | // config->setGroup("Fonts"); |
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 6dc81c6..30c9b05 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -102,4 +102,6 @@ class TimeLabels : public QScrollView { | |||
102 | 102 | ||
103 | private: | 103 | private: |
104 | QPixmap myPix; | ||
105 | bool mRedrawNeeded; | ||
104 | int mMiniWidth; | 106 | int mMiniWidth; |
105 | int mMouseDownY; | 107 | int mMouseDownY; |
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index d543aaf..dfc6af7 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -111,4 +111,5 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const | |||
111 | #endif | 111 | #endif |
112 | { | 112 | { |
113 | mRedrawNeeded = true; | ||
113 | mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); | 114 | mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); |
114 | mPendingUpdateBeforeRepaint = false; | 115 | mPendingUpdateBeforeRepaint = false; |
@@ -387,4 +388,5 @@ void KODayMatrix::updateViewTimed() | |||
387 | } | 388 | } |
388 | } | 389 | } |
390 | mRedrawNeeded = true; | ||
389 | if ( ! mPendingUpdateBeforeRepaint ) | 391 | if ( ! mPendingUpdateBeforeRepaint ) |
390 | repaint(false); | 392 | repaint(false); |
@@ -421,4 +423,5 @@ void KODayMatrix::updateView(QDate actdate) | |||
421 | mDayChanged = true; | 423 | mDayChanged = true; |
422 | recalculateToday(); | 424 | recalculateToday(); |
425 | mRedrawNeeded = true; | ||
423 | } | 426 | } |
424 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); | 427 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); |
@@ -429,5 +432,5 @@ void KODayMatrix::updateView(QDate actdate) | |||
429 | //mRepaintTimer->start( 100 ); | 432 | //mRepaintTimer->start( 100 ); |
430 | //updateViewTimed(); | 433 | //updateViewTimed(); |
431 | mUpdateTimer->start( 20 ); | 434 | mUpdateTimer->start( 50 ); |
432 | #else | 435 | #else |
433 | mRepaintTimer->start( 350 ); | 436 | mRepaintTimer->start( 350 ); |
@@ -679,5 +682,9 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
679 | if ( myPix.width() != width() || myPix.height()!=height() ) { | 682 | if ( myPix.width() != width() || myPix.height()!=height() ) { |
680 | myPix.resize(size() ); | 683 | myPix.resize(size() ); |
684 | mRedrawNeeded = true; | ||
681 | } | 685 | } |
686 | |||
687 | if ( mRedrawNeeded ) { | ||
688 | //qDebug("REDRAW "); | ||
682 | QPainter p(&myPix); | 689 | QPainter p(&myPix); |
683 | p.setFont(font()); | 690 | p.setFont(font()); |
@@ -928,7 +935,9 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
928 | } | 935 | } |
929 | } | 936 | } |
930 | int off = 0;//xyOff; | 937 | } else { |
931 | bitBlt (this, off, off, &myPix, 0 ,0,width(), height() ,CopyROP); | 938 | //qDebug("NO redraw "); |
932 | //qDebug("ffffffffff %d ", off); | 939 | } |
940 | bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); | ||
941 | mRedrawNeeded = false; | ||
933 | } | 942 | } |
934 | 943 | ||
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index 38a7f92..731117c 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h | |||
@@ -228,4 +228,5 @@ protected: | |||
228 | 228 | ||
229 | private: | 229 | private: |
230 | bool mRedrawNeeded; | ||
230 | KODaymatrixWhatsThis* mKODaymatrixWhatsThis; | 231 | KODaymatrixWhatsThis* mKODaymatrixWhatsThis; |
231 | bool mouseDown; | 232 | bool mouseDown; |