00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef ADDRESSEEEDITORWIDGET_H
00025
#define ADDRESSEEEDITORWIDGET_H
00026
00027
#include <qdatetime.h>
00028
00029
#include <kabc/addressee.h>
00030
#include <kdialogbase.h>
00031
#include <kjanuswidget.h>
00032
00033
#include "addresseeeditorbase.h"
00034
#include "contacteditorwidgetmanager.h"
00035
#include "extensionwidget.h"
00036
00037
class QCheckBox;
00038
class QSpinBox;
00039
class QTabWidget;
00040
class QTextEdit;
00041
00042
class KComboBox;
00043
class KDateEdit;
00044
class KLineEdit;
00045
class KSqueezedTextLabel;
00046
00047
class AddressEditWidget;
00048
class EmailEditWidget;
00049
class KeyWidget;
00050
class PhoneEditWidget;
00051
class SecrecyWidget;
00052
00053
namespace KAB {
00054
class Core;
00055 }
00056
00057
namespace KPIM {
00058
class AddresseeLineEdit;
00059
class CategorySelectDialog;
00060
class CategoryEditDialog;
00061 }
00062
00063
namespace KABC {
class AddressBook; }
00064
00065
class AddresseeEditorWidget :
public AddresseeEditorBase
00066 {
00067 Q_OBJECT
00068
00069
public:
00070 AddresseeEditorWidget( KAB::Core *core,
bool isExtension,
00071
QWidget *parent,
const char *name = 0 );
00072 ~AddresseeEditorWidget();
00073
00074
void setAddressee(
const KABC::Addressee& );
00075
const KABC::Addressee &addressee();
00076
00077
void load();
00078
void save();
00079
00080
bool dirty();
00081
00082
QString title() const;
00083
QString identifier() const;
00084
00085
void setInitialFocus();
00086
00087 protected slots:
00088
void textChanged( const
QString& );
00089
void pageChanged(
QWidget *wdg );
00090
00096
void emitModified();
00097
00098
void dateChanged(
QDate );
00099
void invalidDate();
00100
void nameTextChanged( const QString& );
00101
void organizationTextChanged( const QString& );
00102
void nameBoxChanged();
00103
void nameButtonClicked();
00104
void categoryButtonClicked();
00105
00109
void categoriesSelected( const
QStringList& );
00110
00114
void editCategories();
00115
00116 private:
00117
void initGUI();
00118
void setupTab1();
00119
void setupTab2();
00120
void setupAdditionalTabs();
00121
void setupCustomFieldsTabs();
00122
00123
void setReadOnly(
bool );
00124
00125 KABC::Addressee mAddressee;
00126
int mFormattedNameType;
00127
bool mDirty;
00128
bool mBlockSignals;
00129
bool mReadOnly;
00130
00131
00132 KPIM::CategorySelectDialog *mCategoryDialog;
00133 KPIM::CategoryEditDialog *mCategoryEditDialog;
00134
QTabWidget *mTabWidget;
00135
00136
00137 KLineEdit *mNameEdit;
00138 KLineEdit *mRoleEdit;
00139 KLineEdit *mOrgEdit;
00140 KSqueezedTextLabel *mFormattedNameLabel;
00141
AddressEditWidget *mAddressEditWidget;
00142
EmailEditWidget *mEmailWidget;
00143
PhoneEditWidget *mPhoneEditWidget;
00144 KLineEdit *mURLEdit;
00145 KLineEdit *mIMAddressEdit;
00146
QPushButton *mCategoryButton;
00147 KLineEdit *mCategoryEdit;
00148 SecrecyWidget *mSecrecyWidget;
00149 KSqueezedTextLabel *mNameLabel;
00150
00151
00152 KLineEdit *mDepartmentEdit;
00153 KLineEdit *mOfficeEdit;
00154 KLineEdit *mProfessionEdit;
00155 KPIM::AddresseeLineEdit *mManagerEdit;
00156 KPIM::AddresseeLineEdit *mAssistantEdit;
00157 KLineEdit *mNicknameEdit;
00158 KPIM::AddresseeLineEdit *mSpouseEdit;
00159 KDateEdit *mBirthdayPicker;
00160 KDateEdit *mAnniversaryPicker;
00161
QTextEdit *mNoteEdit;
00162
00163
QDict<ContactEditorTabPage> mTabPages;
00164 };
00165
00166 #endif