Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index fbfddba..2412170 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp @@ -53,3 +53,12 @@ KAddressBookTableView::~KAddressBookTableView() } - +void KAddressBookTableView::scrollUP() +{ + QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); + QApplication::postEvent( mListView, ev ); +} +void KAddressBookTableView::scrollDOWN() +{ + QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); + QApplication::postEvent( mListView, ev ); +} void KAddressBookTableView::reconstructListView() @@ -161,3 +170,8 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field ) mListView->repaint(); - emit selected(QString::null); + if ( mListView->firstChild() ) { + mListView->setCurrentItem ( mListView->firstChild() ); + mListView->setSelected ( mListView->firstChild(), true ); + } + else + emit selected(QString::null); |