author | zautrix <zautrix> | 2004-10-29 10:42:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 10:42:31 (UTC) |
commit | d96b4fd7188145c49120dd159b0ac00c987f4972 (patch) (side-by-side diff) | |
tree | ba8f3910a72938aa44aa82a477bbd84f5414a214 /kaddressbook/views | |
parent | e152dd9c19c69e6efff6c593b2bf081bc426c7d5 (diff) | |
download | kdepimpi-d96b4fd7188145c49120dd159b0ac00c987f4972.zip kdepimpi-d96b4fd7188145c49120dd159b0ac00c987f4972.tar.gz kdepimpi-d96b4fd7188145c49120dd159b0ac00c987f4972.tar.bz2 |
made cardview handling singleclick and return pressed
-rw-r--r-- | kaddressbook/views/cardview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ -655,8 +655,9 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setFocusPolicy(WheelFocus); 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); @@ -1265,9 +1266,9 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) if (item && !KGlobalSettings::singleClick()) { emit executed(item); - } + } else emit doubleClicked(item); } void CardView::contentsMouseMoveEvent( QMouseEvent *e ) @@ -1452,10 +1453,12 @@ void CardView::keyPressEvent( QKeyEvent *e ) emit selectionChanged(); break; case Key_Return: case Key_Enter: + { emit returnPressed( d->mCurrentItem ); emit executed( d->mCurrentItem ); + } break; default: if ( (e->state() & ControlButton) && e->key() == Key_A ) { |