Diffstat (limited to 'kaddressbook/kaddressbookview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kaddressbookview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp index 86898e2..4823b37 100644 --- a/kaddressbook/kaddressbookview.cpp +++ b/kaddressbook/kaddressbookview.cpp | |||
@@ -19,32 +19,34 @@ | |||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef KAB_EMBEDDED | 24 | #ifndef KAB_EMBEDDED |
25 | #include <qapplication.h> | 25 | #include <qapplication.h> |
26 | 26 | ||
27 | #include <kabc/distributionlistdialog.h> | 27 | #include <kabc/distributionlistdialog.h> |
28 | #include <kconfig.h> | 28 | #include <kconfig.h> |
29 | #include <klocale.h> | 29 | #include <klocale.h> |
30 | 30 | ||
31 | #include "viewmanager.h" | 31 | #include "viewmanager.h" |
32 | 32 | ||
33 | #endif //KAB_EMBEDDED | 33 | #endif //KAB_EMBEDDED |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | //Added by qt3to4: | ||
36 | #include <Q3VBoxLayout> | ||
35 | 37 | ||
36 | #include <kabc/distributionlistdialog.h> | 38 | #include <kabc/distributionlistdialog.h> |
37 | #include <kabc/addressbook.h> | 39 | #include <kabc/addressbook.h> |
38 | #include <kdebug.h> | 40 | #include <kdebug.h> |
39 | 41 | ||
40 | #include "kaddressbookview.h" | 42 | #include "kaddressbookview.h" |
41 | 43 | ||
42 | KAddressBookView::KAddressBookView( KABC::AddressBook *ab, QWidget *parent, | 44 | KAddressBookView::KAddressBookView( KABC::AddressBook *ab, QWidget *parent, |
43 | const char *name ) | 45 | const char *name ) |
44 | : QWidget( parent, name ), mAddressBook( ab ), mFieldList() | 46 | : QWidget( parent, name ), mAddressBook( ab ), mFieldList() |
45 | { | 47 | { |
46 | 48 | ||
47 | initGUI(); | 49 | initGUI(); |
48 | } | 50 | } |
49 | 51 | ||
50 | KAddressBookView::~KAddressBookView() | 52 | KAddressBookView::~KAddressBookView() |
@@ -120,33 +122,33 @@ QString KAddressBookView::selectedEmails() | |||
120 | KABC::Addressee::List KAddressBookView::addressees() | 122 | KABC::Addressee::List KAddressBookView::addressees() |
121 | { | 123 | { |
122 | KABC::Addressee::List addresseeList; | 124 | KABC::Addressee::List addresseeList; |
123 | 125 | ||
124 | KABC::AddressBook::Iterator it; | 126 | KABC::AddressBook::Iterator it; |
125 | for (it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 127 | for (it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
126 | if ( mFilter.filterAddressee( *it ) ) | 128 | if ( mFilter.filterAddressee( *it ) ) |
127 | addresseeList.append( *it ); | 129 | addresseeList.append( *it ); |
128 | } | 130 | } |
129 | 131 | ||
130 | return addresseeList; | 132 | return addresseeList; |
131 | } | 133 | } |
132 | 134 | ||
133 | void KAddressBookView::initGUI() | 135 | void KAddressBookView::initGUI() |
134 | { | 136 | { |
135 | // Create the layout | 137 | // Create the layout |
136 | QVBoxLayout *layout = new QVBoxLayout( this ); | 138 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
137 | 139 | ||
138 | // Add the view widget | 140 | // Add the view widget |
139 | mViewWidget = new QWidget( this ); | 141 | mViewWidget = new QWidget( this ); |
140 | layout->addWidget( mViewWidget ); | 142 | layout->addWidget( mViewWidget ); |
141 | } | 143 | } |
142 | 144 | ||
143 | KABC::Field::List KAddressBookView::fields() const | 145 | KABC::Field::List KAddressBookView::fields() const |
144 | { | 146 | { |
145 | return mFieldList; | 147 | return mFieldList; |
146 | } | 148 | } |
147 | KABC::Field::List KAddressBookView::allFields() const | 149 | KABC::Field::List KAddressBookView::allFields() const |
148 | { | 150 | { |
149 | return KABC::Field::allFields(); | 151 | return KABC::Field::allFields(); |
150 | } | 152 | } |
151 | 153 | ||
152 | void KAddressBookView::setFilter( const Filter &filter ) | 154 | void KAddressBookView::setFilter( const Filter &filter ) |
@@ -170,19 +172,19 @@ KABC::AddressBook *KAddressBookView::addressBook() const | |||
170 | } | 172 | } |
171 | 173 | ||
172 | QWidget *KAddressBookView::viewWidget() | 174 | QWidget *KAddressBookView::viewWidget() |
173 | { | 175 | { |
174 | return mViewWidget; | 176 | return mViewWidget; |
175 | } | 177 | } |
176 | 178 | ||
177 | ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab, | 179 | ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab, |
178 | QWidget *parent, | 180 | QWidget *parent, |
179 | const char *name ) | 181 | const char *name ) |
180 | { | 182 | { |
181 | return new ViewConfigureWidget( ab, parent, name ); | 183 | return new ViewConfigureWidget( ab, parent, name ); |
182 | } | 184 | } |
183 | 185 | ||
184 | 186 | ||
185 | 187 | ||
186 | #ifndef KAB_EMBEDDED | 188 | #ifndef KAB_EMBEDDED_ |
187 | #include "kaddressbookview.moc" | 189 | #include "moc_kaddressbookview.cpp" |
188 | #endif //KAB_EMBEDDED | 190 | #endif //KAB_EMBEDDED |