File indexing completed on 2024-05-05 04:22:02
0001 // SPDX-FileCopyrightText: 2003-2022 Jesper K. Pedersen <blackie@kde.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #ifndef MINIVIEWER_H 0006 #define MINIVIEWER_H 0007 0008 #include <DB/ImageInfoPtr.h> 0009 0010 #include <qdialog.h> 0011 #include <qimage.h> 0012 0013 class QCloseEvent; 0014 class QLabel; 0015 0016 namespace DB 0017 { 0018 class ImageInfo; 0019 } 0020 0021 namespace ImportExport 0022 { 0023 0024 class MiniViewer : public QDialog 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 static void show(QImage img, DB::ImageInfoPtr info, QWidget *parent = nullptr); 0030 void closeEvent(QCloseEvent *event) override; 0031 0032 protected Q_SLOTS: 0033 void slotClose(); 0034 0035 private: 0036 explicit MiniViewer(QWidget *parent = nullptr); 0037 static MiniViewer *s_instance; 0038 QLabel *m_pixmap; 0039 }; 0040 0041 } 0042 0043 #endif /* MINIVIEWER_H */ 0044 0045 // vi:expandtab:tabstop=4 shiftwidth=4: