Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 2412170..e40eb9e 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp | |||
@@ -30,48 +30,54 @@ | |||
30 | #include "kabprefs.h" | 30 | #include "kabprefs.h" |
31 | #include "undocmds.h" | 31 | #include "undocmds.h" |
32 | #include "viewmanager.h" | 32 | #include "viewmanager.h" |
33 | 33 | ||
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qheader.h> | 35 | #include <qheader.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | 37 | ||
38 | #include "kaddressbooktableview.h" | 38 | #include "kaddressbooktableview.h" |
39 | 39 | ||
40 | 40 | ||
41 | KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, | 41 | KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, |
42 | QWidget *parent, const char *name ) | 42 | QWidget *parent, const char *name ) |
43 | : KAddressBookView( ab, parent, name ) | 43 | : KAddressBookView( ab, parent, name ) |
44 | { | 44 | { |
45 | mainLayout = new QVBoxLayout( viewWidget(), 2 ); | 45 | mainLayout = new QVBoxLayout( viewWidget(), 2 ); |
46 | 46 | ||
47 | // The list view will be created when the config is read. | 47 | // The list view will be created when the config is read. |
48 | mListView = 0; | 48 | mListView = 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | KAddressBookTableView::~KAddressBookTableView() | 51 | KAddressBookTableView::~KAddressBookTableView() |
52 | { | 52 | { |
53 | } | 53 | } |
54 | void KAddressBookTableView::setFocusAV() | ||
55 | { | ||
56 | if ( mListView ) | ||
57 | mListView->setFocus(); | ||
58 | |||
59 | } | ||
54 | void KAddressBookTableView::scrollUP() | 60 | void KAddressBookTableView::scrollUP() |
55 | { | 61 | { |
56 | QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); | 62 | QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); |
57 | QApplication::postEvent( mListView, ev ); | 63 | QApplication::postEvent( mListView, ev ); |
58 | } | 64 | } |
59 | void KAddressBookTableView::scrollDOWN() | 65 | void KAddressBookTableView::scrollDOWN() |
60 | { | 66 | { |
61 | QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); | 67 | QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); |
62 | QApplication::postEvent( mListView, ev ); | 68 | QApplication::postEvent( mListView, ev ); |
63 | } | 69 | } |
64 | void KAddressBookTableView::reconstructListView() | 70 | void KAddressBookTableView::reconstructListView() |
65 | { | 71 | { |
66 | if (mListView) | 72 | if (mListView) |
67 | { | 73 | { |
68 | disconnect(mListView, SIGNAL(selectionChanged()), | 74 | disconnect(mListView, SIGNAL(selectionChanged()), |
69 | this, SLOT(addresseeSelected())); | 75 | this, SLOT(addresseeSelected())); |
70 | disconnect(mListView, SIGNAL(executed(QListViewItem*)), | 76 | disconnect(mListView, SIGNAL(executed(QListViewItem*)), |
71 | this, SLOT(addresseeExecuted(QListViewItem*))); | 77 | this, SLOT(addresseeExecuted(QListViewItem*))); |
72 | disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), | 78 | disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), |
73 | this, SLOT(addresseeExecuted(QListViewItem*))); | 79 | this, SLOT(addresseeExecuted(QListViewItem*))); |
74 | disconnect(mListView, SIGNAL(startAddresseeDrag()), this, | 80 | disconnect(mListView, SIGNAL(startAddresseeDrag()), this, |
75 | SIGNAL(startDrag())); | 81 | SIGNAL(startDrag())); |
76 | disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), | 82 | disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), |
77 | this, SLOT(addresseeExecuted(QListViewItem*))); | 83 | this, SLOT(addresseeExecuted(QListViewItem*))); |