File indexing completed on 2024-05-12 15:28:21

0001 /***************************************************************************
0002     File                 : ExportWorksheetDialog.h
0003     Project              : LabPlot
0004     Description          : export worksheet dialog
0005     --------------------------------------------------------------------
0006     Copyright            : (C) 2011-2019 by Alexander Semke (alexander.semke@web.de)
0007 
0008  ***************************************************************************/
0009 
0010 /***************************************************************************
0011  *                                                                         *
0012  *  This program is free software; you can redistribute it and/or modify   *
0013  *  it under the terms of the GNU General Public License as published by   *
0014  *  the Free Software Foundation; either version 2 of the License, or      *
0015  *  (at your option) any later version.                                    *
0016  *                                                                         *
0017  *  This program is distributed in the hope that it will be useful,        *
0018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
0019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
0020  *  GNU General Public License for more details.                           *
0021  *                                                                         *
0022  *   You should have received a copy of the GNU General Public License     *
0023  *   along with this program; if not, write to the Free Software           *
0024  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
0025  *   Boston, MA  02110-1301  USA                                           *
0026  *                                                                         *
0027  ***************************************************************************/
0028 
0029 #ifndef EXPORTWORKSHEETDIALOG_H
0030 #define EXPORTWORKSHEETDIALOG_H
0031 
0032 #include <QDialog>
0033 #include "commonfrontend/worksheet/WorksheetView.h"
0034 
0035 namespace Ui {
0036     class ExportWorksheetWidget;
0037 }
0038 
0039 class QPushButton;
0040 class QAbstractButton;
0041 
0042 class ExportWorksheetDialog : public QDialog {
0043     Q_OBJECT
0044 
0045 public:
0046     explicit ExportWorksheetDialog(QWidget*);
0047     ~ExportWorksheetDialog() override;
0048 
0049     QString path() const;
0050     void setFileName(const QString&);
0051     WorksheetView::ExportFormat exportFormat() const;
0052     WorksheetView::ExportArea exportArea() const;
0053     bool exportBackground() const;
0054     int exportResolution() const;
0055 
0056 private:
0057     Ui::ExportWorksheetWidget* ui;
0058     bool m_showOptions{true};
0059     QPushButton* m_showOptionsButton;
0060     QPushButton* m_okButton;
0061     QPushButton* m_cancelButton;
0062 
0063 private slots:
0064     void slotButtonClicked(QAbstractButton *);
0065     void okClicked();
0066     void toggleOptions();
0067     void selectFile();
0068     void formatChanged(int);
0069     void exportToChanged(int);
0070     void fileNameChanged(const QString&);
0071 };
0072 
0073 #endif