author | alwin <alwin> | 2004-11-08 20:26:03 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-08 20:26:03 (UTC) |
commit | 1480f96170cb7cd7c262a14ad56ff08f384de10f (patch) (unidiff) | |
tree | ef83e5ce722809c0e84fd88ff885132098a67bf4 | |
parent | cce0a7a0d315993645870e88591b4afd647480a7 (diff) | |
download | opie-1480f96170cb7cd7c262a14ad56ff08f384de10f.zip opie-1480f96170cb7cd7c262a14ad56ff08f384de10f.tar.gz opie-1480f96170cb7cd7c262a14ad56ff08f384de10f.tar.bz2 |
timer for releasing a reference to opie-eye_slave if exists when unused for ten
minutes.
-rw-r--r-- | core/launcher/launcherview.cpp | 28 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 22 |
2 files changed, 33 insertions, 17 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 506c11e..42704ba 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -273,2 +273,3 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) | |||
273 | calculateGrid( Bottom ); | 273 | calculateGrid( Bottom ); |
274 | connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); | ||
274 | } | 275 | } |
@@ -457,2 +458,3 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) | |||
457 | if (item->isEyeImage()) { | 458 | if (item->isEyeImage()) { |
459 | m_eyeTimer.changeInterval(600000); | ||
458 | checkCallback(); | 460 | checkCallback(); |
@@ -463,2 +465,12 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) | |||
463 | 465 | ||
466 | void LauncherIconView::stopEyeTimer() | ||
467 | { | ||
468 | odebug << "Launcherview: delete opie-eye handle" << oendl; | ||
469 | if (m_EyeCallBack) { | ||
470 | delete m_EyeCallBack; | ||
471 | m_EyeCallBack=0; | ||
472 | } | ||
473 | m_eyeTimer.stop(); | ||
474 | } | ||
475 | |||
464 | void LauncherIconView::addItem(AppLnk* app, bool resort) | 476 | void LauncherIconView::addItem(AppLnk* app, bool resort) |
@@ -603,2 +615,17 @@ void LauncherIconView::styleChange( QStyle &old ) | |||
603 | } | 615 | } |
616 | |||
617 | void LauncherIconView::keyPressEvent(QKeyEvent* e) | ||
618 | { | ||
619 | ike = TRUE; | ||
620 | if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) { | ||
621 | if ( (e->state() & ShiftButton) ) | ||
622 | emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() ); | ||
623 | else | ||
624 | returnPressed(currentItem()); | ||
625 | } | ||
626 | |||
627 | QIconView::keyPressEvent(e); | ||
628 | ike = FALSE; | ||
629 | } | ||
630 | |||
604 | //=========================================================================== | 631 | //=========================================================================== |
@@ -1125,3 +1152,2 @@ void LauncherThumbReceiver::recieve( const QCString&str, const QByteArray&at ) | |||
1125 | for ( PixmapInfos::Iterator it = pixinfos.begin(); it != pixinfos.end(); ++it ) { | 1152 | for ( PixmapInfos::Iterator it = pixinfos.begin(); it != pixinfos.end(); ++it ) { |
1126 | odebug << "Pixinfos: " << (*it).file << " - " << (*it).width << oendl; | ||
1127 | emit sig_Thumbnail((*it).pixmap,(*it).file,(*it).width); | 1153 | emit sig_Thumbnail((*it).pixmap,(*it).file,(*it).width); |
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 0be9a1f..ebb1362 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -27,2 +27,3 @@ | |||
27 | #include <qiconview.h> | 27 | #include <qiconview.h> |
28 | #include <qtimer.h> | ||
28 | 29 | ||
@@ -175,16 +176,2 @@ public: | |||
175 | 176 | ||
176 | void keyPressEvent(QKeyEvent* e) | ||
177 | { | ||
178 | ike = TRUE; | ||
179 | if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) { | ||
180 | if ( (e->state() & ShiftButton) ) | ||
181 | emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() ); | ||
182 | else | ||
183 | returnPressed(currentItem()); | ||
184 | } | ||
185 | |||
186 | QIconView::keyPressEvent(e); | ||
187 | ike = FALSE; | ||
188 | } | ||
189 | |||
190 | void addItem(AppLnk* app, bool resort=TRUE); | 177 | void addItem(AppLnk* app, bool resort=TRUE); |
@@ -221,3 +208,3 @@ public: | |||
221 | protected: | 208 | protected: |
222 | void timerEvent( QTimerEvent *te ); | 209 | virtual void timerEvent( QTimerEvent *te ); |
223 | void styleChange( QStyle &old ); | 210 | void styleChange( QStyle &old ); |
@@ -229,2 +216,3 @@ protected: | |||
229 | void checkCallback(); | 216 | void checkCallback(); |
217 | virtual void keyPressEvent(QKeyEvent* e); | ||
230 | 218 | ||
@@ -232,2 +220,3 @@ protected slots: | |||
232 | void setEyePixmap(const QPixmap&,const QString&,int width); | 220 | void setEyePixmap(const QPixmap&,const QString&,int width); |
221 | void stopEyeTimer(); | ||
233 | 222 | ||
@@ -250,3 +239,4 @@ private: | |||
250 | #endif | 239 | #endif |
251 | BusyIndicatorType busyType; | 240 | BusyIndicatorType busyType; |
241 | QTimer m_eyeTimer; | ||
252 | }; | 242 | }; |