File indexing completed on 2024-04-28 04:21:25

0001 // SPDX-FileCopyrightText: 2003 - 2022 Jesper K. Pedersen <blackie@kde.org>
0002 // SPDX-FileCopyrightText: 2023 Johannes Zarl-Zierl <johannes@zarl-zierl.at>
0003 //
0004 // SPDX-License-Identifier: GPL-2.0-or-later
0005 
0006 #ifndef ABSTRACTDISPLAY_H
0007 #define ABSTRACTDISPLAY_H
0008 
0009 #include <DB/ImageInfo.h>
0010 #include <DB/ImageInfoPtr.h>
0011 #include <qwidget.h>
0012 
0013 namespace Viewer
0014 {
0015 class AbstractDisplay : public QWidget
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit AbstractDisplay(QWidget *parent);
0021     bool setImage(DB::ImageInfoPtr info, bool forward);
0022 
0023 public Q_SLOTS:
0024     virtual void zoomIn() {};
0025     virtual void zoomOut() {};
0026     virtual void zoomFull() {};
0027     virtual void zoomPixelForPixel() {};
0028     virtual void stop() = 0;
0029     virtual void rotate(const DB::ImageInfoPtr &info) = 0;
0030 
0031 protected:
0032     virtual bool setImageImpl(DB::ImageInfoPtr info, bool forward) = 0;
0033     DB::ImageInfoPtr m_info; ///< The pointer to the currently displayed image (may be null)
0034 };
0035 
0036 }
0037 
0038 #endif /* ABSTRACTDISPLAY_H */
0039 
0040 // vi:expandtab:tabstop=4 shiftwidth=4: