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 "extensionwidget.h"
00034
00035
class QCheckBox;
00036
class QSpinBox;
00037
class QTabWidget;
00038
class QTextEdit;
00039
00040
class KComboBox;
00041
class KDateEdit;
00042
class KLineEdit;
00043
class KSqueezedTextLabel;
00044
00045
class AddressEditWidget;
00046
class EmailEditWidget;
00047
class GeoWidget;
00048
class ImageWidget;
00049
class KeyWidget;
00050
class PhoneEditWidget;
00051
class SecrecyWidget;
00052
class SoundWidget;
00053
00054
namespace KAB {
00055
class Core;
00056 }
00057
00058
namespace KPIM {
00059
class CategorySelectDialog;
00060
class CategoryEditDialog;
00061 }
00062
00063
namespace KABC {
class AddressBook; }
00064
00065
class AddresseeEditorWidget :
public KAB::ExtensionWidget
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 contactsSelectionChanged();
00078
00079
void load();
00080
void save();
00081
00082
bool dirty();
00083
00084 QString title() const;
00085 QString identifier() const;
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 nameBoxChanged();
00102
void nameButtonClicked();
00103
void categoryButtonClicked();
00104
00108
void categoriesSelected( const QStringList& );
00109
00113
void editCategories();
00114
00115 private:
00116
void initGUI();
00117
void setupTab1();
00118
void setupTab2();
00119
void setupTab3();
00120
00121
void setReadOnly(
bool );
00122
00123 KABC::Addressee mAddressee;
00124
int mFormattedNameType;
00125
bool mDirty;
00126
bool mIsExtension;
00127
bool mBlockSignals;
00128
bool mReadOnly;
00129
00130
00131 KPIM::CategorySelectDialog *mCategoryDialog;
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
PhoneEditWidget *mPhoneEditWidget;
00143 KLineEdit *mURLEdit;
00144 KLineEdit *mIMAddressEdit;
00145 QPushButton *mCategoryButton;
00146 KLineEdit *mCategoryEdit;
00147 SecrecyWidget *mSecrecyWidget;
00148 KSqueezedTextLabel *mNameLabel;
00149
00150
00151 KLineEdit *mDepartmentEdit;
00152 KLineEdit *mOfficeEdit;
00153 KLineEdit *mProfessionEdit;
00154 KLineEdit *mManagerEdit;
00155 KLineEdit *mAssistantEdit;
00156 KLineEdit *mNicknameEdit;
00157 KLineEdit *mSpouseEdit;
00158 KDateEdit *mBirthdayPicker;
00159 KDateEdit *mAnniversaryPicker;
00160 QTextEdit *mNoteEdit;
00161 QSpinBox *mTimeZoneSpin;
00162 QSpinBox *mGeoLat;
00163 QSpinBox *mGeoLon;
00164
00165
00166 GeoWidget *mGeoWidget;
00167 ImageWidget *mPhotoWidget;
00168 ImageWidget *mLogoWidget;
00169 SoundWidget *mSoundWidget;
00170 KeyWidget *mKeyWidget;
00171 };
00172
00173 #endif