author | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
commit | ea40295e233db219dc2431960e18fb4398ddb75c (patch) (unidiff) | |
tree | 1d654ae51d7f65f4375787105951a8f4f9fc359e /kaddressbook/views/kaddressbooktableview.h | |
parent | 640874bb21ea348edb33a54690ad225e0efdd1e4 (diff) | |
download | kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.zip kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.gz kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.bz2 |
added better searching in kapi
Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h index ecfe7a1..865f8d5 100644 --- a/kaddressbook/views/kaddressbooktableview.h +++ b/kaddressbook/views/kaddressbooktableview.h | |||
@@ -1,115 +1,117 @@ | |||
1 | #ifndef KADDRESSBOOKTABLEVIEW_H | 1 | #ifndef KADDRESSBOOKTABLEVIEW_H |
2 | #define KADDRESSBOOKTABLEVIEW_H | 2 | #define KADDRESSBOOKTABLEVIEW_H |
3 | 3 | ||
4 | 4 | ||
5 | #ifndef KAB_EMBEDDED | 5 | #ifndef KAB_EMBEDDED |
6 | 6 | ||
7 | 7 | ||
8 | #ifdef HAVE_CONFIG_H | 8 | #ifdef HAVE_CONFIG_H |
9 | #include <config.h> | 9 | #include <config.h> |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #include <qwidget.h> | 12 | #include <qwidget.h> |
13 | #include <qlistview.h> | 13 | #include <qlistview.h> |
14 | #include <qstring.h> | 14 | #include <qstring.h> |
15 | #include <qdialog.h> | 15 | #include <qdialog.h> |
16 | #include <qtabdialog.h> | 16 | #include <qtabdialog.h> |
17 | #include <qstringlist.h> | 17 | #include <qstringlist.h> |
18 | #include <qvaluelist.h> | 18 | #include <qvaluelist.h> |
19 | 19 | ||
20 | #include "undo.h" | 20 | #include "undo.h" |
21 | 21 | ||
22 | #else //KAB_EMBEDDED | 22 | #else //KAB_EMBEDDED |
23 | #include "views/configuretableviewdialog.h" | 23 | #include "views/configuretableviewdialog.h" |
24 | #endif //KAB_EMBEDDED | 24 | #endif //KAB_EMBEDDED |
25 | 25 | ||
26 | #include "klocale.h" | 26 | #include "klocale.h" |
27 | #include "kaddressbookview.h" | 27 | #include "kaddressbookview.h" |
28 | 28 | ||
29 | class QListViewItem; | 29 | class QListViewItem; |
30 | class QListBox; | 30 | class QListBox; |
31 | class QVBoxLayout; | 31 | class QVBoxLayout; |
32 | class KConfig; | 32 | class KConfig; |
33 | 33 | ||
34 | class ContactListViewItem; | 34 | class ContactListViewItem; |
35 | class ContactListView; | 35 | class ContactListView; |
36 | 36 | ||
37 | 37 | ||
38 | namespace KABC { class AddressBook; } | 38 | namespace KABC { class AddressBook; } |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * This class is the table view for kaddressbook. This view is a KListView | 41 | * This class is the table view for kaddressbook. This view is a KListView |
42 | * with multiple columns for the selected fields. | 42 | * with multiple columns for the selected fields. |
43 | * | 43 | * |
44 | * @short Table View | 44 | * @short Table View |
45 | * @author Don Sanders <dsanders@kde.org> | 45 | * @author Don Sanders <dsanders@kde.org> |
46 | * @version 0.1 | 46 | * @version 0.1 |
47 | */ | 47 | */ |
48 | class KAddressBookTableView : public KAddressBookView | 48 | class KAddressBookTableView : public KAddressBookView |
49 | { | 49 | { |
50 | friend class ContactListView; | 50 | friend class ContactListView; |
51 | 51 | ||
52 | Q_OBJECT | 52 | Q_OBJECT |
53 | 53 | ||
54 | public: | 54 | public: |
55 | KAddressBookTableView( KABC::AddressBook *ab, QWidget *parent, | 55 | KAddressBookTableView( KABC::AddressBook *ab, QWidget *parent, |
56 | const char *name = 0 ); | 56 | const char *name = 0 ); |
57 | virtual ~KAddressBookTableView(); | 57 | virtual ~KAddressBookTableView(); |
58 | 58 | ||
59 | virtual void refresh(QString uid = QString::null); | 59 | virtual void refresh(QString uid = QString::null); |
60 | virtual QStringList selectedUids(); | 60 | virtual QStringList selectedUids(); |
61 | virtual void setSelected(QString uid = QString::null, bool selected = false); | 61 | virtual void setSelected(QString uid = QString::null, bool selected = false); |
62 | virtual void readConfig(KConfig *config); | 62 | virtual void readConfig(KConfig *config); |
63 | virtual void writeConfig(KConfig *config); | 63 | virtual void writeConfig(KConfig *config); |
64 | virtual QString type() const { return "Table"; } | 64 | virtual QString type() const { return "Table"; } |
65 | void doSearch( const QString& s ,KABC::Field *field ); | 65 | void doSearch( const QString& s ,KABC::Field *field ); |
66 | virtual void scrollUP(); | ||
67 | virtual void scrollDOWN(); | ||
66 | 68 | ||
67 | public slots: | 69 | public slots: |
68 | virtual void reconstructListView(); | 70 | virtual void reconstructListView(); |
69 | 71 | ||
70 | protected slots: | 72 | protected slots: |
71 | /** Called whenever the user selects an addressee in the list view. | 73 | /** Called whenever the user selects an addressee in the list view. |
72 | */ | 74 | */ |
73 | void addresseeSelected(); | 75 | void addresseeSelected(); |
74 | void addresseeDeleted(); | 76 | void addresseeDeleted(); |
75 | 77 | ||
76 | /** Called whenever the user executes an addressee. In terms of the | 78 | /** Called whenever the user executes an addressee. In terms of the |
77 | * list view, this is probably a double click | 79 | * list view, this is probably a double click |
78 | */ | 80 | */ |
79 | void addresseeExecuted(QListViewItem*); | 81 | void addresseeExecuted(QListViewItem*); |
80 | 82 | ||
81 | private: | 83 | private: |
82 | QVBoxLayout *mainLayout; | 84 | QVBoxLayout *mainLayout; |
83 | ContactListView *mListView; | 85 | ContactListView *mListView; |
84 | }; | 86 | }; |
85 | 87 | ||
86 | 88 | ||
87 | class TableViewFactory : public ViewFactory | 89 | class TableViewFactory : public ViewFactory |
88 | { | 90 | { |
89 | public: | 91 | public: |
90 | KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 92 | KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
91 | { | 93 | { |
92 | return new KAddressBookTableView( ab, parent, name ); | 94 | return new KAddressBookTableView( ab, parent, name ); |
93 | } | 95 | } |
94 | 96 | ||
95 | QString type() const { return "Table"; } | 97 | QString type() const { return "Table"; } |
96 | 98 | ||
97 | QString description() const { return i18n( "A listing of contacts in a table. Each cell of " | 99 | QString description() const { return i18n( "A listing of contacts in a table. Each cell of " |
98 | "the table holds a field of the contact." ); } | 100 | "the table holds a field of the contact." ); } |
99 | 101 | ||
100 | ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, | 102 | ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, |
101 | const char *name = 0 ) | 103 | const char *name = 0 ) |
102 | { | 104 | { |
103 | return new ConfigureTableViewWidget( ab, parent, name ); | 105 | return new ConfigureTableViewWidget( ab, parent, name ); |
104 | } | 106 | } |
105 | }; | 107 | }; |
106 | /*US | 108 | /*US |
107 | extern "C" { | 109 | extern "C" { |
108 | void *init_libkaddrbk_tableview() | 110 | void *init_libkaddrbk_tableview() |
109 | { | 111 | { |
110 | return ( new TableViewFactory ); | 112 | return ( new TableViewFactory ); |
111 | } | 113 | } |
112 | } | 114 | } |
113 | */ | 115 | */ |
114 | 116 | ||
115 | #endif | 117 | #endif |