From 4cdd831191a22604486fa895c57532f319a56b96 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sun, 4 Jul 2010 11:24:25 +0200 Subject: make image handler includes private now that they live in gui/image/ instead of plugins/imageformats/, the handlers need to get the usual _p suffix. --- src/gui/image/qgifhandler.cpp | 2 +- src/gui/image/qgifhandler.h | 96 ---------------------------------- src/gui/image/qgifhandler.pri | 2 +- src/gui/image/qgifhandler_p.h | 96 ++++++++++++++++++++++++++++++++++ src/gui/image/qimagereader.cpp | 8 +-- src/gui/image/qimagewriter.cpp | 8 +-- src/gui/image/qjpeghandler.cpp | 2 +- src/gui/image/qjpeghandler.h | 76 --------------------------- src/gui/image/qjpeghandler.pri | 2 +- src/gui/image/qjpeghandler_p.h | 76 +++++++++++++++++++++++++++ src/gui/image/qmnghandler.cpp | 2 +- src/gui/image/qmnghandler.h | 83 ----------------------------- src/gui/image/qmnghandler.pri | 2 +- src/gui/image/qmnghandler_p.h | 83 +++++++++++++++++++++++++++++ src/gui/image/qtiffhandler.cpp | 2 +- src/gui/image/qtiffhandler.h | 78 --------------------------- src/gui/image/qtiffhandler.pri | 2 +- src/gui/image/qtiffhandler_p.h | 78 +++++++++++++++++++++++++++ src/plugins/imageformats/gif/main.cpp | 2 +- src/plugins/imageformats/jpeg/main.cpp | 2 +- src/plugins/imageformats/mng/main.cpp | 2 +- src/plugins/imageformats/tiff/main.cpp | 2 +- 22 files changed, 353 insertions(+), 353 deletions(-) delete mode 100644 src/gui/image/qgifhandler.h create mode 100644 src/gui/image/qgifhandler_p.h delete mode 100644 src/gui/image/qjpeghandler.h create mode 100644 src/gui/image/qjpeghandler_p.h delete mode 100644 src/gui/image/qmnghandler.h create mode 100644 src/gui/image/qmnghandler_p.h delete mode 100644 src/gui/image/qtiffhandler.h create mode 100644 src/gui/image/qtiffhandler_p.h diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp index 129a11b..124d27b 100644 --- a/src/gui/image/qgifhandler.cpp +++ b/src/gui/image/qgifhandler.cpp @@ -44,7 +44,7 @@ ** ****************************************************************************/ -#include "qgifhandler.h" +#include "qgifhandler_p.h" #include #include diff --git a/src/gui/image/qgifhandler.h b/src/gui/image/qgifhandler.h deleted file mode 100644 index 8e07aff..0000000 --- a/src/gui/image/qgifhandler.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -** WARNING: -** A separate license from Unisys may be required to use the gif -** reader. See http://www.unisys.com/about__unisys/lzw/ -** for information from Unisys -** -****************************************************************************/ - -#ifndef QGIFHANDLER_H -#define QGIFHANDLER_H - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QGIFFormat; -class QGifHandler : public QImageIOHandler -{ -public: - QGifHandler(); - ~QGifHandler(); - - bool canRead() const; - bool read(QImage *image); - bool write(const QImage &image); - - QByteArray name() const; - - static bool canRead(QIODevice *device); - - QVariant option(ImageOption option) const; - void setOption(ImageOption option, const QVariant &value); - bool supportsOption(ImageOption option) const; - - int imageCount() const; - int loopCount() const; - int nextImageDelay() const; - int currentImageNumber() const; - -private: - bool imageIsComing() const; - QGIFFormat *gifFormat; - QString fileName; - mutable QByteArray buffer; - mutable QImage lastImage; - - mutable int nextDelay; - mutable int loopCnt; - int frameNumber; - mutable QVector imageSizes; - mutable bool scanIsCached; -}; - -QT_END_NAMESPACE - -#endif // QGIFHANDLER_H diff --git a/src/gui/image/qgifhandler.pri b/src/gui/image/qgifhandler.pri index 003476a..6eb0751 100644 --- a/src/gui/image/qgifhandler.pri +++ b/src/gui/image/qgifhandler.pri @@ -1,4 +1,4 @@ # common to plugin and built-in forms INCLUDEPATH *= $$PWD -HEADERS += $$PWD/qgifhandler.h +HEADERS += $$PWD/qgifhandler_p.h SOURCES += $$PWD/qgifhandler.cpp diff --git a/src/gui/image/qgifhandler_p.h b/src/gui/image/qgifhandler_p.h new file mode 100644 index 0000000..b2a9725 --- /dev/null +++ b/src/gui/image/qgifhandler_p.h @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +** WARNING: +** A separate license from Unisys may be required to use the gif +** reader. See http://www.unisys.com/about__unisys/lzw/ +** for information from Unisys +** +****************************************************************************/ + +#ifndef QGIFHANDLER_P_H +#define QGIFHANDLER_P_H + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QGIFFormat; +class QGifHandler : public QImageIOHandler +{ +public: + QGifHandler(); + ~QGifHandler(); + + bool canRead() const; + bool read(QImage *image); + bool write(const QImage &image); + + QByteArray name() const; + + static bool canRead(QIODevice *device); + + QVariant option(ImageOption option) const; + void setOption(ImageOption option, const QVariant &value); + bool supportsOption(ImageOption option) const; + + int imageCount() const; + int loopCount() const; + int nextImageDelay() const; + int currentImageNumber() const; + +private: + bool imageIsComing() const; + QGIFFormat *gifFormat; + QString fileName; + mutable QByteArray buffer; + mutable QImage lastImage; + + mutable int nextDelay; + mutable int loopCnt; + int frameNumber; + mutable QVector imageSizes; + mutable bool scanIsCached; +}; + +QT_END_NAMESPACE + +#endif // QGIFHANDLER_P_H diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 55c9341..ec56af2 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -142,16 +142,16 @@ #include #endif #ifndef QT_NO_IMAGEFORMAT_JPEG -#include +#include #endif #ifndef QT_NO_IMAGEFORMAT_MNG -#include +#include #endif #ifndef QT_NO_IMAGEFORMAT_TIFF -#include +#include #endif #ifdef QT_BUILTIN_GIF_READER -#include +#include #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index a46fc48..b995914 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -115,16 +115,16 @@ #include #endif #ifndef QT_NO_IMAGEFORMAT_JPEG -#include +#include #endif #ifndef QT_NO_IMAGEFORMAT_MNG -#include +#include #endif #ifndef QT_NO_IMAGEFORMAT_TIFF -#include +#include #endif #ifdef QT_BUILTIN_GIF_READER -#include +#include #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index 60e7cce..972dd65 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qjpeghandler.h" +#include "qjpeghandler_p.h" #include #include diff --git a/src/gui/image/qjpeghandler.h b/src/gui/image/qjpeghandler.h deleted file mode 100644 index c879f21..0000000 --- a/src/gui/image/qjpeghandler.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QJPEGHANDLER_H -#define QJPEGHANDLER_H - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QJpegHandlerPrivate; -class QJpegHandler : public QImageIOHandler -{ -public: - QJpegHandler(); - ~QJpegHandler(); - - bool canRead() const; - bool read(QImage *image); - bool write(const QImage &image); - - QByteArray name() const; - - static bool canRead(QIODevice *device); - - QVariant option(ImageOption option) const; - void setOption(ImageOption option, const QVariant &value); - bool supportsOption(ImageOption option) const; - -private: - QJpegHandlerPrivate *d; -}; - -QT_END_NAMESPACE - -#endif // QJPEGHANDLER_H diff --git a/src/gui/image/qjpeghandler.pri b/src/gui/image/qjpeghandler.pri index 28ec7dc..3cb35c9 100644 --- a/src/gui/image/qjpeghandler.pri +++ b/src/gui/image/qjpeghandler.pri @@ -1,6 +1,6 @@ # common to plugin and built-in forms INCLUDEPATH *= $$PWD -HEADERS += $$PWD/qjpeghandler.h +HEADERS += $$PWD/qjpeghandler_p.h SOURCES += $$PWD/qjpeghandler.cpp contains(QT_CONFIG, system-jpeg) { if(unix|win32-g++*): LIBS += -ljpeg diff --git a/src/gui/image/qjpeghandler_p.h b/src/gui/image/qjpeghandler_p.h new file mode 100644 index 0000000..5320a5e --- /dev/null +++ b/src/gui/image/qjpeghandler_p.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QJPEGHANDLER_P_H +#define QJPEGHANDLER_P_H + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QJpegHandlerPrivate; +class QJpegHandler : public QImageIOHandler +{ +public: + QJpegHandler(); + ~QJpegHandler(); + + bool canRead() const; + bool read(QImage *image); + bool write(const QImage &image); + + QByteArray name() const; + + static bool canRead(QIODevice *device); + + QVariant option(ImageOption option) const; + void setOption(ImageOption option, const QVariant &value); + bool supportsOption(ImageOption option) const; + +private: + QJpegHandlerPrivate *d; +}; + +QT_END_NAMESPACE + +#endif // QJPEGHANDLER_P_H diff --git a/src/gui/image/qmnghandler.cpp b/src/gui/image/qmnghandler.cpp index ec442a1..cf53af0 100644 --- a/src/gui/image/qmnghandler.cpp +++ b/src/gui/image/qmnghandler.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qmnghandler.h" +#include "qmnghandler_p.h" #include "qimage.h" #include "qvariant.h" diff --git a/src/gui/image/qmnghandler.h b/src/gui/image/qmnghandler.h deleted file mode 100644 index 65243be..0000000 --- a/src/gui/image/qmnghandler.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMNGHANDLER_H -#define QMNGHANDLER_H - -#include -#include - -QT_BEGIN_NAMESPACE - -class QImage; -class QByteArray; -class QIODevice; -class QVariant; -class QMngHandlerPrivate; - -class QMngHandler : public QImageIOHandler -{ - public: - QMngHandler(); - ~QMngHandler(); - virtual bool canRead() const; - virtual QByteArray name() const; - virtual bool read(QImage *image); - virtual bool write(const QImage &image); - virtual int currentImageNumber() const; - virtual int imageCount() const; - virtual bool jumpToImage(int imageNumber); - virtual bool jumpToNextImage(); - virtual int loopCount() const; - virtual int nextImageDelay() const; - static bool canRead(QIODevice *device); - virtual QVariant option(ImageOption option) const; - virtual void setOption(ImageOption option, const QVariant & value); - virtual bool supportsOption(ImageOption option) const; - - private: - Q_DECLARE_PRIVATE(QMngHandler) - QScopedPointer d_ptr; -}; - -QT_END_NAMESPACE - -#endif // QMNGHANDLER_H diff --git a/src/gui/image/qmnghandler.pri b/src/gui/image/qmnghandler.pri index ec1c19e..ffb98de 100644 --- a/src/gui/image/qmnghandler.pri +++ b/src/gui/image/qmnghandler.pri @@ -1,6 +1,6 @@ # common to plugin and built-in forms INCLUDEPATH *= $$PWD -HEADERS += $$PWD/qmnghandler.h +HEADERS += $$PWD/qmnghandler_p.h SOURCES += $$PWD/qmnghandler.cpp contains(QT_CONFIG, system-mng) { if(unix|win32-g++*):LIBS += -lmng diff --git a/src/gui/image/qmnghandler_p.h b/src/gui/image/qmnghandler_p.h new file mode 100644 index 0000000..c39d0a6 --- /dev/null +++ b/src/gui/image/qmnghandler_p.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMNGHANDLER_P_H +#define QMNGHANDLER_P_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QImage; +class QByteArray; +class QIODevice; +class QVariant; +class QMngHandlerPrivate; + +class QMngHandler : public QImageIOHandler +{ + public: + QMngHandler(); + ~QMngHandler(); + virtual bool canRead() const; + virtual QByteArray name() const; + virtual bool read(QImage *image); + virtual bool write(const QImage &image); + virtual int currentImageNumber() const; + virtual int imageCount() const; + virtual bool jumpToImage(int imageNumber); + virtual bool jumpToNextImage(); + virtual int loopCount() const; + virtual int nextImageDelay() const; + static bool canRead(QIODevice *device); + virtual QVariant option(ImageOption option) const; + virtual void setOption(ImageOption option, const QVariant & value); + virtual bool supportsOption(ImageOption option) const; + + private: + Q_DECLARE_PRIVATE(QMngHandler) + QScopedPointer d_ptr; +}; + +QT_END_NAMESPACE + +#endif // QMNGHANDLER_P_H diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp index 619aa4e..de4f680 100644 --- a/src/gui/image/qtiffhandler.cpp +++ b/src/gui/image/qtiffhandler.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qtiffhandler.h" +#include "qtiffhandler_p.h" #include #include #include diff --git a/src/gui/image/qtiffhandler.h b/src/gui/image/qtiffhandler.h deleted file mode 100644 index 4534ed5..0000000 --- a/src/gui/image/qtiffhandler.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTIFFHANDLER_H -#define QTIFFHANDLER_H - -#include - -QT_BEGIN_NAMESPACE - -class QTiffHandler : public QImageIOHandler -{ -public: - QTiffHandler(); - - bool canRead() const; - bool read(QImage *image); - bool write(const QImage &image); - - QByteArray name() const; - - static bool canRead(QIODevice *device); - - QVariant option(ImageOption option) const; - void setOption(ImageOption option, const QVariant &value); - bool supportsOption(ImageOption option) const; - - enum Compression { - NoCompression = 0, - LzwCompression = 1 - }; -private: - void convert32BitOrder(void *buffer, int width); - void convert32BitOrderBigEndian(void *buffer, int width); - int compression; -}; - -QT_END_NAMESPACE - -#endif // QTIFFHANDLER_H diff --git a/src/gui/image/qtiffhandler.pri b/src/gui/image/qtiffhandler.pri index 8ac70d9..e1cc3ee 100644 --- a/src/gui/image/qtiffhandler.pri +++ b/src/gui/image/qtiffhandler.pri @@ -1,6 +1,6 @@ # common to plugin and built-in forms INCLUDEPATH *= $$PWD -HEADERS += $$PWD/qtiffhandler.h +HEADERS += $$PWD/qtiffhandler_p.h SOURCES += $$PWD/qtiffhandler.cpp contains(QT_CONFIG, system-tiff) { if(unix|win32-g++*):LIBS += -ltiff diff --git a/src/gui/image/qtiffhandler_p.h b/src/gui/image/qtiffhandler_p.h new file mode 100644 index 0000000..da7d7ed --- /dev/null +++ b/src/gui/image/qtiffhandler_p.h @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTIFFHANDLER_P_H +#define QTIFFHANDLER_P_H + +#include + +QT_BEGIN_NAMESPACE + +class QTiffHandler : public QImageIOHandler +{ +public: + QTiffHandler(); + + bool canRead() const; + bool read(QImage *image); + bool write(const QImage &image); + + QByteArray name() const; + + static bool canRead(QIODevice *device); + + QVariant option(ImageOption option) const; + void setOption(ImageOption option, const QVariant &value); + bool supportsOption(ImageOption option) const; + + enum Compression { + NoCompression = 0, + LzwCompression = 1 + }; +private: + void convert32BitOrder(void *buffer, int width); + void convert32BitOrderBigEndian(void *buffer, int width); + int compression; +}; + +QT_END_NAMESPACE + +#endif // QTIFFHANDLER_P_H diff --git a/src/plugins/imageformats/gif/main.cpp b/src/plugins/imageformats/gif/main.cpp index 3bb0bf4..99a9528 100644 --- a/src/plugins/imageformats/gif/main.cpp +++ b/src/plugins/imageformats/gif/main.cpp @@ -47,7 +47,7 @@ #ifdef QT_NO_IMAGEFORMAT_GIF #undef QT_NO_IMAGEFORMAT_GIF #endif -#include "qgifhandler.h" +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/imageformats/jpeg/main.cpp b/src/plugins/imageformats/jpeg/main.cpp index 2a45cb0..8eb3f03 100644 --- a/src/plugins/imageformats/jpeg/main.cpp +++ b/src/plugins/imageformats/jpeg/main.cpp @@ -47,7 +47,7 @@ #ifdef QT_NO_IMAGEFORMAT_JPEG #undef QT_NO_IMAGEFORMAT_JPEG #endif -#include "qjpeghandler.h" +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/imageformats/mng/main.cpp b/src/plugins/imageformats/mng/main.cpp index 84f085c..dd62ba5 100644 --- a/src/plugins/imageformats/mng/main.cpp +++ b/src/plugins/imageformats/mng/main.cpp @@ -47,7 +47,7 @@ #ifdef QT_NO_IMAGEFORMAT_MNG #undef QT_NO_IMAGEFORMAT_MNG #endif -#include "qmnghandler.h" +#include #include #include diff --git a/src/plugins/imageformats/tiff/main.cpp b/src/plugins/imageformats/tiff/main.cpp index fbcbd72..c022abe 100644 --- a/src/plugins/imageformats/tiff/main.cpp +++ b/src/plugins/imageformats/tiff/main.cpp @@ -47,7 +47,7 @@ #ifdef QT_NO_IMAGEFORMAT_TIFF #undef QT_NO_IMAGEFORMAT_TIFF #endif -#include "qtiffhandler.h" +#include QT_BEGIN_NAMESPACE -- cgit v0.12