File indexing completed on 2025-01-12 13:05:51

0001 /* This file is part of the KDE project
0002    Copyright (C) 2005 Bram Schoenmakers <bramschoenmakers@kde.nl>
0003 
0004    This library is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License as published by the Free Software Foundation; either
0007    version 2 of the License, or (at your option) any later version.
0008 
0009    This library is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    Library General Public License for more details.
0013 
0014    You should have received a copy of the GNU Library General Public License
0015    along with this library; see the file COPYING.LIB.  If not, write to
0016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018 */
0019 
0020 #ifndef EXPORTDIALOG_H
0021 #define EXPORTDIALOG_H
0022 
0023 #include <KoDialog.h>
0024 class QUrl;
0025 
0026 #include <ui_exportwidget.h>
0027 
0028 class ExportWidget : public QWidget, public Ui::ExportWidget
0029 {
0030 public:
0031     explicit ExportWidget(QWidget *parent) : QWidget(parent) {
0032         setupUi(this);
0033     }
0034 };
0035 
0036 
0037 class ExportDialog : public KoDialog
0038 {
0039     Q_OBJECT
0040 public:
0041     explicit ExportDialog(QWidget *parent = 0);
0042     ~ExportDialog() override;
0043 
0044     void setSheets(const QStringList &);
0045     QStringList sheets() const;
0046 
0047     /**
0048       Returns preferred encoding. Defaults to UTF-8.
0049      */
0050     QTextCodec *encoding() const;
0051 
0052     /**
0053       Returns a valid URL if the custom button was selected.
0054       Else, it will return QUrl().
0055     */
0056     QUrl customStyleURL() const;
0057 
0058     /**
0059       Returns true if borders should be shown, false if borders
0060       should be hidden.
0061      */
0062     bool useBorders() const;
0063 
0064     bool separateFiles() const;
0065 
0066     int pixelsBetweenCells() const;
0067 protected Q_SLOTS:
0068     void selectAll();
0069 private:
0070     ExportWidget *m_mainwidget;
0071 };
0072 
0073 #endif