filters

csvexportdialog.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1999 David Faure <faure@kde.org>
00003    Copyright (C) 2004 Nicolas GOUTTE <goutte@kde.org>
00004    
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef CSVEXPORTDIALOG_H
00022 #define CSVEXPORTDIALOG_H
00023 
00024 #include <kdialogbase.h>
00025 
00026 class ExportDialogUI;
00027 class QValidator;
00028 
00029 namespace KSpread
00030 {
00031 class Map;
00032 }
00033 
00034 class CSVExportDialog : public KDialogBase
00035 {
00036   Q_OBJECT
00037  public:
00038   CSVExportDialog(QWidget * parent);
00039   ~CSVExportDialog();
00040 
00041   QChar   getDelimiter() const;
00042   QChar   getTextQuote() const;
00043   bool    exportSheet( QString const & sheetName ) const;
00044   bool    printAlwaysSheetDelimiter() const;
00045   QString getSheetDelimiter() const;  
00046   bool    exportSelectionOnly() const;
00047 
00048   void  fillSheet( KSpread::Map * map );
00049   QString getEndOfLine(void) const;
00050   QTextCodec* getCodec(void) const;
00051 
00052  private:
00053   ExportDialogUI * m_dialog;
00054 
00055   QValidator* m_delimiterValidator;
00056   QString m_delimiter;
00057   QChar   m_textquote;
00058 
00059  private slots:
00060   void slotOk();
00061   void slotCancel();
00062 
00063   void returnPressed();
00064   void delimiterClicked( int id );
00065   void textChanged ( const QString & );
00066   void textquoteSelected( const QString & mark );
00067   void selectionOnlyChanged( bool );
00068 };
00069 
00070 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys