SilentEye 0.4.1

modules/seformatjpeg/seformatjpeg.h

Go to the documentation of this file.
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 SEFORMATJPEG_H_
00017 #define SEFORMATJPEG_H_
00018 
00019 #include <QtCore>
00020 #include <imagemoduleinterface.h>
00021 #include <logger.h>
00022 #include <image.h>
00023 
00024 #include "optionwidget.h"
00025 
00026 using namespace SilentEyeFramework;
00027 
00029 namespace SEFormatJPEG {
00030 
00031 
00033     class SEFormatJpeg : public ImageModuleInterface
00034     {
00035         Q_OBJECT;
00036         Q_INTERFACES(SilentEyeFramework::ImageModuleInterface);
00037 
00038     private:
00039         QPointer<Logger> m_logger;
00040         OptionWidget* m_encodeWidget;
00041         OptionWidget* m_decodeWidget;
00042 
00043     public:
00044         SEFormatJpeg();
00045         ~SEFormatJpeg();
00046 
00047         QWidget* encodeWidget();
00048         QWidget* decodeWidget();
00049         bool isEncodeWidgetReady() const;
00050         bool isDecodeWidgetReady() const;
00051 
00052         QPointer<Image> encodeImage(QPointer<Image>,bool=false);
00053         QPointer<Image> decodeImage(QPointer<Image>,bool=false);
00054 
00055         QString typeSupported() const;
00056 
00057         QString name() const;
00058         QString version() const;
00059         QString status();
00060 
00061     private:
00062         QPointer<Image> updateImage(QPointer<Image>, OptionWidget*, bool);
00063 
00064     private slots:
00065         void optionHasChanged();
00066 
00067     signals:
00068         void optionChanged();
00069     };
00070 }
00071 
00072 #endif