kspread_dlg_csv.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef CSVDIALOG_H
00024 #define CSVDIALOG_H
00025
00026 #include <kdialogbase.h>
00027
00028 class QVBoxLayout;
00029 class QHBoxLayout;
00030 class QGridLayout;
00031 class QButtonGroup;
00032 class QComboBox;
00033 class QCheckBox;
00034 class QLabel;
00035 class QLineEdit;
00036 class QPushButton;
00037 class QRadioButton;
00038 class QTable;
00039
00040 class KSpreadView;
00041
00053 class KSpreadCSVDialog : public KDialogBase
00054 {
00055 Q_OBJECT
00056
00057 public:
00058
00059 enum Mode { Clipboard, File, Column };
00060 enum Header { TEXT, NUMBER, DATE, CURRENCY };
00061
00062 KSpreadCSVDialog( KSpreadView * parent, const char * name, QRect const & rect, Mode mode);
00063
00064 ~KSpreadCSVDialog();
00065
00066 bool cancelled();
00067
00068 protected:
00069 void accept();
00070
00071
00072 private:
00073 KSpreadView* m_pView;
00074
00075 QGridLayout* MyDialogLayout;
00076 QHBoxLayout* Layout1;
00077 QGridLayout* m_delimiterBoxLayout;
00078 QGridLayout* m_formatBoxLayout;
00079 QTable* m_sheet;
00080 QButtonGroup* m_delimiterBox;
00081 QRadioButton* m_radioComma;
00082 QRadioButton* m_radioSemicolon;
00083 QRadioButton* m_radioTab;
00084 QRadioButton* m_radioSpace;
00085 QRadioButton* m_radioOther;
00086 QLineEdit* m_delimiterEdit;
00087 QButtonGroup* m_formatBox;
00088 QRadioButton* m_radioNumber;
00089 QRadioButton* m_radioText;
00090 QRadioButton* m_radioCurrency;
00091 QRadioButton* m_radioDate;
00092 QComboBox* m_comboLine;
00093 QComboBox* m_comboQuote;
00094 QLabel* TextLabel3;
00095 QLabel* TextLabel2;
00096 QCheckBox * m_ignoreDuplicates;
00097
00098 void fillSheet();
00099 void fillComboBox();
00100 void setText(int row, int col, const QString& text);
00101 void adjustRows(int iRows);
00102 int getHeader(int col);
00103 QString getText(int row, int col);
00104
00105 bool m_cancelled;
00106 int m_adjustRows;
00107 int m_startline;
00108 QChar m_textquote;
00109 QString m_delimiter;
00110 QString m_data;
00111 QByteArray m_fileArray;
00112 QRect m_targetRect;
00113 Mode m_mode;
00114
00115 private slots:
00116 void returnPressed();
00117 void formatClicked(int id);
00118 void delimiterClicked(int id);
00119 void lineSelected(const QString& line);
00120 void textquoteSelected(const QString& mark);
00121 void currentCellChanged(int, int col);
00122 void textChanged ( const QString & );
00123 void ignoreDuplicatesChanged(int);
00124 };
00125
00126 #endif // CVSDIALOG_H
This file is part of the documentation for kspread Library Version 1.4.2.