summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/cardview.cpp13
1 files changed, 8 insertions, 5 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
@@ -653,12 +653,13 @@ CardView::CardView(QWidget *parent, const char *name)
653 viewport()->setMouseTracking( true ); 653 viewport()->setMouseTracking( true );
654 viewport()->setFocusProxy(this); 654 viewport()->setFocusProxy(this);
655 viewport()->setFocusPolicy(WheelFocus); 655 viewport()->setFocusPolicy(WheelFocus);
656 viewport()->setBackgroundMode(PaletteBase); 656 viewport()->setBackgroundMode(PaletteBase);
657 657
658 connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); 658 connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) );
659 connect( this, SIGNAL(executed(CardViewItem *)), this, SIGNAL( doubleClicked(CardViewItem *)) );
659 660
660//US setBackgroundMode(PaletteBackground, PaletteBase); 661//US setBackgroundMode(PaletteBackground, PaletteBase);
661 setBackgroundMode(PaletteBackground); 662 setBackgroundMode(PaletteBackground);
662 663
663 // no reason for a vertical scrollbar 664 // no reason for a vertical scrollbar
664 setVScrollBarMode(AlwaysOff); 665 setVScrollBarMode(AlwaysOff);
@@ -1263,14 +1264,14 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1263 d->mCurrentItem = item; 1264 d->mCurrentItem = item;
1264 } 1265 }
1265 1266
1266 if (item && !KGlobalSettings::singleClick()) 1267 if (item && !KGlobalSettings::singleClick())
1267 { 1268 {
1268 emit executed(item); 1269 emit executed(item);
1269 } 1270 } else
1270 emit doubleClicked(item); 1271 emit doubleClicked(item);
1271} 1272}
1272 1273
1273void CardView::contentsMouseMoveEvent( QMouseEvent *e ) 1274void CardView::contentsMouseMoveEvent( QMouseEvent *e )
1274{ 1275{
1275 // resizing 1276 // resizing
1276 if ( d->mResizeAnchor ) 1277 if ( d->mResizeAnchor )
@@ -1449,15 +1450,17 @@ void CardView::keyPressEvent( QKeyEvent *e )
1449 break; 1450 break;
1450 case Key_Space: 1451 case Key_Space:
1451 setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); 1452 setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() );
1452 emit selectionChanged(); 1453 emit selectionChanged();
1453 break; 1454 break;
1454 case Key_Return: 1455 case Key_Return:
1455 case Key_Enter: 1456 case Key_Enter:
1456 emit returnPressed( d->mCurrentItem ); 1457 {
1457 emit executed( d->mCurrentItem ); 1458 emit returnPressed( d->mCurrentItem );
1459 emit executed( d->mCurrentItem );
1460 }
1458 break; 1461 break;
1459 default: 1462 default:
1460 if ( (e->state() & ControlButton) && e->key() == Key_A ) 1463 if ( (e->state() & ControlButton) && e->key() == Key_A )
1461 { 1464 {
1462 // select all 1465 // select all
1463 selectAll( true ); 1466 selectAll( true );