summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-31 08:05:32 (UTC)
committer zautrix <zautrix>2005-01-31 08:05:32 (UTC)
commitf7663a4c854d217bcb4f828a3ebb69cc40d0dd7c (patch) (unidiff)
tree683febfff7427b923f23178e74b7cc0e50ef461d
parented5723f40a93bbedfcbd9f54e6379a23c4a76096 (diff)
downloadkdepimpi-f7663a4c854d217bcb4f828a3ebb69cc40d0dd7c.zip
kdepimpi-f7663a4c854d217bcb4f828a3ebb69cc40d0dd7c.tar.gz
kdepimpi-f7663a4c854d217bcb4f828a3ebb69cc40d0dd7c.tar.bz2
fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp2
-rw-r--r--korganizer/kodaymatrix.cpp49
-rw-r--r--korganizer/kodaymatrix.h1
3 files changed, 25 insertions, 27 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 8b79788..8e9add3 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1509,2 +1509,4 @@ void KOAgendaView::updateTodo( Todo * t, int )
1509{ 1509{
1510 if ( !isVisible() )
1511 return;
1510 bool remove = false; 1512 bool remove = false;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 9c3621e..be5a775 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -21,3 +21,3 @@
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source ode for Qt in the source distribution.
23*/ 23*/
@@ -93,2 +93,3 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const
93 mCalendar = calendar; 93 mCalendar = calendar;
94 mPendingUpdateBeforeRepaint = false;
94 95
@@ -193,2 +194,3 @@ void KODayMatrix::recalculateToday()
193 for (int i=0; i<NUMDAYS; i++) { 194 for (int i=0; i<NUMDAYS; i++) {
195 events[i] = 0;
194 days[i] = startdate.addDays(i); 196 days[i] = startdate.addDays(i);
@@ -212,3 +214,3 @@ void KODayMatrix::repaintViewTimed()
212{ 214{
213 qDebug("KODayMatrix::repaintViewTimed "); 215 //qDebug("KODayMatrix::repaintViewTimed ");
214 mRepaintTimer->stop(); 216 mRepaintTimer->stop();
@@ -220,12 +222,3 @@ void KODayMatrix::updateViewTimed()
220 mUpdateTimer->stop(); 222 mUpdateTimer->stop();
221 //QDate actdate = mPendingNewDate; 223 //qDebug("KODayMatrix::updateView(QDate actdate) %d", ++iii );
222
223 static int iii = 0;
224 qDebug("KODayMatrix::updateView(QDate actdate) %d", ++iii );
225
226 if (mDayChanged) {
227 recalculateToday();
228 mDayChanged = false;
229 }
230
231 for(int i = 0; i < NUMDAYS; i++) { 224 for(int i = 0; i < NUMDAYS; i++) {
@@ -262,2 +255,3 @@ void KODayMatrix::updateViewTimed()
262 } 255 }
256 if ( ! mPendingUpdateBeforeRepaint )
263 repaint(false); 257 repaint(false);
@@ -267,2 +261,7 @@ void KODayMatrix::updateView(QDate actdate)
267 261
262 if ( ! actdate.isValid() ) {
263 //qDebug("date not valid ");
264 return;
265 }
266 mDayChanged = false;
268 //flag to indicate if the starting day of the matrix has changed by this call 267 //flag to indicate if the starting day of the matrix has changed by this call
@@ -287,25 +286,18 @@ void KODayMatrix::updateView(QDate actdate)
287 } 286 }
288
289 startdate = actdate; 287 startdate = actdate;
290 mDayChanged = true; 288 mDayChanged = true;
289 recalculateToday();
291 } 290 }
292 qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); 291 //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() );
293 static int iii = 0;
294 if ( iii < 2 ) {
295 ++iii;
296 updateViewTimed();
297 } else {
298 if ( !isVisible() ) { 292 if ( !isVisible() ) {
299 mUpdateTimer->start( 2000 ); 293 mPendingUpdateBeforeRepaint = true;
300 } else {
301 if ( mDayChanged ) {
302 mUpdateTimer->start( 250 );
303 } else { 294 } else {
304 mRepaintTimer->start( 250 ); 295 mRepaintTimer->start( 250 );
296#ifdef DESKTOP_VERSION
305 mUpdateTimer->start( 2000 ); 297 mUpdateTimer->start( 2000 );
298#else
299 mUpdateTimer->start( 4000 );
300#endif
306 } 301 }
307 } 302 }
308 }
309
310}
311 303
@@ -497,3 +489,6 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
497//kdDebug() << "KODayMatrix::paintEvent() BEGIN" << endl; 489//kdDebug() << "KODayMatrix::paintEvent() BEGIN" << endl;
498 490 if ( mPendingUpdateBeforeRepaint ) {
491 updateViewTimed();
492 mPendingUpdateBeforeRepaint = false;
493 }
499 QPainter p(this); 494 QPainter p(this);
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index 0e9640a..ac2f59c 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -226,2 +226,3 @@ private:
226 bool mDayChanged; 226 bool mDayChanged;
227 bool mPendingUpdateBeforeRepaint;
227 228