summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/kaddressbooktableview.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/views/kaddressbooktableview.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbooktableview.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h
index 38db7b4..c3cb038 100644
--- a/kaddressbook/views/kaddressbooktableview.h
+++ b/kaddressbook/views/kaddressbooktableview.h
@@ -1,55 +1,57 @@
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 <q3listview.h>
14#include <qstring.h> 14#include <qstring.h>
15#include <qdialog.h> 15#include <qdialog.h>
16#include <qtabdialog.h> 16#include <q3tabdialog.h>
17#include <qstringlist.h> 17#include <qstringlist.h>
18#include <qvaluelist.h> 18#include <q3valuelist.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//Added by qt3to4:
29#include <Q3VBoxLayout>
28 30
29class QListViewItem; 31class Q3ListViewItem;
30class QListBox; 32class Q3ListBox;
31class QVBoxLayout; 33class Q3VBoxLayout;
32class KConfig; 34class KConfig;
33 35
34class ContactListViewItem; 36class ContactListViewItem;
35class ContactListView; 37class ContactListView;
36 38
37 39
38namespace KABC { class AddressBook; } 40namespace KABC { class AddressBook; }
39 41
40/** 42/**
41 * This class is the table view for kaddressbook. This view is a KListView 43 * This class is the table view for kaddressbook. This view is a KListView
42 * with multiple columns for the selected fields. 44 * with multiple columns for the selected fields.
43 * 45 *
44 * @short Table View 46 * @short Table View
45 * @author Don Sanders <dsanders@kde.org> 47 * @author Don Sanders <dsanders@kde.org>
46 * @version 0.1 48 * @version 0.1
47 */ 49 */
48class KAddressBookTableView : public KAddressBookView 50class KAddressBookTableView : public KAddressBookView
49{ 51{
50friend class ContactListView; 52friend class ContactListView;
51 53
52 Q_OBJECT 54 Q_OBJECT
53 55
54 public: 56 public:
55 KAddressBookTableView( KABC::AddressBook *ab, QWidget *parent, 57 KAddressBookTableView( KABC::AddressBook *ab, QWidget *parent,
@@ -58,52 +60,52 @@ friend class ContactListView;
58 60
59 virtual void refresh(QString uid = QString::null); 61 virtual void refresh(QString uid = QString::null);
60 virtual QStringList selectedUids(); 62 virtual QStringList selectedUids();
61 virtual void setSelected(QString uid = QString::null, bool selected = false); 63 virtual void setSelected(QString uid = QString::null, bool selected = false);
62 virtual void readConfig(KConfig *config); 64 virtual void readConfig(KConfig *config);
63 virtual void writeConfig(KConfig *config); 65 virtual void writeConfig(KConfig *config);
64 virtual QString type() const { return "Table"; } 66 virtual QString type() const { return "Table"; }
65 void doSearch( const QString& s ,KABC::Field *field ); 67 void doSearch( const QString& s ,KABC::Field *field );
66 virtual void scrollUP(); 68 virtual void scrollUP();
67 virtual void scrollDOWN(); 69 virtual void scrollDOWN();
68 virtual void setFocusAV(); 70 virtual void setFocusAV();
69 71
70 public slots: 72 public slots:
71 virtual void reconstructListView(); 73 virtual void reconstructListView();
72 74
73 protected slots: 75 protected slots:
74 /** Called whenever the user selects an addressee in the list view. 76 /** Called whenever the user selects an addressee in the list view.
75 */ 77 */
76 void addresseeSelected(); 78 void addresseeSelected();
77 void addresseeDeleted(); 79 void addresseeDeleted();
78 80
79 /** Called whenever the user executes an addressee. In terms of the 81 /** Called whenever the user executes an addressee. In terms of the
80 * list view, this is probably a double click 82 * list view, this is probably a double click
81 */ 83 */
82 void addresseeExecuted(QListViewItem*); 84 void addresseeExecuted(Q3ListViewItem*);
83 85
84 private: 86 private:
85 QVBoxLayout *mainLayout; 87 Q3VBoxLayout *mainLayout;
86 ContactListView *mListView; 88 ContactListView *mListView;
87}; 89};
88 90
89 91
90class TableViewFactory : public ViewFactory 92class TableViewFactory : public ViewFactory
91{ 93{
92 public: 94 public:
93 KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, const char *name ) 95 KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, const char *name )
94 { 96 {
95 return new KAddressBookTableView( ab, parent, name ); 97 return new KAddressBookTableView( ab, parent, name );
96 } 98 }
97 99
98 QString type() const { return "Table"; } 100 QString type() const { return "Table"; }
99 101
100 QString description() const { return i18n( "A listing of contacts in a table. Each cell of " 102 QString description() const { return i18n( "A listing of contacts in a table. Each cell of "
101 "the table holds a field of the contact." ); } 103 "the table holds a field of the contact." ); }
102 104
103 ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, 105 ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent,
104 const char *name = 0 ) 106 const char *name = 0 )
105 { 107 {
106 return new ConfigureTableViewWidget( ab, parent, name ); 108 return new ConfigureTableViewWidget( ab, parent, name );
107 } 109 }
108}; 110};
109/*US 111/*US