From d96b4fd7188145c49120dd159b0ac00c987f4972 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 29 Oct 2004 10:42:31 +0000 Subject: made cardview handling singleclick and return pressed --- diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index 65f793c..6351c11 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -656,6 +656,7 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setBackgroundMode(PaletteBase); connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); + connect( this, SIGNAL(executed(CardViewItem *)), this, SIGNAL( doubleClicked(CardViewItem *)) ); //US setBackgroundMode(PaletteBackground, PaletteBase); setBackgroundMode(PaletteBackground); @@ -1266,8 +1267,8 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) if (item && !KGlobalSettings::singleClick()) { emit executed(item); - } - emit doubleClicked(item); + } else + emit doubleClicked(item); } void CardView::contentsMouseMoveEvent( QMouseEvent *e ) @@ -1452,9 +1453,11 @@ void CardView::keyPressEvent( QKeyEvent *e ) emit selectionChanged(); break; case Key_Return: - case Key_Enter: - emit returnPressed( d->mCurrentItem ); - emit executed( d->mCurrentItem ); + case Key_Enter: + { + emit returnPressed( d->mCurrentItem ); + emit executed( d->mCurrentItem ); + } break; default: if ( (e->state() & ControlButton) && e->key() == Key_A ) -- cgit v0.9.0.2