File indexing completed on 2025-01-26 05:24:14

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_COPYASDIALOG_HPP
0010 #define KASTEN_COPYASDIALOG_HPP
0011 
0012 // Qt
0013 #include <QDialog>
0014 
0015 namespace Kasten {
0016 
0017 class AbstractModelStreamEncoderConfigEditor;
0018 class AbstractSelectionView;
0019 class AbstractModelStreamEncoder;
0020 class AbstractModelSelection;
0021 class AbstractModel;
0022 
0023 class CopyAsDialog : public QDialog
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     /**
0029      * @param configEditor the editor to embed, dialog takes ownership
0030      */
0031     CopyAsDialog(const QString& remoteTypeName, AbstractModelStreamEncoderConfigEditor* configEditor,
0032                  AbstractModelStreamEncoder* encoder,
0033                  QWidget* parent = nullptr);
0034 
0035     ~CopyAsDialog() override;
0036 
0037 public:
0038     void setData(AbstractModel* model, const AbstractModelSelection* selection);
0039 
0040 Q_SIGNALS:
0041     void copyAccepted(Kasten::AbstractModelStreamEncoder* encoder,
0042                       const Kasten::AbstractModelSelection* selection);
0043 
0044 private Q_SLOTS:
0045 //     void onSelectorChanged( int index );
0046 //     void onOffsetChanged( const QString &text );
0047     void onFinished(int result);
0048 
0049 private:
0050     AbstractModelStreamEncoderConfigEditor* const mConfigEditor;
0051     AbstractModelStreamEncoder* const m_encoder;
0052     AbstractSelectionView* mPreviewView;
0053     const AbstractModelSelection* m_selection = nullptr;
0054 };
0055 
0056 }
0057 
0058 #endif