22 #ifndef CSV_IMPORT_DLG_H
23 #define CSV_IMPORT_DLG_H
25 #include <tdeabc/addressbook.h>
26 #include <tdeabc/addresseelist.h>
27 #include <kdialogbase.h>
29 #include <tqvaluelist.h>
41 class CSVImportDialog :
public KDialogBase
47 CSVImportDialog( TDEABC::AddressBook *ab, TQWidget *parent,
48 const char *name = 0 );
51 TDEABC::AddresseeList contacts()
const;
54 virtual void slotOk();
58 void delimiterClicked(
int id );
59 void lineSelected(
const TQString& line );
60 void textquoteSelected(
const TQString& mark );
61 void textChanged (
const TQString & );
62 void ignoreDuplicatesChanged(
int );
63 void setFile(
const TQString& );
64 void urlChanged(
const TQString& );
71 enum { Undefined, FormattedName, FamilyName, GivenName, AdditionalName,
72 Prefix, Suffix, NickName, Birthday,
73 HomeAddressStreet, HomeAddressLocality, HomeAddressRegion,
74 HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel,
75 BusinessAddressStreet, BusinessAddressLocality, BusinessAddressRegion,
76 BusinessAddressPostalCode, BusinessAddressCountry,
78 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone,
79 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL
83 TQButtonGroup* mDelimiterBox;
84 TQRadioButton* mRadioComma;
85 TQRadioButton* mRadioSemicolon;
86 TQRadioButton* mRadioTab;
87 TQRadioButton* mRadioSpace;
88 TQRadioButton* mRadioOther;
89 TQLineEdit* mDelimiterEdit;
90 TQLineEdit* mDatePatternEdit;
91 TQComboBox* mComboLine;
92 TQComboBox* mComboQuote;
93 TQCheckBox* mIgnoreDuplicates;
94 TQComboBox* mCodecCombo;
96 KURLRequester* mUrlRequester;
102 void setText(
int row,
int col,
const TQString& text );
103 void adjustRows(
int rows );
104 void resizeColumns();
105 TQString getText(
int row,
int col );
106 uint posToType(
int pos )
const;
107 int typeToPos( uint type )
const;
110 TQTextCodec *currentCodec();
111 TQPtrList<TQTextCodec> mCodecs;
117 TQByteArray mFileArray;
118 TQMap<TQString, uint> mTypeMap;
119 TDEABC::AddressBook *mAddressBook;
121 bool mClearTypeStore;
122 TQValueList<int> mTypeStore;