summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/kaddressbookiconview.h
Unidiff
Diffstat (limited to 'kaddressbook/views/kaddressbookiconview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbookiconview.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h
index 963ee7c..acfcd71 100644
--- a/kaddressbook/views/kaddressbookiconview.h
+++ b/kaddressbook/views/kaddressbookiconview.h
@@ -16,96 +16,98 @@
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
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 KADDRESSBOOKICONVIEW_H 24#ifndef KADDRESSBOOKICONVIEW_H
25#define KADDRESSBOOKICONVIEW_H 25#define KADDRESSBOOKICONVIEW_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#ifndef KAB_EMBEDDED 28#ifndef KAB_EMBEDDED
29#include <kiconview.h> 29#include <kiconview.h>
30#else //KAB_EMBEDDED 30#else //KAB_EMBEDDED
31#include <qiconview.h> 31#include <qiconview.h>
32#include <qptrlist.h> 32#include <qptrlist.h>
33#include <klocale.h> 33#include <klocale.h>
34#endif //KAB_EMBEDDED 34#endif //KAB_EMBEDDED
35#include "kaddressbookview.h" 35#include "kaddressbookview.h"
36 36
37class QIconViewItem; 37class QIconViewItem;
38class KConfig; 38class KConfig;
39class AddresseeIconView; 39class AddresseeIconView;
40class AddresseeIconViewItem; 40class AddresseeIconViewItem;
41class QIconDragItem; 41class QIconDragItem;
42class KAddressBookIconView; 42class KAddressBookIconView;
43 43
44namespace KABC { class AddressBook; } 44namespace KABC { class AddressBook; }
45 45
46/** This is an example kaddressbook view that is implemented using 46/** This is an example kaddressbook view that is implemented using
47* KIconView. This view is not the most useful view, but it displays 47* KIconView. This view is not the most useful view, but it displays
48* how simple implementing a new view can be. 48* how simple implementing a new view can be.
49*/ 49*/
50class KAddressBookIconView : public KAddressBookView 50class KAddressBookIconView : public KAddressBookView
51{ 51{
52 Q_OBJECT 52 Q_OBJECT
53 53
54 public: 54 public:
55 KAddressBookIconView( KABC::AddressBook *ab, QWidget *parent, 55 KAddressBookIconView( KABC::AddressBook *ab, QWidget *parent,
56 const char *name = 0 ); 56 const char *name = 0 );
57 virtual ~KAddressBookIconView(); 57 virtual ~KAddressBookIconView();
58 58
59 virtual QStringList selectedUids(); 59 virtual QStringList selectedUids();
60 virtual QString type() const { return "Icon"; } 60 virtual QString type() const { return "Icon"; }
61 void doSearch( const QString& s ,KABC::Field *field ); 61 void doSearch( const QString& s ,KABC::Field *field );
62 62
63 virtual void readConfig(KConfig *config); 63 virtual void readConfig(KConfig *config);
64 virtual void scrollUP();
65 virtual void scrollDOWN();
64 66
65 public slots: 67 public slots:
66 void refresh(QString uid = QString::null); 68 void refresh(QString uid = QString::null);
67#ifndef KAB_EMBEDDED 69#ifndef KAB_EMBEDDED
68//MOC_SKIP_BEGIN 70//MOC_SKIP_BEGIN
69 void setSelected(QString uid = QString::null, bool selected = true); 71 void setSelected(QString uid = QString::null, bool selected = true);
70//MOC_SKIP_END 72//MOC_SKIP_END
71#else //KAB_EMBEDDED 73#else //KAB_EMBEDDED
72//US my MOC do not like default parameters ??? 74//US my MOC do not like default parameters ???
73 void setSelected(QString uid, bool selected); 75 void setSelected(QString uid, bool selected);
74#endif //KAB_EMBEDDED 76#endif //KAB_EMBEDDED
75 77
76 protected slots: 78 protected slots:
77 void addresseeExecuted(QIconViewItem *item); 79 void addresseeExecuted(QIconViewItem *item);
78 void addresseeSelected(); 80 void addresseeSelected();
79 81
80 private: 82 private:
81 AddresseeIconView *mIconView; 83 AddresseeIconView *mIconView;
82 QPtrList<AddresseeIconViewItem> mIconList; 84 QPtrList<AddresseeIconViewItem> mIconList;
83}; 85};
84 86
85 87
86#ifndef KAB_EMBEDDED 88#ifndef KAB_EMBEDDED
87//MOC_SKIP_BEGIN 89//MOC_SKIP_BEGIN
88class AddresseeIconView : public KIconView 90class AddresseeIconView : public KIconView
89//MOC_SKIP_END 91//MOC_SKIP_END
90#else //KAB_EMBEDDED 92#else //KAB_EMBEDDED
91class AddresseeIconView : public QIconView 93class AddresseeIconView : public QIconView
92#endif //KAB_EMBEDDED 94#endif //KAB_EMBEDDED
93{ 95{
94 Q_OBJECT 96 Q_OBJECT
95 97
96 public: 98 public:
97 AddresseeIconView(QWidget *parent, const char *name); 99 AddresseeIconView(QWidget *parent, const char *name);
98 ~AddresseeIconView(); 100 ~AddresseeIconView();
99 101
100 signals: 102 signals:
101 void addresseeDropped(QDropEvent *); 103 void addresseeDropped(QDropEvent *);
102 void startAddresseeDrag(); 104 void startAddresseeDrag();
103 105
104 protected: 106 protected:
105 virtual QDragObject *dragObject(); 107 virtual QDragObject *dragObject();
106 108
107 protected slots: 109 protected slots:
108 void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &); 110 void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &);
109}; 111};
110 112
111class IconViewFactory : public ViewFactory 113class IconViewFactory : public ViewFactory