TonicTones
|
00001 // ToneMappingOperator.h 00002 // 00003 // Copyright 2010 Jérémy Laumon <jeremy.laumon@gmail.com> 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00018 // MA 02110-1301, USA. 00019 00020 00021 #ifndef TONEMAPPINGOPERATOR_H 00022 #define TONEMAPPINGOPERATOR_H 00023 00024 #include <QtGui> 00025 #include <HdrImage.h> 00026 00032 class ToneMappingOperator : public QObject 00033 { 00034 Q_OBJECT 00035 public: 00036 virtual ~ToneMappingOperator(){} 00037 00041 virtual void setupUi(QWidget* widget) = 0; 00042 00046 virtual const HdrImage* getToneMappedImage() const = 0; 00047 00053 virtual void setImage(const HdrImage *image) = 0; 00054 00058 virtual QString name() const = 0; 00059 signals: 00060 00064 void imageUpdated() const; 00065 00069 void message(const QString& msg); 00070 }; 00071 00072 typedef QSharedPointer<ToneMappingOperator> ToneMappingOperatorPtr; 00073 00074 00075 //---------------------------------------------------------------------- 00076 00085 class ToneMappingOperatorFactory 00086 { 00087 public: 00088 virtual ~ToneMappingOperatorFactory(){} 00089 00093 virtual ToneMappingOperatorPtr createOperator() const = 0; 00094 00098 virtual QString operatorName() const = 0; 00099 }; 00100 00101 Q_DECLARE_INTERFACE(ToneMappingOperatorFactory, "TonicTones.ToneMappingOperatorFactory/1.0") 00102 00103 00104 #endif