author | zautrix <zautrix> | 2005-08-10 11:40:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-10 11:40:52 (UTC) |
commit | 722a463b47ba8fe2dbf52329fec27af4125d530b (patch) (unidiff) | |
tree | 17a000965abaf5d9fb99823893d884e7655d1348 | |
parent | 77c5968afa68459ca5918c98206bd9e39cf90235 (diff) | |
download | kdepimpi-722a463b47ba8fe2dbf52329fec27af4125d530b.zip kdepimpi-722a463b47ba8fe2dbf52329fec27af4125d530b.tar.gz kdepimpi-722a463b47ba8fe2dbf52329fec27af4125d530b.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagenda.cpp | 14 | ||||
-rw-r--r-- | korganizer/koagenda.h | 1 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 7e9fa71..7d9d674 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -104,17 +104,18 @@ int MarcusBains::todayColumn() | |||
104 | agenda->columns() - 1 - col : col; | 104 | agenda->columns() - 1 - col : col; |
105 | ++col; | 105 | ++col; |
106 | } | 106 | } |
107 | 107 | ||
108 | return -1; | 108 | return -1; |
109 | } | 109 | } |
110 | void MarcusBains::updateLoc() | 110 | void MarcusBains::updateLoc() |
111 | { | 111 | { |
112 | updateLocation(); | 112 | if ( !agenda->invalidPixmap() ) |
113 | updateLocation(); | ||
113 | } | 114 | } |
114 | void MarcusBains::updateLocation(bool recalculate) | 115 | void MarcusBains::updateLocation(bool recalculate) |
115 | { | 116 | { |
116 | 117 | ||
117 | QTime tim = QTime::currentTime(); | 118 | QTime tim = QTime::currentTime(); |
118 | //qDebug(" MarcusBains::updateLocation %s ", tim.toString().latin1()); | 119 | //qDebug(" MarcusBains::updateLocation %s ", tim.toString().latin1()); |
119 | if((tim.hour() == 0) && (oldTime.hour()==23)) | 120 | if((tim.hour() == 0) && (oldTime.hour()==23)) |
120 | recalculate = true; | 121 | recalculate = true; |
@@ -436,22 +437,26 @@ void KOAgenda::categoryChanged(Incidence * inc) | |||
436 | KOAgendaItem *item; | 437 | KOAgendaItem *item; |
437 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 438 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
438 | if ( item->incidence() == inc ) { | 439 | if ( item->incidence() == inc ) { |
439 | item->initColor (); | 440 | item->initColor (); |
440 | item->updateItem(); | 441 | item->updateItem(); |
441 | } | 442 | } |
442 | } | 443 | } |
443 | } | 444 | } |
445 | bool KOAgenda::invalidPixmap() | ||
446 | { | ||
447 | return mInvalidPixmap; | ||
448 | } | ||
444 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | 449 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) |
445 | { | 450 | { |
446 | 451 | ||
447 | if ( mInvalidPixmap ) { | 452 | if ( mInvalidPixmap ) { |
448 | mInvalidPixmap = false; | 453 | mInvalidPixmap = false; |
449 | qDebug("KO: Upsizing Pixmaps "); | 454 | qDebug("KO: efm Upsizing Pixmaps %s", QDateTime::currentDateTime().toString().latin1()); |
450 | computeSizes(); | 455 | computeSizes(); |
451 | emit updateViewSignal(); | 456 | emit updateViewSignal(); |
452 | return true; | 457 | return true; |
453 | } | 458 | } |
454 | emit sendPing(); | 459 | emit sendPing(); |
455 | static int startX = 0; | 460 | static int startX = 0; |
456 | static int startY = 0; | 461 | static int startY = 0; |
457 | int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); | 462 | int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); |
@@ -1276,21 +1281,22 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | |||
1276 | 1281 | ||
1277 | void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | 1282 | void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) |
1278 | { | 1283 | { |
1279 | if ( globalFlagBlockAgenda ) | 1284 | if ( globalFlagBlockAgenda ) |
1280 | return; | 1285 | return; |
1281 | 1286 | ||
1282 | if ( mInvalidPixmap ) { | 1287 | if ( mInvalidPixmap ) { |
1283 | mInvalidPixmap = false; | 1288 | mInvalidPixmap = false; |
1284 | qDebug("KO: Upsizing Pixmaps "); | 1289 | qDebug("KO: dc Upsizing Pixmaps %s", QDateTime::currentDateTime().toString().latin1()); |
1285 | computeSizes(); | 1290 | computeSizes(); |
1286 | emit updateViewSignal(); | 1291 | emit updateViewSignal(); |
1287 | return; | 1292 | return; |
1288 | } | 1293 | } |
1294 | //qDebug("KOAgenda::drawContents %s", QDateTime::currentDateTime().toString().latin1()); | ||
1289 | if ( ! mAllDayMode ) { | 1295 | if ( ! mAllDayMode ) { |
1290 | // currently not working for | 1296 | // currently not working for |
1291 | 1297 | ||
1292 | //qDebug("KOAgenda::drawContents "); | 1298 | //qDebug("KOAgenda::drawContents "); |
1293 | #if 0 | 1299 | #if 0 |
1294 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { | 1300 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { |
1295 | qDebug("WAU "); | 1301 | qDebug("WAU "); |
1296 | drawContentsToPainter(); | 1302 | drawContentsToPainter(); |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 59e7472..380ce62 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -123,16 +123,17 @@ class KOAgenda : public QScrollView | |||
123 | void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); | 123 | void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); |
124 | void finishUpdate(); | 124 | void finishUpdate(); |
125 | void printSelection(); | 125 | void printSelection(); |
126 | void storePosition(); | 126 | void storePosition(); |
127 | void restorePosition(); | 127 | void restorePosition(); |
128 | void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; } | 128 | void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; } |
129 | void shrinkPixmap(); | 129 | void shrinkPixmap(); |
130 | QTime getEndTime(); | 130 | QTime getEndTime(); |
131 | bool invalidPixmap(); | ||
131 | 132 | ||
132 | public slots: | 133 | public slots: |
133 | void slotContentMove(int,int); | 134 | void slotContentMove(int,int); |
134 | void categoryChanged(Incidence * inc); | 135 | void categoryChanged(Incidence * inc); |
135 | void slotClearSelection(); | 136 | void slotClearSelection(); |
136 | void popupMenu(); | 137 | void popupMenu(); |
137 | void newItem( int ); | 138 | void newItem( int ); |
138 | void moveChild( QWidget *, int, int ); | 139 | void moveChild( QWidget *, int, int ); |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 04f30bb..f5a3a4b 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -598,17 +598,17 @@ void KOAgendaView::slotIdleTimeout() | |||
598 | bool isActice = topLevelWidget()->isActiveWindow(); | 598 | bool isActice = topLevelWidget()->isActiveWindow(); |
599 | //qDebug("KO: Active Window %d %d", isActice, isVisible()); | 599 | //qDebug("KO: Active Window %d %d", isActice, isVisible()); |
600 | // we do nothing if we wake up from a suspend | 600 | // we do nothing if we wake up from a suspend |
601 | if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) { | 601 | if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) { |
602 | qDebug("KO: Wakeup from suspend "); | 602 | qDebug("KO: Wakeup from suspend "); |
603 | startIdleTimeout(); | 603 | startIdleTimeout(); |
604 | return; | 604 | return; |
605 | } | 605 | } |
606 | qDebug("KO: Downsizing Pixmaps "); | 606 | qDebug("KO: Downsizing Pixmaps %s",QDateTime::currentDateTime().toString().latin1()); |
607 | mAgenda->shrinkPixmap(); | 607 | mAgenda->shrinkPixmap(); |
608 | mAllDayAgenda->shrinkPixmap(); | 608 | mAllDayAgenda->shrinkPixmap(); |
609 | KOAgendaItem::paintPix()->resize( 20,20); | 609 | KOAgendaItem::paintPix()->resize( 20,20); |
610 | KOAgendaItem::paintPixAllday()->resize( 20,20); | 610 | KOAgendaItem::paintPixAllday()->resize( 20,20); |
611 | #endif | 611 | #endif |
612 | 612 | ||
613 | } | 613 | } |
614 | void KOAgendaView::toggleAllDay() | 614 | void KOAgendaView::toggleAllDay() |