1 /************************************************************************ 2 ** 3 ** Copyright (C) 2019 Kevin B. Hendricks, Stratford, Ontario Canada 4 ** Copyright (C) 2013 Dave Heiland 5 ** 6 ** This file is part of Sigil. 7 ** 8 ** Sigil is free software: you can redistribute it and/or modify 9 ** it under the terms of the GNU General Public License as published by 10 ** the Free Software Foundation, either version 3 of the License, or 11 ** (at your option) any later version. 12 ** 13 ** Sigil is distributed in the hope that it will be useful, 14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ** GNU General Public License for more details. 17 ** 18 ** You should have received a copy of the GNU General Public License 19 ** along with Sigil. If not, see <http://www.gnu.org/licenses/>. 20 ** 21 *************************************************************************/ 22 23 #pragma once 24 #ifndef VIEWIMAGE_H 25 #define VIEWIMAGE_H 26 27 #include <QDialog> 28 #include <QSize> 29 #include "Misc/SettingsStore.h" 30 #include "ResourceObjects/Resource.h" 31 32 class QVBoxLayout; 33 class ImageView; 34 class QToolButton; 35 36 class ViewImage : public QDialog 37 { 38 Q_OBJECT 39 40 public: 41 ViewImage(QWidget *parent = 0); 42 ~ViewImage(); 43 44 QSize sizeHint(); 45 void ShowImage(QString path); 46 47 public slots: 48 void ReloadViewer(); 49 50 private slots: 51 void WriteSettings(); 52 53 private: 54 void ReadSettings(); 55 void ConnectSignalsToSlots(); 56 57 ImageView * m_iv; 58 QToolButton* m_bp; 59 QVBoxLayout* m_layout; 60 }; 61 62 #endif // VIEWIMAGE_H 63