summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/addresseeeditorwidget.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h
index df9965d..816bbb5 100644
--- a/kaddressbook/addresseeeditorwidget.h
+++ b/kaddressbook/addresseeeditorwidget.h
@@ -1,192 +1,193 @@
1/* 1/*
2 This file is part of KAddressBook. 2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com> 3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
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 ADDRESSEEEDITORWIDGET_H 24#ifndef ADDRESSEEEDITORWIDGET_H
25#define ADDRESSEEEDITORWIDGET_H 25#define ADDRESSEEEDITORWIDGET_H
26 26
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qcombobox.h>
29 30
30#include <kabc/addressee.h> 31#include <kabc/addressee.h>
31#include <kdialogbase.h> 32#include <kdialogbase.h>
32#include <kjanuswidget.h> 33#include <kjanuswidget.h>
33 34
34#include "extensionwidget.h" 35#include "extensionwidget.h"
35 36
36class AddresseeConfig; 37class AddresseeConfig;
37class QCheckBox; 38class QCheckBox;
38class QSpinBox; 39class QSpinBox;
39class QTabWidget; 40class QTabWidget;
40 41
41#ifndef KAB_EMBEDDED 42#ifndef KAB_EMBEDDED
42class QTextEdit; 43class QTextEdit;
43#else //KAB_EMBEDDED 44#else //KAB_EMBEDDED
44class QMultiLineEdit; 45class QMultiLineEdit;
45#endif //KAB_EMBEDDED 46#endif //KAB_EMBEDDED
46 47
47class KComboBox; 48class KComboBox;
48class KDateEdit; 49class KDateEdit;
49class KLineEdit; 50class KLineEdit;
50class KSqueezedTextLabel; 51class KSqueezedTextLabel;
51 52
52class AddressEditWidget; 53class AddressEditWidget;
53class EmailEditWidget; 54class EmailEditWidget;
54class GeoWidget; 55class GeoWidget;
55class ImageWidget; 56class ImageWidget;
56class KABCore; 57class KABCore;
57class KeyWidget; 58class KeyWidget;
58class PhoneEditWidget; 59class PhoneEditWidget;
59class SecrecyWidget; 60class SecrecyWidget;
60class SoundWidget; 61class SoundWidget;
61 62
62namespace KPIM 63namespace KPIM
63{ 64{
64 class CategorySelectDialog; 65 class CategorySelectDialog;
65 class CategoryEditDialog; 66 class CategoryEditDialog;
66} 67}
67 68
68namespace KABC { class AddressBook; } 69namespace KABC { class AddressBook; }
69 70
70class AddresseeEditorWidget : public ExtensionWidget 71class AddresseeEditorWidget : public ExtensionWidget
71{ 72{
72 Q_OBJECT 73 Q_OBJECT
73 74
74 public: 75 public:
75 AddresseeEditorWidget( KABCore *core, bool isExtension, 76 AddresseeEditorWidget( KABCore *core, bool isExtension,
76 QWidget *parent, const char *name = 0 ); 77 QWidget *parent, const char *name = 0 );
77 ~AddresseeEditorWidget(); 78 ~AddresseeEditorWidget();
78 79
79 void setAddressee( const KABC::Addressee& ); 80 void setAddressee( const KABC::Addressee& );
80 const KABC::Addressee &addressee(); 81 const KABC::Addressee &addressee();
81 82
82 void contactsSelectionChanged(); 83 void contactsSelectionChanged();
83 84
84 void load(); 85 void load();
85 void save(); 86 void save();
86 87
87 bool dirty(); 88 bool dirty();
88 89
89 QString title() const; 90 QString title() const;
90 QString identifier() const; 91 QString identifier() const;
91 92
92 protected slots: 93 protected slots:
93 void showCatPopup(); 94 void showCatPopup();
94 void selectedCatPopup( int ); 95 void selectedCatPopup( int );
95 void setRole2FN(); 96 void setRole2FN();
96 void setCompany2FN(); 97 void setCompany2FN();
97 void textChanged( const QString& ); 98 void textChanged( const QString& );
98 void pageChanged( QWidget *wdg ); 99 void pageChanged( QWidget *wdg );
99 100
100 /** 101 /**
101 Emits the modified signal and sets the dirty flag. Any slot 102 Emits the modified signal and sets the dirty flag. Any slot
102 that modifies data should use this method instead of calling emit 103 that modifies data should use this method instead of calling emit
103 modified() directly. 104 modified() directly.
104 */ 105 */
105 void emitModified(); 106 void emitModified();
106 107
107 void dateChanged( QDate ); 108 void dateChanged( QDate );
108 void invalidDate(); 109 void invalidDate();
109 void nameTextChanged( const QString& ); 110 void nameTextChanged( const QString& );
110 void nameBoxChanged(); 111 void nameBoxChanged();
111 void nameButtonClicked(); 112 void nameButtonClicked();
112 void categoryButtonClicked(); 113 void categoryButtonClicked();
113 114
114 /** 115 /**
115 Called whenever the categories change in the categories dialog. 116 Called whenever the categories change in the categories dialog.
116 */ 117 */
117 void categoriesSelected( const QStringList& ); 118 void categoriesSelected( const QStringList& );
118 119
119 /** 120 /**
120 Edits which categories are available in the CategorySelectDialog. 121 Edits which categories are available in the CategorySelectDialog.
121 */ 122 */
122 void editCategories(); 123 void editCategories();
123 124
124 private: 125 private:
125 AddresseeConfig * mAConfig; 126 AddresseeConfig * mAConfig;
126 void initGUI(); 127 void initGUI();
127 void setupTab1(); 128 void setupTab1();
128 void setupTab1_1(); 129 void setupTab1_1();
129 void setupTab2(); 130 void setupTab2();
130 void setupTab2_1(); 131 void setupTab2_1();
131 void setupTab3(); 132 void setupTab3();
132 void setupTab3_1(); 133 void setupTab3_1();
133 134
134 KABC::Addressee mAddressee; 135 KABC::Addressee mAddressee;
135 int mFormattedNameType; 136 int mFormattedNameType;
136 bool mDirty; 137 bool mDirty;
137 bool mIsExtension; 138 bool mIsExtension;
138 bool mBlockSignals; 139 bool mBlockSignals;
139 140
140 // GUI 141 // GUI
141 KPIM::CategorySelectDialog *mCategoryDialog; 142 KPIM::CategorySelectDialog *mCategoryDialog;
142 KPIM::CategoryEditDialog *mCategoryEditDialog; 143 KPIM::CategoryEditDialog *mCategoryEditDialog;
143 QTabWidget *mTabWidget; 144 QTabWidget *mTabWidget;
144 145
145 // Tab1 and Tab1_1 146 // Tab1 and Tab1_1
146 KLineEdit *mNameEdit; 147 KLineEdit *mNameEdit;
147 KLineEdit *mRoleEdit; 148 KLineEdit *mRoleEdit;
148 KLineEdit *mOrgEdit; 149 KLineEdit *mOrgEdit;
149 150
150 KSqueezedTextLabel *mFormattedNameLabel; 151 KSqueezedTextLabel *mFormattedNameLabel;
151 AddressEditWidget *mAddressEditWidget; 152 AddressEditWidget *mAddressEditWidget;
152 EmailEditWidget *mEmailWidget; 153 EmailEditWidget *mEmailWidget;
153 PhoneEditWidget *mPhoneEditWidget; 154 PhoneEditWidget *mPhoneEditWidget;
154 KLineEdit *mURLEdit; 155 KLineEdit *mURLEdit;
155 KLineEdit *mIMAddressEdit; 156 KLineEdit *mIMAddressEdit;
156 QPushButton *mCategoryEdit; 157 QPushButton *mCategoryEdit;
157 QPopupMenu *mCatPopup; 158 QPopupMenu *mCatPopup;
158 SecrecyWidget *mSecrecyWidget; 159 SecrecyWidget *mSecrecyWidget;
159 KSqueezedTextLabel *mNameLabel; 160 KSqueezedTextLabel *mNameLabel;
160 161
161 // Tab2 and Tab2_2 162 // Tab2 and Tab2_2
162 KLineEdit *mDepartmentEdit; 163 KLineEdit *mDepartmentEdit;
163 KLineEdit *mOfficeEdit; 164 KLineEdit *mOfficeEdit;
164 KLineEdit *mProfessionEdit; 165 KLineEdit *mProfessionEdit;
165 KLineEdit *mManagerEdit; 166 KLineEdit *mManagerEdit;
166 KLineEdit *mAssistantEdit; 167 KLineEdit *mAssistantEdit;
167 KLineEdit *mNicknameEdit; 168 KLineEdit *mNicknameEdit;
168 KLineEdit *mSpouseEdit; 169 KLineEdit *mSpouseEdit;
169 KLineEdit *mChildEdit; 170 KLineEdit *mChildEdit;
170 QComboBox *mGenderBox; 171 QComboBox *mGenderBox;
171 KDateEdit *mBirthdayPicker; 172 KDateEdit *mBirthdayPicker;
172 KDateEdit *mAnniversaryPicker; 173 KDateEdit *mAnniversaryPicker;
173#ifndef KAB_EMBEDDED 174#ifndef KAB_EMBEDDED
174 QTextEdit *mNoteEdit; 175 QTextEdit *mNoteEdit;
175#else //KAB_EMBEDDED 176#else //KAB_EMBEDDED
176 QMultiLineEdit *mNoteEdit; 177 QMultiLineEdit *mNoteEdit;
177#endif //KAB_EMBEDDED 178#endif //KAB_EMBEDDED
178 179
179 QSpinBox *mTimeZoneSpin; 180 QSpinBox *mTimeZoneSpin;
180 QSpinBox *mGeoLat; 181 QSpinBox *mGeoLat;
181 QSpinBox *mGeoLon; 182 QSpinBox *mGeoLon;
182 183
183 // Tab3 184 // Tab3
184 GeoWidget *mGeoWidget; 185 GeoWidget *mGeoWidget;
185 ImageWidget *mImageWidget; 186 ImageWidget *mImageWidget;
186#ifndef KAB_EMBEDDED 187#ifndef KAB_EMBEDDED
187 SoundWidget *mSoundWidget; 188 SoundWidget *mSoundWidget;
188#endif //KAB_EMBEDDED 189#endif //KAB_EMBEDDED
189 KeyWidget *mKeyWidget; 190 KeyWidget *mKeyWidget;
190}; 191};
191 192
192#endif 193#endif