summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/kaddressbooktableview.h
Unidiff
Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbooktableview.h2
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
@@ -18,96 +18,98 @@
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
29class QListViewItem; 29class QListViewItem;
30class QListBox; 30class QListBox;
31class QVBoxLayout; 31class QVBoxLayout;
32class KConfig; 32class KConfig;
33 33
34class ContactListViewItem; 34class ContactListViewItem;
35class ContactListView; 35class ContactListView;
36 36
37 37
38namespace KABC { class AddressBook; } 38namespace 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 */
48class KAddressBookTableView : public KAddressBookView 48class KAddressBookTableView : public KAddressBookView
49{ 49{
50friend class ContactListView; 50friend 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
87class TableViewFactory : public ViewFactory 89class 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
107extern "C" { 109extern "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*/