File indexing completed on 2024-05-12 04:34:49
0001 /* ============================================================ 0002 * 0003 * SPDX-FileCopyrightText: 2007-2012 Kåre Särs <kare.sars@iki .fi> 0004 * SPDX-FileCopyrightText: 2009 Arseniy Lartsev <receive-spam at yandex dot ru> 0005 * SPDX-FileCopyrightText: 2014 Gregor Mitsch : port to KDE5 frameworks 0006 * SPDX-FileCopyrightText: 2018 Alexander Volkov <a.volkov@rusbitech.ru> 0007 * 0008 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0009 * 0010 * ============================================================ */ 0011 0012 #ifndef SHOWIMAGEDIALOG_H 0013 #define SHOWIMAGEDIALOG_H 0014 0015 #include <QDialog> 0016 0017 class ImageViewer; 0018 0019 class ShowImageDialog : public QDialog 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit ShowImageDialog(QWidget *parent = nullptr); 0024 0025 void setQImage(QImage *img); 0026 0027 public Q_SLOTS: 0028 void zoom2Fit(); 0029 0030 Q_SIGNALS: 0031 void saveRequested(); 0032 0033 protected: 0034 void showEvent(QShowEvent *e) override; 0035 0036 private: 0037 QPushButton *m_saveButton = nullptr; 0038 ImageViewer *m_imageViewer = nullptr; 0039 }; 0040 0041 #endif // SHOWIMAGEDIALOG_H