diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-02-14 09:41:26 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-15 06:27:46 +0100 |
commit | 732a86a11dbc20079e33c289af72762ce0125ced (patch) | |
tree | 2269c4dc9cf0e53d1ad2928d69b32696b23b50ab /src/imports/etcprovider/qetcprovider.h | |
parent | 16da679efc71293e097de7219fd855885c58dcb7 (diff) |
Remove etcprovider plugin.
Handling image providers via QDeclarativeExtensionPlugin is not a
pattern we want to promote for library code. The plugin was also
missing documentation and autotests. It might be appropriate to be
re-added later as an example showing the use of an image provider with
a texture factory.
Change-Id: I2d8f3208aebd55180bd627b3f9acc0679eb6328c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/imports/etcprovider/qetcprovider.h')
-rw-r--r-- | src/imports/etcprovider/qetcprovider.h | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/src/imports/etcprovider/qetcprovider.h b/src/imports/etcprovider/qetcprovider.h deleted file mode 100644 index 32e0d4097b..0000000000 --- a/src/imports/etcprovider/qetcprovider.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Declarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QETCPROVIDER_H -#define QETCPROVIDER_H - -#include <qopengl.h> -#include <QDeclarativeImageProvider> -#include <QtQuick/QSGTexture> -#include <QDeclarativeEngine> -#include <QDeclarativeContext> -#include <QFileInfo> - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - -// #define ETC_DEBUG - -class EtcTexture : public QSGTexture -{ - Q_OBJECT -public: - EtcTexture(); - ~EtcTexture(); - - void bind(); - QSize textureSize() const; - - int textureId() const { return m_texture_id; } - - void setImage(const QImage &image) { Q_UNUSED(image); } - - bool hasAlphaChannel() const { return false; } - bool hasMipmaps() const { return false; } - - QByteArray m_data; - QSize m_size; - QSize m_paddedSize; - GLuint m_texture_id; -}; - -class QEtcProvider : public QDeclarativeImageProvider -{ -public: - QEtcProvider() - : QDeclarativeImageProvider(QDeclarativeImageProvider::Texture) - { -#ifdef ETC_DEBUG - qDebug () << "Creating QEtcProvider."; -#endif - } - QDeclarativeTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize); -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QETCPROVIDER_H |