summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxport/csvimportdialog.h
Unidiff
Diffstat (limited to 'kaddressbook/xxport/csvimportdialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxport/csvimportdialog.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h
index 545b5f9..5f55ab2 100644
--- a/kaddressbook/xxport/csvimportdialog.h
+++ b/kaddressbook/xxport/csvimportdialog.h
@@ -23,102 +23,104 @@
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef CSV_IMPORT_DLG_H 29#ifndef CSV_IMPORT_DLG_H
30#define CSV_IMPORT_DLG_H 30#define CSV_IMPORT_DLG_H
31 31
32#include <kabc/addressbook.h> 32#include <kabc/addressbook.h>
33#include <kabc/addresseelist.h> 33#include <kabc/addresseelist.h>
34#include <kdialogbase.h> 34#include <kdialogbase.h>
35 35
36#include <qvaluelist.h> 36#include <qvaluelist.h>
37 37
38class KURLRequester; 38class KURLRequester;
39 39
40class QButtonGroup; 40class QButtonGroup;
41class QComboBox; 41class QComboBox;
42class QCheckBox; 42class QCheckBox;
43class QLineEdit; 43class QLineEdit;
44class QPushButton; 44class QPushButton;
45class QRadioButton; 45class QRadioButton;
46class QTable; 46class QTable;
47 47
48class CSVImportDialog : public KDialogBase 48class CSVImportDialog : public KDialogBase
49{ 49{
50 Q_OBJECT 50 Q_OBJECT
51 51
52 public: 52 public:
53 CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, 53 CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
54 const char *name = 0 ); 54 const char *name = 0 );
55 ~CSVImportDialog(); 55 ~CSVImportDialog();
56 56
57 KABC::AddresseeList contacts() const; 57 KABC::AddresseeList contacts() const;
58 58
59 protected slots: 59 protected slots:
60 virtual void slotOk(); 60 virtual void slotOk();
61 61
62 private slots: 62 private slots:
63 void returnPressed(); 63 void returnPressed();
64 void delimiterClicked( int id ); 64 void delimiterClicked( int id );
65 void lineSelected( const QString& line ); 65 void lineSelected( const QString& line );
66 void textquoteSelected( const QString& mark ); 66 void textquoteSelected( const QString& mark );
67 void textChanged ( const QString & ); 67 void textChanged ( const QString & );
68 void ignoreDuplicatesChanged( int ); 68 void ignoreDuplicatesChanged( int );
69 void setFile( const QString& ); 69 void setFile( const QString& );
70 void urlChanged( const QString& ); 70 void urlChanged( const QString& );
71 void codecChanged ( const QString& );
71 72
72 void applyTemplate(); 73 void applyTemplate();
73 void saveTemplate(); 74 void saveTemplate();
74 75
75 private: 76 private:
76 enum { Undefined, FormattedName, FamilyName, GivenName, AdditionalName, 77 enum { Undefined, FormattedName, FamilyName, GivenName, AdditionalName,
77 Prefix, Suffix, NickName, Birthday, 78 Prefix, Suffix, NickName, Birthday,
78 HomeAddressStreet, HomeAddressLocality, HomeAddressRegion, 79 HomeAddressStreet, HomeAddressLocality, HomeAddressRegion,
79 HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel, 80 HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel,
80 BusinessAddressStreet, BusinessAddressLocality, BusinessAddressRegion, 81 BusinessAddressStreet, BusinessAddressLocality, BusinessAddressRegion,
81 BusinessAddressPostalCode, BusinessAddressCountry, 82 BusinessAddressPostalCode, BusinessAddressCountry,
82 BusinessAddressLabel, 83 BusinessAddressLabel,
83 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone, 84 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone,
84 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL 85 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories
85 }; 86 };
86 87
87 QTable* mTable; 88 QTable* mTable;
88 QButtonGroup* mDelimiterBox; 89 QButtonGroup* mDelimiterBox;
89 QRadioButton* mRadioComma; 90 QRadioButton* mRadioComma;
90 QRadioButton* mRadioSemicolon; 91 QRadioButton* mRadioSemicolon;
91 QRadioButton* mRadioTab; 92 QRadioButton* mRadioTab;
92 QRadioButton* mRadioSpace; 93 QRadioButton* mRadioSpace;
93 QRadioButton* mRadioOther; 94 QRadioButton* mRadioOther;
94 QLineEdit* mDelimiterEdit; 95 QLineEdit* mDelimiterEdit;
95 QComboBox* mComboLine; 96 QComboBox* mComboLine;
96 QComboBox* mComboQuote; 97 QComboBox* mComboQuote;
98 QComboBox* mComboCodec;
97 QCheckBox* mIgnoreDuplicates; 99 QCheckBox* mIgnoreDuplicates;
98 KURLRequester* mUrlRequester; 100 KURLRequester* mUrlRequester;
99 101
100 void initGUI(); 102 void initGUI();
101 void fillTable(); 103 void fillTable();
102 void clearTable(); 104 void clearTable();
103 void fillComboBox(); 105 void fillComboBox();
104 void setText( int row, int col, const QString& text ); 106 void setText( int row, int col, const QString& text );
105 void adjustRows( int rows ); 107 void adjustRows( int rows );
106 QString getText( int row, int col ); 108 QString getText( int row, int col );
107 uint posToType( int pos ) const; 109 uint posToType( int pos ) const;
108 int typeToPos( uint type ) const; 110 int typeToPos( uint type ) const;
109 111
110 bool mAdjustRows; 112 bool mAdjustRows;
111 int mStartLine; 113 int mStartLine;
112 QChar mTextQuote; 114 QChar mTextQuote;
113 QString mDelimiter; 115 QString mDelimiter;
114 QString mData; 116 QString mData;
115 QByteArray mFileArray; 117 QByteArray mFileArray;
116 QMap<QString, uint> mTypeMap; 118 QMap<QString, uint> mTypeMap;
117 KABC::AddressBook *mAddressBook; 119 KABC::AddressBook *mAddressBook;
118 int mCustomCounter; 120 int mCustomCounter;
119 bool mClearTypeStore; 121 bool mClearTypeStore;
120 QValueList<int> mTypeStore; 122 QValueList<int> mTypeStore;
121 123
122}; 124};
123 125
124#endif 126#endif