filters
csvdialog.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CSVDIALOG_H
00022 #define CSVDIALOG_H
00023
00024 #include <qstringlist.h>
00025
00026 #include <kdialogbase.h>
00027
00028 class DialogUI;
00029
00030 class CSVDialog : public KDialogBase
00031 {
00032 Q_OBJECT
00033 public:
00034 enum Header
00035 {
00036 TEXT,
00037 NUMBER,
00038 DATE,
00039 CURRENCY,
00040 COMMANUMBER,
00041 POINTNUMBER
00042 };
00043
00044 CSVDialog(QWidget* parent, QByteArray& fileArray, const QString seperator);
00045 ~CSVDialog();
00046
00047 int getRows();
00048 int getCols();
00049 int getHeader(int col);
00050 QString getText(int row, int col);
00051
00052 private:
00053 void fillTable();
00054 void fillComboBox();
00055 void setText(int row, int col, const QString& text);
00056 void adjustRows(int iRows);
00057 void adjustCols(int iCols);
00058 bool checkUpdateRange();
00059 QTextCodec* getCodec(void) const;
00060
00061 bool m_adjustRows;
00062 bool m_adjustCols;
00063 int m_startRow;
00064 int m_startCol;
00065 int m_endRow;
00066 int m_endCol;
00067 QChar m_textquote;
00068 QString m_delimiter;
00069 bool m_ignoreDups;
00070 QByteArray m_fileArray;
00071 DialogUI * m_dialog;
00072 QTextCodec* m_codec;
00073 QStringList m_formatList;
00074
00075 private slots:
00076 void returnPressed();
00077 void formatChanged( const QString& );
00078 void delimiterClicked(int id);
00079 void textquoteSelected(const QString& mark);
00080 void currentCellChanged(int, int col);
00081 void textChanged ( const QString & );
00082 void ignoreDuplicatesChanged( int );
00083 void updateClicked();
00084 void encodingChanged ( const QString & );
00085 };
00086
00087 #endif
|