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 NAMEEDITDIALOG_H
00025 #define NAMEEDITDIALOG_H
00026
00027 #include <kdialogbase.h>
00028 #include <tdeabc/addressee.h>
00029
00030 #include "addresseeconfig.h"
00031
00032 class TQCheckBox;
00033
00034 class KLineEdit;
00035 class KComboBox;
00036
00040 class NameEditDialog : public KDialogBase
00041 {
00042 Q_OBJECT
00043
00044
00045 public:
00046 enum FormattedNameType
00047 {
00048 CustomName,
00049 SimpleName,
00050 FullName,
00051 ReverseNameWithComma,
00052 ReverseName,
00053 Organization
00054 };
00055
00056 NameEditDialog( const TDEABC::Addressee &addr, int type,
00057 bool readOnly, TQWidget *parent, const char *name = 0 );
00058 ~NameEditDialog();
00059
00060 TQString familyName() const;
00061 TQString givenName() const;
00062 TQString prefix() const;
00063 TQString suffix() const;
00064 TQString additionalName() const;
00065 TQString customFormattedName() const;
00066 int formattedNameType() const;
00067
00068 bool changed() const;
00069
00070 static TQString formattedName( const TDEABC::Addressee &addr, int type );
00071
00072 protected slots:
00073 void slotHelp();
00074
00075 private slots:
00076 void parseBoxChanged( bool );
00077 void formattedNameTypeChanged();
00078 void formattedNameChanged( const TQString& );
00079 void typeChanged( int );
00080 void initTypeCombo();
00081 void modified();
00082
00083 private:
00084 KComboBox *mSuffixCombo;
00085 KComboBox *mPrefixCombo;
00086 KComboBox *mFormattedNameCombo;
00087 KLineEdit *mFamilyNameEdit;
00088 KLineEdit *mGivenNameEdit;
00089 KLineEdit *mAdditionalNameEdit;
00090 KLineEdit *mFormattedNameEdit;
00091 TQCheckBox *mParseBox;
00092
00093 AddresseeConfig mAddresseeConfig;
00094 TDEABC::Addressee mAddressee;
00095 TQString mCustomFormattedName;
00096 bool mChanged;
00097 };
00098
00099 #endif