Diffstat (limited to 'kaddressbook/kaddressbookview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kaddressbookview.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h index 3a3f71a..e423cd7 100644 --- a/kaddressbook/kaddressbookview.h +++ b/kaddressbook/kaddressbookview.h | |||
@@ -1,12 +1,14 @@ | |||
1 | //Added by qt3to4: | ||
2 | #include <QDropEvent> | ||
1 | /* | 3 | /* |
2 | This file is part of KAddressBook. | 4 | This file is part of KAddressBook. |
3 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> | 5 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> |
4 | 6 | ||
5 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 10 | (at your option) any later version. |
9 | 11 | ||
10 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
@@ -31,25 +33,25 @@ | |||
31 | class KConfig; | 33 | class KConfig; |
32 | class QDropEvent; | 34 | class QDropEvent; |
33 | 35 | ||
34 | #include <qstringlist.h> | 36 | #include <qstringlist.h> |
35 | #include <kabc/field.h> | 37 | #include <kabc/field.h> |
36 | #include <qwidget.h> | 38 | #include <qwidget.h> |
37 | #include <qregexp.h> | 39 | #include <qregexp.h> |
38 | 40 | ||
39 | #include "viewconfigurewidget.h" | 41 | #include "viewconfigurewidget.h" |
40 | #include "filter.h" | 42 | #include "filter.h" |
41 | 43 | ||
42 | #ifdef DESKTOP_VERSION | 44 | #ifdef DESKTOP_VERSION |
43 | #include <qpaintdevicemetrics.h> | 45 | #include <q3paintdevicemetrics.h> |
44 | #include <qprinter.h> | 46 | #include <qprinter.h> |
45 | #include <qpainter.h> | 47 | #include <qpainter.h> |
46 | #endif | 48 | #endif |
47 | 49 | ||
48 | namespace KABC { class AddressBook; } | 50 | namespace KABC { class AddressBook; } |
49 | 51 | ||
50 | /** | 52 | /** |
51 | Base class for all views in kaddressbook. This class implements | 53 | Base class for all views in kaddressbook. This class implements |
52 | all the common methods needed to provide a view to the user. | 54 | all the common methods needed to provide a view to the user. |
53 | 55 | ||
54 | To implement a specific view (table, card, etc), just inherit from | 56 | To implement a specific view (table, card, etc), just inherit from |
55 | this class and implement all the pure virtuals. | 57 | this class and implement all the pure virtuals. |
@@ -166,27 +168,27 @@ class KAddressBookView : public QWidget | |||
166 | in the document are visible. If <i>uid</i> is valid, only the | 168 | in the document are visible. If <i>uid</i> is valid, only the |
167 | addressee with uid needs to be refreshed. This is an optimization | 169 | addressee with uid needs to be refreshed. This is an optimization |
168 | only. | 170 | only. |
169 | */ | 171 | */ |
170 | virtual void refresh( QString uid = QString::null ) = 0; | 172 | virtual void refresh( QString uid = QString::null ) = 0; |
171 | 173 | ||
172 | /** | 174 | /** |
173 | This method must be overloaded in subclasses. Select (highlight) | 175 | This method must be overloaded in subclasses. Select (highlight) |
174 | the addressee matching <i>uid</i>. If uid | 176 | the addressee matching <i>uid</i>. If uid |
175 | is equal to QString::null, then all addressees should be selected. | 177 | is equal to QString::null, then all addressees should be selected. |
176 | */ | 178 | */ |
177 | #ifndef KAB_EMBEDDED | 179 | #ifndef KAB_EMBEDDED |
178 | //MOC_SKIP_BEGIN | 180 | #ifndef Q_MOC_RUN |
179 | virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; | 181 | virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; |
180 | //MOC_SKIP_END | 182 | #endif |
181 | #else //KAB_EMBEDDED | 183 | #else //KAB_EMBEDDED |
182 | //US my moc can not handle the default parameters. Is this a problem ??? | 184 | //US my moc can not handle the default parameters. Is this a problem ??? |
183 | virtual void setSelected( QString uid, bool selected) = 0; | 185 | virtual void setSelected( QString uid, bool selected) = 0; |
184 | #endif //KAB_EMBEDDED | 186 | #endif //KAB_EMBEDDED |
185 | 187 | ||
186 | signals: | 188 | signals: |
187 | 189 | ||
188 | void printView(); | 190 | void printView(); |
189 | /** | 191 | /** |
190 | This signal should be emitted by a subclass whenever an addressee | 192 | This signal should be emitted by a subclass whenever an addressee |
191 | is modified. | 193 | is modified. |
192 | */ | 194 | */ |
@@ -253,27 +255,27 @@ class KAddressBookView : public QWidget | |||
253 | void initGUI(); | 255 | void initGUI(); |
254 | 256 | ||
255 | DefaultFilterType mDefaultFilterType; | 257 | DefaultFilterType mDefaultFilterType; |
256 | Filter mFilter; | 258 | Filter mFilter; |
257 | QString mDefaultFilterName; | 259 | QString mDefaultFilterName; |
258 | KABC::AddressBook *mAddressBook; | 260 | KABC::AddressBook *mAddressBook; |
259 | KABC::Field::List mFieldList; | 261 | KABC::Field::List mFieldList; |
260 | 262 | ||
261 | QWidget *mViewWidget; | 263 | QWidget *mViewWidget; |
262 | }; | 264 | }; |
263 | 265 | ||
264 | #ifndef KAB_EMBEDDED | 266 | #ifndef KAB_EMBEDDED |
265 | //MOC_SKIP_BEGIN | 267 | #ifndef Q_MOC_RUN |
266 | class ViewFactory : public KLibFactory | 268 | class ViewFactory : public KLibFactory |
267 | //MOC_SKIP_END | 269 | #endif |
268 | #else //KAB_EMBEDDED | 270 | #else //KAB_EMBEDDED |
269 | class ViewFactory | 271 | class ViewFactory |
270 | #endif //KAB_EMBEDDED | 272 | #endif //KAB_EMBEDDED |
271 | { | 273 | { |
272 | 274 | ||
273 | public: | 275 | public: |
274 | virtual KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, | 276 | virtual KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, |
275 | const char *name = 0 ) = 0; | 277 | const char *name = 0 ) = 0; |
276 | 278 | ||
277 | /** | 279 | /** |
278 | @return The type of the view. This is normally a small one word | 280 | @return The type of the view. This is normally a small one word |
279 | string (ie: Table, Icon, Tree, etc). | 281 | string (ie: Table, Icon, Tree, etc). |