2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
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
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
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
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
24 #ifndef ADDRESSEEEDITORWIDGET_H
25 #define ADDRESSEEEDITORWIDGET_H
27 #include <qdatetime.h>
29 #include <kabc/addressee.h>
30 #include <kdialogbase.h>
31 #include <kjanuswidget.h>
33 #include "addresseeeditorbase.h"
34 #include "contacteditorwidgetmanager.h"
35 #include "extensionwidget.h"
45 class KSqueezedTextLabel
;
47 class AddressEditWidget
;
48 class EmailEditWidget
;
51 class PhoneEditWidget
;
59 class AddresseeLineEdit
;
60 class CategorySelectDialog
;
61 class CategoryEditDialog
;
64 namespace KABC
{ class AddressBook
; }
66 class AddresseeEditorWidget
: public AddresseeEditorBase
71 AddresseeEditorWidget( QWidget
*parent
, const char *name
= 0 );
72 ~AddresseeEditorWidget();
74 void setAddressee( const KABC::Addressee
& );
75 const KABC::Addressee
&addressee();
82 void setInitialFocus();
87 void textChanged( const QString
& );
88 void pageChanged( QWidget
*wdg
);
91 Emits the modified signal and sets the dirty flag. Any slot
92 that modifies data should use this method instead of calling emit
97 void dateChanged( const QDate
& );
99 void nameTextChanged( const QString
& );
100 void organizationTextChanged( const QString
& );
101 void nameBoxChanged();
102 void nameButtonClicked();
103 void selectCategories();
106 Called whenever the categories change in the categories dialog.
108 void categoriesSelected( const QStringList
& );
111 Edits which categories are available in the CategorySelectDialog.
113 void editCategories();
119 void setupAdditionalTabs();
120 void setupCustomFieldsTabs();
122 void setReadOnly( bool );
124 KABC::Addressee mAddressee
;
125 int mFormattedNameType
;
131 KPIM::CategorySelectDialog
*mCategorySelectDialog
;
132 KPIM::CategoryEditDialog
*mCategoryEditDialog
;
133 QTabWidget
*mTabWidget
;
136 KLineEdit
*mNameEdit
;
137 KLineEdit
*mRoleEdit
;
139 KSqueezedTextLabel
*mFormattedNameLabel
;
140 AddressEditWidget
*mAddressEditWidget
;
141 EmailEditWidget
*mEmailWidget
;
142 IMEditWidget
*mIMWidget
;
143 PhoneEditWidget
*mPhoneEditWidget
;
145 KLineEdit
*mBlogEdit
;
146 QPushButton
*mCategoryButton
;
147 KLineEdit
*mCategoryEdit
;
148 SecrecyWidget
*mSecrecyWidget
;
149 KSqueezedTextLabel
*mNameLabel
;
152 KLineEdit
*mDepartmentEdit
;
153 KLineEdit
*mOfficeEdit
;
154 KLineEdit
*mProfessionEdit
;
155 KLineEdit
*mTitleEdit
;
156 KPIM::AddresseeLineEdit
*mManagerEdit
;
157 KPIM::AddresseeLineEdit
*mAssistantEdit
;
158 KLineEdit
*mNicknameEdit
;
159 KPIM::AddresseeLineEdit
*mSpouseEdit
;
160 KDateEdit
*mBirthdayPicker
;
161 KDateEdit
*mAnniversaryPicker
;
162 QTextEdit
*mNoteEdit
;
164 QDict
<ContactEditorTabPage
> mTabPages
;