summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookview.h
Unidiff
Diffstat (limited to 'kaddressbook/kaddressbookview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookview.h12
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,16 +1,18 @@
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
13 GNU General Public License for more details. 15 GNU General Public License for more details.
14 16
15 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
@@ -27,33 +29,33 @@
27#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
28#include <klibloader.h> 30#include <klibloader.h>
29#endif //KAB_EMBEDDED 31#endif //KAB_EMBEDDED
30 32
31class KConfig; 33class KConfig;
32class QDropEvent; 34class 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
48namespace KABC { class AddressBook; } 50namespace 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.
56 58
57 @author Mike Pilone <mpilone@slac.com> 59 @author Mike Pilone <mpilone@slac.com>
58 */ 60 */
59class KAddressBookView : public QWidget 61class KAddressBookView : public QWidget
@@ -162,35 +164,35 @@ class KAddressBookView : public QWidget
162 public slots: 164 public slots:
163 /** 165 /**
164 Must be overloaded in subclasses to refresh the view. 166 Must be overloaded in subclasses to refresh the view.
165 Refreshing includes updating the view to ensure that only items 167 Refreshing includes updating the view to ensure that only items
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 */
193 void modified(); 195 void modified();
194 196
195 /** 197 /**
196 This signal should be emitted by a subclass whenever an addressee 198 This signal should be emitted by a subclass whenever an addressee
@@ -249,35 +251,35 @@ class KAddressBookView : public QWidget
249 QWidget *viewWidget(); 251 QWidget *viewWidget();
250 QRegExp getRegExp( const QString ); 252 QRegExp getRegExp( const QString );
251 253
252 private: 254 private:
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
266class ViewFactory : public KLibFactory 268class ViewFactory : public KLibFactory
267//MOC_SKIP_END 269#endif
268#else //KAB_EMBEDDED 270#else //KAB_EMBEDDED
269class ViewFactory 271class 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).
280 */ 282 */
281 virtual QString type() const = 0; 283 virtual QString type() const = 0;
282 284
283 /** 285 /**