2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2016-03-17 16:02:20 +01:00
|
|
|
|
2017-06-28 10:07:01 +03:00
|
|
|
#pragma once
|
2016-03-17 16:02:20 +01:00
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
|
|
QT_FORWARD_DECLARE_CLASS(QSpinBox)
|
|
|
|
|
|
|
|
|
|
namespace Utils { class PathChooser; }
|
|
|
|
|
|
2022-07-08 18:51:09 +02:00
|
|
|
namespace ImageViewer::Internal {
|
2016-03-17 16:02:20 +01:00
|
|
|
|
2018-01-12 15:32:10 +01:00
|
|
|
struct ExportData;
|
|
|
|
|
|
2016-03-17 16:02:20 +01:00
|
|
|
class ExportDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
explicit ExportDialog(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
QSize exportSize() const;
|
|
|
|
|
void setExportSize(const QSize &);
|
|
|
|
|
|
|
|
|
|
QString exportFileName() const;
|
|
|
|
|
void setExportFileName(const QString &);
|
|
|
|
|
|
2018-01-12 15:32:10 +01:00
|
|
|
ExportData exportData() const;
|
|
|
|
|
|
2016-03-17 16:02:20 +01:00
|
|
|
void accept() override;
|
|
|
|
|
|
2018-01-12 15:32:10 +01:00
|
|
|
static QString imageNameFilterString();
|
|
|
|
|
|
2017-03-18 23:31:33 +02:00
|
|
|
private:
|
2016-03-17 16:02:20 +01:00
|
|
|
void resetExportSize();
|
|
|
|
|
void exportWidthChanged(int width);
|
|
|
|
|
void exportHeightChanged(int height);
|
|
|
|
|
|
|
|
|
|
void setExportWidthBlocked(int width);
|
|
|
|
|
void setExportHeightBlocked(int height);
|
|
|
|
|
|
|
|
|
|
Utils::PathChooser *m_pathChooser;
|
|
|
|
|
QSpinBox *m_widthSpinBox;
|
|
|
|
|
QSpinBox *m_heightSpinBox;
|
|
|
|
|
QSize m_defaultSize;
|
|
|
|
|
qreal m_aspectRatio;
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-08 18:51:09 +02:00
|
|
|
} // ImageViewer::Internal
|