summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
authorzautrix <zautrix>2005-07-05 07:37:53 (UTC)
committer zautrix <zautrix>2005-07-05 07:37:53 (UTC)
commit28ca4c37fb0e131b2978584992840b3fdca21d3e (patch) (unidiff)
treefb4f7e51c0995b71e2a26a7300747b6b1b3acb23 /korganizer/koagendaview.cpp
parent5992ea9025ebddde8be72322c90aac8edeaf4d1c (diff)
downloadkdepimpi-28ca4c37fb0e131b2978584992840b3fdca21d3e.zip
kdepimpi-28ca4c37fb0e131b2978584992840b3fdca21d3e.tar.gz
kdepimpi-28ca4c37fb0e131b2978584992840b3fdca21d3e.tar.bz2
fixesss
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index f811fba..488d9d4 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -78,3 +78,3 @@ using namespace KOrg;
78 78
79 79#define IDLETIMEOUT 3
80 80
@@ -575,5 +575,28 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
575 connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) ); 575 connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) );
576 connect( mAllDayAgenda, SIGNAL( updateViewSignal() ),this, SLOT( fillAgenda()) );
577 connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) );
576 578
579 mIdleTimer = new QTimer ( this );;
580 connect(mIdleTimer,SIGNAL(timeout()),SLOT(slotIdleTimeout()));
581}
582void KOAgendaView::slotIdleTimeout()
583{
584 qDebug("SECS TO %d ",mIdleStart.secsTo( QDateTime::currentDateTime() ) );
585 int secsfromstart = mIdleStart.secsTo( QDateTime::currentDateTime() );
586 mIdleTimer->stop();
587 bool isActice = topLevelWidget()->isActiveWindow();
588 qDebug("KO: Active Window %d ", isActice);
589 // we do nothing if we wake up from a suspend
590 if ( secsfromstart > IDLETIMEOUT + 50 && isActice ) {
591 qDebug("KO: Wakeup from suspend ");
592 mIdleTimer->start( IDLETIMEOUT * 1000 );
593 return;
594 }
595 qDebug("KO: Downsizing Pixmaps ");
596 mAgenda->shrinkPixmap();
597 mAllDayAgenda->shrinkPixmap();
598 KOAgendaItem::paintPix()->resize( 20,20);
599 KOAgendaItem::paintPixAllday()->resize( 20,20);
600
577} 601}
578
579void KOAgendaView::toggleAllDay() 602void KOAgendaView::toggleAllDay()
@@ -1300,2 +1323,4 @@ void KOAgendaView::fillAgenda()
1300 repaintAgenda(); 1323 repaintAgenda();
1324 mIdleTimer->start ( IDLETIMEOUT *1000 );
1325 mIdleStart = QDateTime::currentDateTime();
1301 onlyOne = false; 1326 onlyOne = false;
@@ -1343,3 +1368,3 @@ void KOAgendaView::slotShowDateView( int mode , int d )
1343 if ( d >= mSelectedDates.count() ) { 1368 if ( d >= mSelectedDates.count() ) {
1344 qDebug("KOAgendaView::slotShowDateView datecounterror %d d ", d, mSelectedDates.count() ); 1369 qDebug("KOAgendaView::slotShowDateView datecounterror %d %d ", d, mSelectedDates.count() );
1345 1370