kaddressbook
addresseeeditorwidget.h00001
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 IMEditWidget;
00050 class KeyWidget;
00051 class PhoneEditWidget;
00052 class SecrecyWidget;
00053
00054 namespace KAB {
00055 class Core;
00056 }
00057
00058 namespace KPIM {
00059 class AddresseeLineEdit;
00060 class CategorySelectDialog;
00061 class CategoryEditDialog;
00062 }
00063
00064 namespace KABC { class AddressBook; }
00065
00066 class AddresseeEditorWidget : public AddresseeEditorBase
00067 {
00068 Q_OBJECT
00069
00070 public:
00071 AddresseeEditorWidget( 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 void setInitialFocus();
00083
00084 bool readyToClose();
00085
00086 protected slots:
00087 void textChanged( const QString& );
00088 void pageChanged( QWidget *wdg );
00089
00095 void emitModified();
00096
00097 void dateChanged( const QDate& );
00098 void invalidDate();
00099 void nameTextChanged( const QString& );
00100 void organizationTextChanged( const QString& );
00101 void nameBoxChanged();
00102 void nameButtonClicked();
00103 void selectCategories();
00104
00108 void categoriesSelected( const QStringList& );
00109
00113 void editCategories();
00114
00115 private:
00116 void initGUI();
00117 void setupTab1();
00118 void setupTab2();
00119 void setupAdditionalTabs();
00120 void setupCustomFieldsTabs();
00121
00122 void setReadOnly( bool );
00123
00124 KABC::Addressee mAddressee;
00125 int mFormattedNameType;
00126 bool mDirty;
00127 bool mBlockSignals;
00128 bool mReadOnly;
00129
00130
00131 KPIM::CategorySelectDialog *mCategorySelectDialog;
00132 KPIM::CategoryEditDialog *mCategoryEditDialog;
00133 QTabWidget *mTabWidget;
00134
00135
00136 KLineEdit *mNameEdit;
00137 KLineEdit *mRoleEdit;
00138 KLineEdit *mOrgEdit;
00139 KSqueezedTextLabel *mFormattedNameLabel;
00140 AddressEditWidget *mAddressEditWidget;
00141 EmailEditWidget *mEmailWidget;
00142 IMEditWidget *mIMWidget;
00143 PhoneEditWidget *mPhoneEditWidget;
00144 KLineEdit *mURLEdit;
00145 KLineEdit *mBlogEdit;
00146 QPushButton *mCategoryButton;
00147 KLineEdit *mCategoryEdit;
00148 SecrecyWidget *mSecrecyWidget;
00149 KSqueezedTextLabel *mNameLabel;
00150
00151
00152 KLineEdit *mDepartmentEdit;
00153 KLineEdit *mOfficeEdit;
00154 KLineEdit *mProfessionEdit;
00155 KLineEdit *mTitleEdit;
00156 KPIM::AddresseeLineEdit *mManagerEdit;
00157 KPIM::AddresseeLineEdit *mAssistantEdit;
00158 KLineEdit *mNicknameEdit;
00159 KPIM::AddresseeLineEdit *mSpouseEdit;
00160 KDateEdit *mBirthdayPicker;
00161 KDateEdit *mAnniversaryPicker;
00162 QTextEdit *mNoteEdit;
00163
00164 QDict<ContactEditorTabPage> mTabPages;
00165 };
00166
00167 #endif
|