-rw-r--r-- | korganizer/koagenda.cpp | 35 | ||||
-rw-r--r-- | korganizer/koagenda.h | 3 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 20 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 1 |
4 files changed, 43 insertions, 16 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index c339b57..662576f 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -62,3 +62,3 @@ extern int globalFlagBlockStartup; | |||
62 | 62 | ||
63 | bool KOAgenda::mInvalidPixmap = false; | 63 | |
64 | //////////////////////////////////////////////////////////////////////////// | 64 | //////////////////////////////////////////////////////////////////////////// |
@@ -332,2 +332,3 @@ void KOAgenda::slotContentMove(int,int) | |||
332 | { | 332 | { |
333 | emit sendPing(); | ||
333 | if ( mActionType == NOP ) | 334 | if ( mActionType == NOP ) |
@@ -440,2 +441,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
440 | { | 441 | { |
442 | |||
443 | if ( mInvalidPixmap ) { | ||
444 | mInvalidPixmap = false; | ||
445 | qDebug("InvalidPixmap "); | ||
446 | computeSizes(); | ||
447 | emit updateViewSignal(); | ||
448 | return true; | ||
449 | } | ||
450 | emit sendPing(); | ||
441 | static int startX = 0; | 451 | static int startX = 0; |
@@ -1269,3 +1279,4 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1269 | qDebug("InvalidPixmap "); | 1279 | qDebug("InvalidPixmap "); |
1270 | QTimer::singleShot( 0, this, SIGNAL( updateViewSignal() )); | 1280 | computeSizes(); |
1281 | emit updateViewSignal(); | ||
1271 | return; | 1282 | return; |
@@ -1276,5 +1287,8 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1276 | //qDebug("KOAgenda::drawContents "); | 1287 | //qDebug("KOAgenda::drawContents "); |
1277 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1288 | #if 0 |
1278 | ;//drawContentsToPainter(); | 1289 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { |
1279 | 1290 | qDebug("WAU "); | |
1291 | drawContentsToPainter(); | ||
1292 | } | ||
1293 | #endif | ||
1280 | QPaintDevice* pd = p->device(); | 1294 | QPaintDevice* pd = p->device(); |
@@ -1322,6 +1336,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1322 | } else { | 1336 | } else { |
1323 | 1337 | #if 0 | |
1324 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1338 | qDebug("mCurPixWid %d %d ",mCurPixWid, contentsWidth() ); |
1325 | ;//drawContentsToPainter(); | 1339 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { |
1326 | 1340 | qDebug("WAUWAU "); | |
1341 | drawContentsToPainter(); | ||
1342 | } | ||
1343 | #endif | ||
1327 | QPaintDevice* pd = p->device(); | 1344 | QPaintDevice* pd = p->device(); |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 5d813b2..0e3aed8 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -77,3 +77,3 @@ class KOAgenda : public QScrollView | |||
77 | virtual ~KOAgenda(); | 77 | virtual ~KOAgenda(); |
78 | static bool mInvalidPixmap; | 78 | bool mInvalidPixmap; |
79 | 79 | ||
@@ -176,2 +176,3 @@ class KOAgenda : public QScrollView | |||
176 | void updateViewSignal(); | 176 | void updateViewSignal(); |
177 | void sendPing(); | ||
177 | 178 | ||
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 488d9d4..1b21a71 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -78,3 +78,3 @@ using namespace KOrg; | |||
78 | 78 | ||
79 | #define IDLETIMEOUT 3 | 79 | #define IDLETIMEOUT 15 |
80 | 80 | ||
@@ -578,2 +578,6 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
578 | 578 | ||
579 | connect( mAllDayAgenda, SIGNAL( sendPing() ),this, SLOT( startIdleTimeout()) ); | ||
580 | connect( mAgenda, SIGNAL( sendPing() ), this, SLOT( startIdleTimeout()) ); | ||
581 | |||
582 | |||
579 | mIdleTimer = new QTimer ( this );; | 583 | mIdleTimer = new QTimer ( this );; |
@@ -581,2 +585,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
581 | } | 585 | } |
586 | void KOAgendaView::startIdleTimeout() | ||
587 | { | ||
588 | mIdleStart = QDateTime::currentDateTime(); | ||
589 | mIdleTimer->start( IDLETIMEOUT * 1000 ); | ||
590 | } | ||
582 | void KOAgendaView::slotIdleTimeout() | 591 | void KOAgendaView::slotIdleTimeout() |
@@ -587,7 +596,7 @@ void KOAgendaView::slotIdleTimeout() | |||
587 | bool isActice = topLevelWidget()->isActiveWindow(); | 596 | bool isActice = topLevelWidget()->isActiveWindow(); |
588 | qDebug("KO: Active Window %d ", isActice); | 597 | qDebug("KO: Active Window %d %d", isActice, isVisible()); |
589 | // we do nothing if we wake up from a suspend | 598 | // we do nothing if we wake up from a suspend |
590 | if ( secsfromstart > IDLETIMEOUT + 50 && isActice ) { | 599 | if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) { |
591 | qDebug("KO: Wakeup from suspend "); | 600 | qDebug("KO: Wakeup from suspend "); |
592 | mIdleTimer->start( IDLETIMEOUT * 1000 ); | 601 | startIdleTimeout(); |
593 | return; | 602 | return; |
@@ -1323,4 +1332,3 @@ void KOAgendaView::fillAgenda() | |||
1323 | repaintAgenda(); | 1332 | repaintAgenda(); |
1324 | mIdleTimer->start ( IDLETIMEOUT *1000 ); | 1333 | startIdleTimeout(); |
1325 | mIdleStart = QDateTime::currentDateTime(); | ||
1326 | onlyOne = false; | 1334 | onlyOne = false; |
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index effd7a3..4b7ef5b 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -213,2 +213,3 @@ class KOAgendaView : public KOEventView { | |||
213 | void fillAgenda(); | 213 | void fillAgenda(); |
214 | void startIdleTimeout(); | ||
214 | 215 | ||