summaryrefslogtreecommitdiff
path: root/core/launcher/launcherview.cpp
Unidiff
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp28
1 files changed, 27 insertions, 1 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
@@ -268,12 +268,13 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name )
268{ 268{
269 m_EyeCallBack = 0; 269 m_EyeCallBack = 0;
270 sortmeth = Name; 270 sortmeth = Name;
271 hidden.setAutoDelete(TRUE); 271 hidden.setAutoDelete(TRUE);
272 ike = FALSE; 272 ike = FALSE;
273 calculateGrid( Bottom ); 273 calculateGrid( Bottom );
274 connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer()));
274} 275}
275 276
276LauncherIconView::~LauncherIconView() 277LauncherIconView::~LauncherIconView()
277{ 278{
278#if 0 // debuggery 279#if 0 // debuggery
279 QListIterator<AppLnk> it(hidden); 280 QListIterator<AppLnk> it(hidden);
@@ -452,18 +453,29 @@ void LauncherIconView::addCheckItem(AppLnk* app)
452} 453}
453 454
454void LauncherIconView::requestEyePix(const LauncherItem*item) 455void LauncherIconView::requestEyePix(const LauncherItem*item)
455{ 456{
456 if (!item) return; 457 if (!item) return;
457 if (item->isEyeImage()) { 458 if (item->isEyeImage()) {
459 m_eyeTimer.changeInterval(600000);
458 checkCallback(); 460 checkCallback();
459 int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); 461 int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
460 m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); 462 m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s);
461 } 463 }
462} 464}
463 465
466void 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
464void LauncherIconView::addItem(AppLnk* app, bool resort) 476void LauncherIconView::addItem(AppLnk* app, bool resort)
465{ 477{
466 addCatsAndMimes(app); 478 addCatsAndMimes(app);
467 if ( (tf.isEmpty() || tf.match(app->type()) >= 0) 479 if ( (tf.isEmpty() || tf.match(app->type()) >= 0)
468 && (cf == 0 || app->categories().contains(cf) 480 && (cf == 0 || app->categories().contains(cf)
469 || cf == -1 && app->categories().count() == 0 ) ) { 481 || cf == -1 && app->categories().count() == 0 ) ) {
@@ -598,12 +610,27 @@ void LauncherIconView::calculateGrid( ItemTextPos pos )
598 610
599void LauncherIconView::styleChange( QStyle &old ) 611void LauncherIconView::styleChange( QStyle &old )
600{ 612{
601 QIconView::styleChange( old ); 613 QIconView::styleChange( old );
602 calculateGrid( itemTextPos() ); 614 calculateGrid( itemTextPos() );
603} 615}
616
617void 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//===========================================================================
605// Implemantation of LauncherIconview end 632// Implemantation of LauncherIconview end
606//=========================================================================== 633//===========================================================================
607 634
608 635
609//=========================================================================== 636//===========================================================================
@@ -1120,13 +1147,12 @@ void LauncherThumbReceiver::recieve( const QCString&str, const QByteArray&at )
1120 1147
1121 /* we are just interested in thumbmails */ 1148 /* we are just interested in thumbmails */
1122 if ( str == "pixmapsHandled(PixmapList)" ) 1149 if ( str == "pixmapsHandled(PixmapList)" )
1123 stream >> pixinfos; 1150 stream >> pixinfos;
1124 1151
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);
1128 } 1154 }
1129} 1155}
1130 1156
1131void LauncherThumbReceiver::requestThumb(const QString&file,int width,int height) 1157void LauncherThumbReceiver::requestThumb(const QString&file,int width,int height)
1132{ 1158{