kspread Library API Documentation

kspread_dlg_csv.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
00003              (C) 2002-2003 Ariya Hidayat <ariya@kde.org>
00004              (C) 2002      Laurent Montel <montel@kde.org>
00005              (C) 1999 David Faure <faure@kde.org>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020    Boston, MA 02111-1307, USA.
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
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:42:54 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003