1 /** 2 * This file is a part of Luminance HDR package. 3 * ---------------------------------------------------------------------- 4 * Copyright (C) 2012 Franco Comida 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * ---------------------------------------------------------------------- 20 * 21 * @author Franco Comida <fcomida@users.sourceforge.net> 22 */ 23 24 #ifndef PREVIEWSETTINGS_IMPL_H 25 #define PREVIEWSETTINGS_IMPL_H 26 27 #include <QWidget> 28 29 #include "UI/FlowLayout.h" 30 31 // forward declaration 32 namespace pfs { 33 class Frame; // #include "Libpfs/frame.h" 34 } 35 36 class TonemappingOptions; // #include "Core/TonemappingOptions.h" 37 class PreviewLabel; // #include "PreviewSettings/PreviewLabel.h" 38 39 class PreviewSettings : public QWidget { 40 Q_OBJECT 41 42 public: 43 explicit PreviewSettings(QWidget *parent = 0); 44 ~PreviewSettings(); 45 void addPreviewLabel(PreviewLabel *label); 46 PreviewLabel *getPreviewLabel(int index); 47 QSize getLabelSize(); getSize()48 int getSize() { return m_ListPreviewLabel.size(); } 49 void clear(); 50 51 protected: 52 virtual void changeEvent(QEvent *event); 53 54 public Q_SLOTS: 55 void selectLabel(int index); 56 void updatePreviews(pfs::Frame *frame); 57 58 protected Q_SLOTS: 59 void tonemapPreview(TonemappingOptions *); 60 61 Q_SIGNALS: 62 void startTonemapping(TonemappingOptions *); 63 void triggered(); 64 65 private: 66 int m_original_width_frame; 67 QList<PreviewLabel *> m_ListPreviewLabel; 68 FlowLayout *m_flowLayout; 69 }; 70 #endif 71