-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 ) calculateGrid( Bottom ); + connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); } @@ -457,2 +458,3 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) if (item->isEyeImage()) { + m_eyeTimer.changeInterval(600000); checkCallback(); @@ -463,2 +465,12 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) +void LauncherIconView::stopEyeTimer() +{ + odebug << "Launcherview: delete opie-eye handle" << oendl; + if (m_EyeCallBack) { + delete m_EyeCallBack; + m_EyeCallBack=0; + } + m_eyeTimer.stop(); +} + void LauncherIconView::addItem(AppLnk* app, bool resort) @@ -603,2 +615,17 @@ void LauncherIconView::styleChange( QStyle &old ) } + +void LauncherIconView::keyPressEvent(QKeyEvent* e) +{ + ike = TRUE; + if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) { + if ( (e->state() & ShiftButton) ) + emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() ); + else + returnPressed(currentItem()); + } + + QIconView::keyPressEvent(e); + ike = FALSE; +} + //=========================================================================== @@ -1125,3 +1152,2 @@ void LauncherThumbReceiver::recieve( const QCString&str, const QByteArray&at ) for ( PixmapInfos::Iterator it = pixinfos.begin(); it != pixinfos.end(); ++it ) { - odebug << "Pixinfos: " << (*it).file << " - " << (*it).width << oendl; 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 @@ #include <qiconview.h> +#include <qtimer.h> @@ -175,16 +176,2 @@ public: - void keyPressEvent(QKeyEvent* e) - { - ike = TRUE; - if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) { - if ( (e->state() & ShiftButton) ) - emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() ); - else - returnPressed(currentItem()); - } - - QIconView::keyPressEvent(e); - ike = FALSE; - } - void addItem(AppLnk* app, bool resort=TRUE); @@ -221,3 +208,3 @@ public: protected: - void timerEvent( QTimerEvent *te ); + virtual void timerEvent( QTimerEvent *te ); void styleChange( QStyle &old ); @@ -229,2 +216,3 @@ protected: void checkCallback(); + virtual void keyPressEvent(QKeyEvent* e); @@ -232,2 +220,3 @@ protected slots: void setEyePixmap(const QPixmap&,const QString&,int width); + void stopEyeTimer(); @@ -250,3 +239,4 @@ private: #endif - BusyIndicatorType busyType; + BusyIndicatorType busyType; + QTimer m_eyeTimer; }; |