summaryrefslogtreecommitdiffabout
path: root/kaddressbook/addresseditwidget.h
Unidiff
Diffstat (limited to 'kaddressbook/addresseditwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseditwidget.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/kaddressbook/addresseditwidget.h b/kaddressbook/addresseditwidget.h
index bc96d74..1d4e138 100644
--- a/kaddressbook/addresseditwidget.h
+++ b/kaddressbook/addresseditwidget.h
@@ -4,156 +4,156 @@
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 ADDRESSEDITWIDGET_H 24#ifndef ADDRESSEDITWIDGET_H
25#define ADDRESSEDITWIDGET_H 25#define ADDRESSEDITWIDGET_H
26 26
27#include <qwidget.h> 27#include <qwidget.h>
28 28
29#include <kdialogbase.h> 29#include <kdialogbase.h>
30#include <kabc/address.h> 30#include <kabc/address.h>
31#include <kabc/addressee.h> 31#include <kabc/addressee.h>
32 32
33#include "addresseeconfig.h" 33#include "addresseeconfig.h"
34#include "typecombo.h" 34#include "typecombo.h"
35 35
36class QButtonGroup; 36class Q3ButtonGroup;
37class QCheckBox; 37class QCheckBox;
38class QListView; 38class Q3ListView;
39#ifndef KAB_EMBEDDED 39#ifndef KAB_EMBEDDED
40class QTextEdit; 40class Q3TextEdit;
41#else //KAB_EMBEDDED 41#else //KAB_EMBEDDED
42class QMultiLineEdit; 42class Q3MultiLineEdit;
43#endif //KAB_EMBEDDED 43#endif //KAB_EMBEDDED
44class QToolButton; 44class QToolButton;
45 45
46class KComboBox; 46class KComboBox;
47class KLineEdit; 47class KLineEdit;
48class KListView; 48class KListView;
49 49
50typedef TypeCombo<KABC::Address> AddressTypeCombo; 50typedef TypeCombo<KABC::Address> AddressTypeCombo;
51 51
52/** 52/**
53 Editor widget for addresses. 53 Editor widget for addresses.
54 */ 54 */
55class AddressEditWidget : public QWidget 55class AddressEditWidget : public QWidget
56{ 56{
57 Q_OBJECT 57 Q_OBJECT
58 58
59 public: 59 public:
60 AddressEditWidget( QWidget *parent, const char *name = 0 ); 60 AddressEditWidget( QWidget *parent, const char *name = 0 );
61 ~AddressEditWidget(); 61 ~AddressEditWidget();
62 62
63 KABC::Address::List addresses(); 63 KABC::Address::List addresses();
64 void setAddresses( const KABC::Addressee &addr, 64 void setAddresses( const KABC::Addressee &addr,
65 const KABC::Address::List &list ); 65 const KABC::Address::List &list );
66 66
67 void updateTypeCombo( const KABC::Address::List&, KComboBox* ); 67 void updateTypeCombo( const KABC::Address::List&, KComboBox* );
68 KABC::Address currentAddress( KComboBox*, int ); 68 KABC::Address currentAddress( KComboBox*, int );
69 69
70 signals: 70 signals:
71 void modified(); 71 void modified();
72 72
73 protected slots: 73 protected slots:
74 void updateAddressEdit(); 74 void updateAddressEdit();
75 75
76 void edit(); 76 void edit();
77 77
78 private: 78 private:
79 AddresseeConfig * mConfig; 79 AddresseeConfig * mConfig;
80 AddressTypeCombo *mTypeCombo; 80 AddressTypeCombo *mTypeCombo;
81 81
82 QPushButton *mEditButton; 82 QPushButton *mEditButton;
83#ifndef KAB_EMBEDDED 83#ifndef KAB_EMBEDDED
84 QTextEdit *mAddressTextEdit; 84 Q3TextEdit *mAddressTextEdit;
85#else //KAB_EMBEDDED 85#else //KAB_EMBEDDED
86 QMultiLineEdit *mAddressTextEdit; 86 Q3MultiLineEdit *mAddressTextEdit;
87#endif //KAB_EMBEDDED 87#endif //KAB_EMBEDDED
88 88
89 KABC::Address::List mAddressList; 89 KABC::Address::List mAddressList;
90 KABC::Addressee mAddressee; 90 KABC::Addressee mAddressee;
91 int mIndex; 91 int mIndex;
92}; 92};
93 93
94/** 94/**
95 Dialog for editing address details. 95 Dialog for editing address details.
96 */ 96 */
97class AddressEditDialog : public KDialogBase 97class AddressEditDialog : public KDialogBase
98{ 98{
99 Q_OBJECT 99 Q_OBJECT
100 100
101 public: 101 public:
102 AddressEditDialog( const KABC::Address::List &list, int selected, 102 AddressEditDialog( const KABC::Address::List &list, int selected,
103 QWidget *parent, const char *name = 0 ); 103 QWidget *parent, const char *name = 0 );
104 ~AddressEditDialog(); 104 ~AddressEditDialog();
105 105
106 KABC::Address::List addresses(); 106 KABC::Address::List addresses();
107 bool changed() const; 107 bool changed() const;
108 108
109 protected slots: 109 protected slots:
110 void addAddress(); 110 void addAddress();
111 void removeAddress(); 111 void removeAddress();
112 void changeType(); 112 void changeType();
113 113
114 void updateAddressEdits(); 114 void updateAddressEdits();
115 void modified(); 115 void modified();
116 116
117 private: 117 private:
118 void saveAddress( KABC::Address &addr ); 118 void saveAddress( KABC::Address &addr );
119 void fillCountryCombo(); 119 void fillCountryCombo();
120 120
121 AddressTypeCombo *mTypeCombo; 121 AddressTypeCombo *mTypeCombo;
122#ifndef KAB_EMBEDDED 122#ifndef KAB_EMBEDDED
123 QTextEdit *mStreetTextEdit; 123 Q3TextEdit *mStreetTextEdit;
124#else //KAB_EMBEDDED 124#else //KAB_EMBEDDED
125 QMultiLineEdit *mStreetTextEdit; 125 Q3MultiLineEdit *mStreetTextEdit;
126#endif //KAB_EMBEDDED 126#endif //KAB_EMBEDDED
127 KComboBox *mCountryCombo; 127 KComboBox *mCountryCombo;
128 KLineEdit *mRegionEdit; 128 KLineEdit *mRegionEdit;
129 KLineEdit *mLocalityEdit; 129 KLineEdit *mLocalityEdit;
130 KLineEdit *mPostalCodeEdit; 130 KLineEdit *mPostalCodeEdit;
131 KLineEdit *mPOBoxEdit; 131 KLineEdit *mPOBoxEdit;
132 QCheckBox *mPreferredCheckBox; 132 QCheckBox *mPreferredCheckBox;
133 133
134 QPushButton *mRemoveButton; 134 QPushButton *mRemoveButton;
135 QPushButton *mChangeTypeButton; 135 QPushButton *mChangeTypeButton;
136 136
137 KABC::Address::List mAddressList; 137 KABC::Address::List mAddressList;
138 KABC::Address *mPreviousAddress; 138 KABC::Address *mPreviousAddress;
139 bool mChanged; 139 bool mChanged;
140}; 140};
141 141
142/** 142/**
143 Dialog for selecting an address type. 143 Dialog for selecting an address type.
144 */ 144 */
145class AddressTypeDialog : public KDialogBase 145class AddressTypeDialog : public KDialogBase
146{ 146{
147 public: 147 public:
148 AddressTypeDialog( int type, QWidget *parent ); 148 AddressTypeDialog( int type, QWidget *parent );
149 ~AddressTypeDialog(); 149 ~AddressTypeDialog();
150 150
151 int type() const; 151 int type() const;
152 152
153 private: 153 private:
154 QButtonGroup *mGroup; 154 Q3ButtonGroup *mGroup;
155 155
156 KABC::Address::TypeList mTypeList; 156 KABC::Address::TypeList mTypeList;
157}; 157};
158 158
159#endif 159#endif