File indexing completed on 2024-09-22 05:16:06

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2008, 2013 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef KASTEN_EXPORTDIALOG_HPP
0010 #define KASTEN_EXPORTDIALOG_HPP
0011 
0012 // Qt
0013 #include <QDialog>
0014 
0015 namespace Kasten {
0016 
0017 class AbstractModelExporterConfigEditor;
0018 class AbstractSelectionView;
0019 class AbstractModelExporter;
0020 class AbstractModelSelection;
0021 class AbstractModel;
0022 
0023 class ExportDialog : public QDialog
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     ExportDialog(const QString& remoteTypeName, AbstractModelExporterConfigEditor* configEditor,
0029                  AbstractModelExporter* exporter,
0030                  QWidget* parent = nullptr);
0031 
0032     ~ExportDialog() override;
0033 
0034 public:
0035     void setData(AbstractModel* model, const AbstractModelSelection* selection);
0036 
0037 Q_SIGNALS:
0038     void exportAccepted(Kasten::AbstractModelExporter* exporter,
0039                         const Kasten::AbstractModelSelection* selection);
0040 
0041 private Q_SLOTS:
0042     void onFinished(int result);
0043 
0044 private:
0045     AbstractModelExporterConfigEditor* const mConfigEditor;
0046     AbstractModelExporter* const m_exporter;
0047     AbstractSelectionView* mPreviewView;
0048     const AbstractModelSelection* m_selection = nullptr;
0049 };
0050 
0051 }
0052 
0053 #endif