author | zautrix <zautrix> | 2005-07-05 08:37:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-05 08:37:52 (UTC) |
commit | 7e49703511de87f624cc8813b18ebbfcc01752cd (patch) (side-by-side diff) | |
tree | 896918396dbf518f6358a066f93a04bd4185f535 | |
parent | 28ca4c37fb0e131b2978584992840b3fdca21d3e (diff) | |
download | kdepimpi-7e49703511de87f624cc8813b18ebbfcc01752cd.zip kdepimpi-7e49703511de87f624cc8813b18ebbfcc01752cd.tar.gz kdepimpi-7e49703511de87f624cc8813b18ebbfcc01752cd.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/koagenda.cpp | 35 | ||||
-rw-r--r-- | korganizer/koagenda.h | 3 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 22 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 1 |
4 files changed, 44 insertions, 17 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; -bool KOAgenda::mInvalidPixmap = false; + //////////////////////////////////////////////////////////////////////////// @@ -332,2 +332,3 @@ void KOAgenda::slotContentMove(int,int) { + emit sendPing(); if ( mActionType == NOP ) @@ -440,2 +441,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) { + + if ( mInvalidPixmap ) { + mInvalidPixmap = false; + qDebug("InvalidPixmap "); + computeSizes(); + emit updateViewSignal(); + return true; + } + emit sendPing(); static int startX = 0; @@ -1269,3 +1279,4 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) qDebug("InvalidPixmap "); - QTimer::singleShot( 0, this, SIGNAL( updateViewSignal() )); + computeSizes(); + emit updateViewSignal(); return; @@ -1276,5 +1287,8 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) //qDebug("KOAgenda::drawContents "); - if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) - ;//drawContentsToPainter(); - +#if 0 + if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { + qDebug("WAU "); + drawContentsToPainter(); + } +#endif QPaintDevice* pd = p->device(); @@ -1322,6 +1336,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) } else { - - if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) - ;//drawContentsToPainter(); - +#if 0 + qDebug("mCurPixWid %d %d ",mCurPixWid, contentsWidth() ); + if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { + qDebug("WAUWAU "); + drawContentsToPainter(); + } +#endif 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 virtual ~KOAgenda(); - static bool mInvalidPixmap; + bool mInvalidPixmap; @@ -176,2 +176,3 @@ class KOAgenda : public QScrollView void updateViewSignal(); + void sendPing(); 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; -#define IDLETIMEOUT 3 +#define IDLETIMEOUT 15 @@ -577,3 +577,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) ); - + + connect( mAllDayAgenda, SIGNAL( sendPing() ),this, SLOT( startIdleTimeout()) ); + connect( mAgenda, SIGNAL( sendPing() ), this, SLOT( startIdleTimeout()) ); + + mIdleTimer = new QTimer ( this );; @@ -581,2 +585,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : } +void KOAgendaView::startIdleTimeout() +{ + mIdleStart = QDateTime::currentDateTime(); + mIdleTimer->start( IDLETIMEOUT * 1000 ); +} void KOAgendaView::slotIdleTimeout() @@ -587,7 +596,7 @@ void KOAgendaView::slotIdleTimeout() bool isActice = topLevelWidget()->isActiveWindow(); - qDebug("KO: Active Window %d ", isActice); + qDebug("KO: Active Window %d %d", isActice, isVisible()); // we do nothing if we wake up from a suspend - if ( secsfromstart > IDLETIMEOUT + 50 && isActice ) { + if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) { qDebug("KO: Wakeup from suspend "); - mIdleTimer->start( IDLETIMEOUT * 1000 ); + startIdleTimeout(); return; @@ -1323,4 +1332,3 @@ void KOAgendaView::fillAgenda() repaintAgenda(); - mIdleTimer->start ( IDLETIMEOUT *1000 ); - mIdleStart = QDateTime::currentDateTime(); + startIdleTimeout(); 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 { void fillAgenda(); + void startIdleTimeout(); |