File indexing completed on 2024-04-28 04:21:27
0001 // SPDX-FileCopyrightText: 2007-2022 Jan Kundrát <jkt@gentoo.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #ifndef VIEWER_TEXTDISPLAY_H 0006 #define VIEWER_TEXTDISPLAY_H 0007 0008 #include "AbstractDisplay.h" 0009 0010 #include <DB/ImageInfoPtr.h> 0011 0012 class QWidget; 0013 class QLabel; 0014 0015 namespace Viewer 0016 { 0017 0018 class TextDisplay : public Viewer::AbstractDisplay 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit TextDisplay(QWidget *parent); 0023 void setText(const QString text); 0024 0025 public Q_SLOTS: 0026 /* zooming doesn't make sense for textual display */ 0027 void zoomIn() override { } 0028 void zoomOut() override { } 0029 void zoomFull() override { } 0030 void zoomPixelForPixel() override { } 0031 void stop() override { } 0032 void rotate(const DB::ImageInfoPtr & /*info*/) override { } 0033 0034 protected: 0035 bool setImageImpl(DB::ImageInfoPtr info, bool forward) override; 0036 0037 private: 0038 QLabel *m_text; 0039 }; 0040 } 0041 0042 #endif /* VIEWER_TEXTDISPLAY_H */ 0043 0044 // vi:expandtab:tabstop=4 shiftwidth=4: