SilentEye 0.4.1
|
00001 // This file is part of SilentEye. 00002 // 00003 // SilentEye is free software: you can redistribute it and/or modify 00004 // it under the terms of the GNU General Public License as published by 00005 // the Free Software Foundation, either version 3 of the License, or 00006 // (at your option) any later version. 00007 // 00008 // SilentEye is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 // GNU General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License 00014 // along with SilentEye. If not, see <http://www.gnu.org/licenses/>. 00015 00016 #ifndef SEFORMATBMP_H_ 00017 #define SEFORMATBMP_H_ 00018 00019 #include <QtCore> 00020 #include <imagemoduleinterface.h> 00021 #include <logger.h> 00022 00023 #include "optionwidget.h" 00024 #include "imagebmp.h" 00025 00026 using namespace SilentEyeFramework; 00027 00029 namespace SEFormatBMP { 00030 00032 class SEFormatBmp : public ImageModuleInterface 00033 { 00034 Q_OBJECT; 00035 Q_INTERFACES(SilentEyeFramework::ImageModuleInterface); 00036 00037 private: 00038 QPointer<Logger> m_logger; 00039 OptionWidget* m_encodeWidget; 00040 OptionWidget* m_decodeWidget; 00041 00042 public: 00043 SEFormatBmp(); 00044 ~SEFormatBmp(); 00045 00046 QWidget* encodeWidget(); 00047 QWidget* decodeWidget(); 00048 bool isEncodeWidgetReady() const; 00049 bool isDecodeWidgetReady() const; 00050 00051 QPointer<Image> encodeImage(QPointer<Image>, bool=false); 00052 QPointer<Image> decodeImage(QPointer<Image>, bool=false); 00053 00054 QString typeSupported() const; 00055 00056 QString name() const; 00057 QString version() const; 00058 QString status(); 00059 00060 private: 00061 QPointer<Image> updateImage(QPointer<Image>, OptionWidget*, bool); 00062 00063 private slots: 00064 void optionHasChanged(); 00065 00066 signals: 00067 void optionChanged(); 00068 }; 00069 } 00070 00071 #endif