summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/look_basic.h
Unidiff
Diffstat (limited to 'kaddressbook/details/look_basic.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/look_basic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/details/look_basic.h b/kaddressbook/details/look_basic.h
index a65c99c..a70e7f7 100644
--- a/kaddressbook/details/look_basic.h
+++ b/kaddressbook/details/look_basic.h
@@ -1,136 +1,136 @@
1/* 1/*
2 This file is part of KAddressBook. 2 This file is part of KAddressBook.
3 Copyright (c) 1996-2002 Mirko Boehm <mirko@kde.org> 3 Copyright (c) 1996-2002 Mirko Boehm <mirko@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 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 6 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 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
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 LOOK_KABBASIC_H 24#ifndef LOOK_KABBASIC_H
25#define LOOK_KABBASIC_H 25#define LOOK_KABBASIC_H
26 26
27#include <kabc/addressbook.h> 27#include <kabc/addressbook.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29 29
30class KConfig; 30class KConfig;
31 31
32/** 32/**
33 This is a pure virtual base class that defines the 33 This is a pure virtual base class that defines the
34 interface for how to display and change entries of 34 interface for how to display and change entries of
35 the KDE addressbook. 35 the KDE addressbook.
36 36
37 This basic widget does not show anything in its client space. 37 This basic widget does not show anything in its client space.
38 Derive it and implement its look and how the user may edit the 38 Derive it and implement its look and how the user may edit the
39 entry. 39 entry.
40 40
41 The paintEvent() has to paint the whole widget, since repaint() 41 The paintEvent() has to paint the whole widget, since repaint()
42 calls will not delete the widgets background. 42 calls will not delete the widgets background.
43 */ 43 */
44class KABBasicLook : public QVBox 44class KABBasicLook : public Q3VBox
45{ 45{
46 Q_OBJECT 46 Q_OBJECT
47 47
48 public: 48 public:
49 /** 49 /**
50 The constructor. 50 The constructor.
51 */ 51 */
52 KABBasicLook( QWidget *parent = 0, const char *name = 0 ); 52 KABBasicLook( QWidget *parent = 0, const char *name = 0 );
53 53
54 /** 54 /**
55 Set the entry. It will be displayed automatically. 55 Set the entry. It will be displayed automatically.
56 */ 56 */
57 virtual void setAddressee( const KABC::Addressee& addressee ); 57 virtual void setAddressee( const KABC::Addressee& addressee );
58 58
59 /** 59 /**
60 Get the current entry. 60 Get the current entry.
61 */ 61 */
62 virtual KABC::Addressee addressee(); 62 virtual KABC::Addressee addressee();
63 63
64 /** 64 /**
65 Configure the view from the configuration file. 65 Configure the view from the configuration file.
66 */ 66 */
67 virtual void restoreSettings( KConfig* ); 67 virtual void restoreSettings( KConfig* );
68 68
69 /** 69 /**
70 Save the view settings to the configuration file. 70 Save the view settings to the configuration file.
71 */ 71 */
72 virtual void saveSettings( KConfig* ); 72 virtual void saveSettings( KConfig* );
73 73
74 /** 74 /**
75 Retrieve read-write state. 75 Retrieve read-write state.
76 */ 76 */
77 bool isReadOnly() const; 77 bool isReadOnly() const;
78 void printView(){ emit printMyView();} 78 void printView(){ emit printMyView();}
79 79
80 signals: 80 signals:
81 void printMyView(); 81 void printMyView();
82 /** 82 /**
83 This signal is emitted when the user changed the entry. 83 This signal is emitted when the user changed the entry.
84 */ 84 */
85 void entryChanged(); 85 void entryChanged();
86 86
87 /** 87 /**
88 This signal indicates that the entry needs to be changed 88 This signal indicates that the entry needs to be changed
89 immidiately in the database. This might be due to changes in 89 immidiately in the database. This might be due to changes in
90 values that are available in menus. 90 values that are available in menus.
91 */ 91 */
92 void saveMe(); 92 void saveMe();
93 93
94 /** 94 /**
95 The user acticated the email address displayed. This may happen 95 The user acticated the email address displayed. This may happen
96 by, for example, clicking on the displayed mailto-URL. 96 by, for example, clicking on the displayed mailto-URL.
97 */ 97 */
98 void sendEmail( const QString &email ); 98 void sendEmail( const QString &email );
99 99
100 /** 100 /**
101 The user activated one of the displayed HTTP URLs. For example 101 The user activated one of the displayed HTTP URLs. For example
102 by clicking on the displayed homepage address. 102 by clicking on the displayed homepage address.
103 */ 103 */
104 void browse( const QString &url ); 104 void browse( const QString &url );
105 105
106 public slots: 106 public slots:
107 /** 107 /**
108 Set read-write state. 108 Set read-write state.
109 */ 109 */
110 virtual void setReadOnly( bool state ); 110 virtual void setReadOnly( bool state );
111 111
112 private: 112 private:
113 KABC::Addressee mAddressee; 113 KABC::Addressee mAddressee;
114 bool mReadOnly; 114 bool mReadOnly;
115}; 115};
116 116
117class KABLookFactory 117class KABLookFactory
118{ 118{
119 public: 119 public:
120 KABLookFactory( QWidget *parent = 0, const char *name = 0 ); 120 KABLookFactory( QWidget *parent = 0, const char *name = 0 );
121 virtual ~KABLookFactory(); 121 virtual ~KABLookFactory();
122 122
123 virtual KABBasicLook *create() = 0; 123 virtual KABBasicLook *create() = 0;
124 124
125 /** 125 /**
126 Overload this method to provide a one-liner description 126 Overload this method to provide a one-liner description
127 for your look. 127 for your look.
128 */ 128 */
129 virtual QString description() = 0; 129 virtual QString description() = 0;
130 130
131 protected: 131 protected:
132 QWidget *mParent; 132 QWidget *mParent;
133 const char* mName; 133 const char* mName;
134}; 134};
135 135
136#endif 136#endif