diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2015-12-02 15:53:04 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-12-02 22:06:36 +0000 |
commit | c45b47e99eaf0bcecec606a304b338424d58561b (patch) | |
tree | 501e8e77c7f1462a44969c8b3c17acf72bdd645f /src/core | |
parent | 4ab78c9a125abc667a4166c58f9be2d72bdef5a7 (diff) |
Move core/io content to render/geometry and io
Change-Id: I79e0b0d62e07a269ebfce99edff56d30da28494c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.pri | 2 | ||||
-rw-r--r-- | src/core/io/io.pri | 13 | ||||
-rw-r--r-- | src/core/io/qabstractattribute.cpp | 274 | ||||
-rw-r--r-- | src/core/io/qabstractattribute.h | 141 | ||||
-rw-r--r-- | src/core/io/qabstractattribute_p.h | 84 | ||||
-rw-r--r-- | src/core/io/qabstractbuffer.cpp | 95 | ||||
-rw-r--r-- | src/core/io/qabstractbuffer.h | 75 | ||||
-rw-r--r-- | src/core/io/qabstractbuffer_p.h | 75 | ||||
-rw-r--r-- | src/core/io/qurlhelper.cpp | 65 | ||||
-rw-r--r-- | src/core/io/qurlhelper_p.h | 68 |
10 files changed, 0 insertions, 892 deletions
diff --git a/src/core/core.pri b/src/core/core.pri index 17315c7d5..e970d5822 100644 --- a/src/core/core.pri +++ b/src/core/core.pri @@ -12,8 +12,6 @@ include (./core-components/core-components.pri) include (./transforms/transforms.pri) # Resources Management include (./resources/resources.pri) -# IO -include (./io/io.pri) # Services include (./services/services.pri) diff --git a/src/core/io/io.pri b/src/core/io/io.pri deleted file mode 100644 index c56bdae2e..000000000 --- a/src/core/io/io.pri +++ /dev/null @@ -1,13 +0,0 @@ -HEADERS += \ - $$PWD/qabstractbuffer.h \ - $$PWD/qabstractattribute.h \ - $$PWD/qabstractattribute_p.h \ - $$PWD/qabstractbuffer_p.h \ - $$PWD/qurlhelper_p.h - -SOURCES += \ - $$PWD/qabstractbuffer.cpp \ - $$PWD/qabstractattribute.cpp \ - $$PWD/qurlhelper.cpp - -INCLUDEPATH += $$PWD diff --git a/src/core/io/qabstractattribute.cpp b/src/core/io/qabstractattribute.cpp deleted file mode 100644 index 577d6596c..000000000 --- a/src/core/io/qabstractattribute.cpp +++ /dev/null @@ -1,274 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qabstractattribute.h" -#include "qabstractattribute_p.h" -#include "qabstractbuffer.h" - -#include <Qt3DCore/qscenepropertychange.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -/*! - \class Qt3DCore::QAbstractAttributePrivate - \internal -*/ -QAbstractAttributePrivate::QAbstractAttributePrivate() - : QNodePrivate() - , m_buffer(Q_NULLPTR) - , m_name() - , m_dataType(QAbstractAttribute::Float) - , m_dataSize(1) - , m_count(0) - , m_byteStride(0) - , m_byteOffset(0) - , m_divisor(0) - , m_attributeType(QAbstractAttribute::VertexAttribute) -{ -} - -QAbstractAttribute::QAbstractAttribute(QNode *parent) - : QNode(*new QAbstractAttributePrivate(), parent) -{ -} - -QAbstractAttribute::~QAbstractAttribute() -{ - Q_ASSERT_X(QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DCore::QAbstractAttribute subclass didn't call QNode::cleanup in its destructor"); -} - -QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset, uint stride, QNode *parent) - : QNode(*new QAbstractAttributePrivate(), parent) -{ - Q_D(QAbstractAttribute); - setBuffer(buf); - d->m_count = count; - d->m_byteOffset = offset; - d->m_dataType = type; - d->m_dataSize = dataSize; - d->m_byteStride = stride; -} - -QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QNode *parent) - : QNode(dd, parent) -{ -} - -QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractBuffer *buf, const QString &name, DataType dataType, uint dataSize, uint count, uint offset, uint stride, QNode *parent) - : QNode(dd, parent) -{ - Q_D(QAbstractAttribute); - setBuffer(buf); - d->m_name = name; - d->m_count = count; - d->m_byteOffset = offset; - d->m_dataType = dataType; - d->m_dataSize = dataSize; - d->m_byteStride = stride; -} - -void QAbstractAttribute::copy(const QNode *ref) -{ - QNode::copy(ref); - const QAbstractAttribute *attribute = static_cast<const QAbstractAttribute *>(ref); - d_func()->m_buffer = qobject_cast<QAbstractBuffer *>(QNode::clone(attribute->d_func()->m_buffer)); - d_func()->m_name = attribute->d_func()->m_name; - d_func()->m_count = attribute->d_func()->m_count; - d_func()->m_divisor = attribute->d_func()->m_divisor; - d_func()->m_byteOffset = attribute->d_func()->m_byteOffset; - d_func()->m_dataType = attribute->d_func()->m_dataType; - d_func()->m_dataSize = attribute->d_func()->m_dataSize; - d_func()->m_byteStride = attribute->d_func()->m_byteStride; - d_func()->m_attributeType = attribute->d_func()->m_attributeType; -} - -QAbstractBuffer *QAbstractAttribute::buffer() const -{ - Q_D(const QAbstractAttribute); - return d->m_buffer; -} - -QString QAbstractAttribute::name() const -{ - Q_D(const QAbstractAttribute); - return d->m_name; -} - -uint QAbstractAttribute::dataSize() const -{ - Q_D(const QAbstractAttribute); - return d->m_dataSize; -} - -QAbstractAttribute::DataType QAbstractAttribute::dataType() const -{ - Q_D(const QAbstractAttribute); - return d->m_dataType; -} - -uint QAbstractAttribute::count() const -{ - Q_D(const QAbstractAttribute); - return d->m_count; -} - -uint QAbstractAttribute::byteStride() const -{ - Q_D(const QAbstractAttribute); - return d->m_byteStride; -} - -uint QAbstractAttribute::byteOffset() const -{ - Q_D(const QAbstractAttribute); - return d->m_byteOffset; -} - -uint QAbstractAttribute::divisor() const -{ - Q_D(const QAbstractAttribute); - return d->m_divisor; -} - -QAbstractAttribute::AttributeType QAbstractAttribute::attributeType() const -{ - Q_D(const QAbstractAttribute); - return d->m_attributeType; -} - -void QAbstractAttribute::setBuffer(QAbstractBuffer *buffer) -{ - Q_D(QAbstractAttribute); - if (d->m_buffer == buffer) - return; - - // We need to add it as a child of the current node if it has been declared inline - // Or not previously added as a child of the current node so that - // 1) The backend gets notified about it's creation - // 2) When the current node is destroyed, it gets destroyed as well - if (buffer && !buffer->parent()) - buffer->setParent(this); - - d->m_buffer = buffer; - emit bufferChanged(); -} - -void QAbstractAttribute::setName(const QString &name) -{ - Q_D(QAbstractAttribute); - if (d->m_name == name) - return; - - d->m_name = name; - emit nameChanged(); -} - -void QAbstractAttribute::setDataType(DataType type) -{ - Q_D(QAbstractAttribute); - - if (d->m_dataType == type) - return; - - d->m_dataType = type; - emit dataTypeChanged(); -} - -void QAbstractAttribute::setDataSize(uint size) -{ - Q_D(QAbstractAttribute); - if (d->m_dataSize == size) - return; - Q_ASSERT(size >= 1 && size <= 4); - d->m_dataSize = size; - emit dataSizeChanged(); -} - -void QAbstractAttribute::setCount(uint count) -{ - Q_D(QAbstractAttribute); - if (d->m_count == count) - return; - - d->m_count = count; - emit countChanged(); -} - -void QAbstractAttribute::setByteStride(uint byteStride) -{ - Q_D(QAbstractAttribute); - if (d->m_byteStride == byteStride) - return; - - d->m_byteStride = byteStride; - emit byteStrideChanged(); -} - -void QAbstractAttribute::setByteOffset(uint byteOffset) -{ - Q_D(QAbstractAttribute); - if (d->m_byteOffset == byteOffset) - return; - - d->m_byteOffset = byteOffset; - emit byteOffsetChanged(); -} - -void QAbstractAttribute::setDivisor(uint divisor) -{ - Q_D(QAbstractAttribute); - if (d->m_divisor == divisor) - return; - - d->m_divisor = divisor; - emit divisorChanged(); -} - -void QAbstractAttribute::setAttributeType(AttributeType attributeType) -{ - Q_D(QAbstractAttribute); - if (d->m_attributeType == attributeType) - return; - - d->m_attributeType = attributeType; - emit attributeTypeChanged(); -} - -} // Qt3D - -QT_END_NAMESPACE diff --git a/src/core/io/qabstractattribute.h b/src/core/io/qabstractattribute.h deleted file mode 100644 index cf23812d1..000000000 --- a/src/core/io/qabstractattribute.h +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DCORE_QABSTRACTATTRIBUTE_H -#define QT3DCORE_QABSTRACTATTRIBUTE_H - -#include <Qt3DCore/qt3dcore_global.h> -#include <Qt3DCore/QNode> -#include <QtCore/QSharedPointer> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -class QAbstractBuffer; -class QAbstractAttributePrivate; - -typedef QSharedPointer<QAbstractBuffer> QAbstractBufferPtr; - -class QT3DCORESHARED_EXPORT QAbstractAttribute : public QNode -{ - Q_OBJECT - Q_PROPERTY(Qt3DCore::QAbstractBuffer *buffer READ buffer WRITE setBuffer NOTIFY bufferChanged) - Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) - Q_PROPERTY(DataType dataType READ dataType WRITE setDataType NOTIFY dataTypeChanged) - Q_PROPERTY(uint dataSize READ dataSize WRITE setDataSize NOTIFY dataSizeChanged) - Q_PROPERTY(uint count READ count WRITE setCount NOTIFY countChanged) - Q_PROPERTY(uint byteStride READ byteStride WRITE setByteStride NOTIFY byteStrideChanged) - Q_PROPERTY(uint byteOffset READ byteOffset WRITE setByteOffset NOTIFY byteOffsetChanged) - Q_PROPERTY(uint divisor READ divisor WRITE setDivisor NOTIFY divisorChanged) - Q_PROPERTY(AttributeType attributeType READ attributeType WRITE setAttributeType NOTIFY attributeTypeChanged) - -public: - enum AttributeType { - VertexAttribute, - IndexAttribute - }; - - Q_ENUM(AttributeType) - - enum DataType { - Byte = 0, - UnsignedByte, - Short, - UnsignedShort, - Int, - UnsignedInt, - HalfFloat, - Float, - Double - }; - Q_ENUM(DataType) - - explicit QAbstractAttribute(QNode *parent = 0); - ~QAbstractAttribute(); - QAbstractAttribute(QAbstractBuffer *buf, DataType dataType, uint dataSize, uint count, uint offset = 0, uint stride = 0, QNode *parent = 0); - - QAbstractBuffer *buffer() const; - QString name() const; - DataType dataType() const; - uint dataSize() const; - uint count() const; - uint byteStride() const; - uint byteOffset() const; - uint divisor() const; - AttributeType attributeType() const; - - virtual QVector<QVector4D> asVector4D() const = 0; - virtual QVector<QVector3D> asVector3D() const = 0; - virtual QVector<QVector2D> asVector2D() const = 0; - virtual void dump(int count) = 0; - - void setBuffer(QAbstractBuffer *buffer); - void setName(const QString &name); - void setDataType(DataType type); - void setDataSize(uint size); - void setCount(uint count); - void setByteStride(uint byteStride); - void setByteOffset(uint byteOffset); - void setDivisor(uint divisor); - void setAttributeType(AttributeType attributeType); - -Q_SIGNALS: - void bufferChanged(); - void nameChanged(); - void dataTypeChanged(); - void dataSizeChanged(); - void countChanged(); - void byteStrideChanged(); - void byteOffsetChanged(); - void divisorChanged(); - void attributeTypeChanged(); - -protected: - QAbstractAttribute(QAbstractAttributePrivate &dd, QNode *parent = 0); - QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractBuffer *buf, const QString &name, DataType dataType, uint dataSize, uint count, uint offset = 0, uint stride = 0, QNode *parent = 0); - - void copy(const QNode *ref) Q_DECL_OVERRIDE; - -private: - Q_DECLARE_PRIVATE(QAbstractAttribute) -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3DCORE_QABSTRACTATTRIBUTE_H diff --git a/src/core/io/qabstractattribute_p.h b/src/core/io/qabstractattribute_p.h deleted file mode 100644 index 5c203e549..000000000 --- a/src/core/io/qabstractattribute_p.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DCORE_QABSTRACTATTRIBUTE_P_H -#define QT3DCORE_QABSTRACTATTRIBUTE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <Qt3DCore/QAbstractAttribute> -#include <Qt3DCore/QAbstractBuffer> -#include <private/qnode_p.h> -#include <private/qt3dcore_global_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -class QAbstractAttribute; - -class QT3DCORE_PRIVATE_EXPORT QAbstractAttributePrivate : public QNodePrivate -{ -public: - Q_DECLARE_PUBLIC(QAbstractAttribute) - - QAbstractAttributePrivate(); - - QAbstractBuffer *m_buffer; - QString m_name; - QAbstractAttribute::DataType m_dataType; - uint m_dataSize; - uint m_count; - uint m_byteStride; - uint m_byteOffset; - uint m_divisor; - QAbstractAttribute::AttributeType m_attributeType; -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3DCORE_QABSTRACTATTRIBUTE_P_H diff --git a/src/core/io/qabstractbuffer.cpp b/src/core/io/qabstractbuffer.cpp deleted file mode 100644 index d9a9ee845..000000000 --- a/src/core/io/qabstractbuffer.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qabstractbuffer.h" -#include "qabstractbuffer_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -/*! - \class Qt3DCore::QAbstractBufferPrivate - \internal -*/ - -QAbstractBufferPrivate::QAbstractBufferPrivate() - : QNodePrivate() -{ -} - -QAbstractBuffer::QAbstractBuffer(QNode *parent) - : QNode(*new QAbstractBufferPrivate(), parent) -{ -} - -QAbstractBuffer::~QAbstractBuffer() -{ - Q_ASSERT_X(QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DCore::QAbstractBuffer subclass didn't call QNode::cleanup in its destructor"); -} - -/*! \internal */ -QAbstractBuffer::QAbstractBuffer(QAbstractBufferPrivate &dd, QNode *parent) - : QNode(dd, parent) -{ -} - -void QAbstractBuffer::copy(const QNode *ref) -{ - QNode::copy(ref); - const QAbstractBuffer *buffer = static_cast<const QAbstractBuffer *>(ref); - d_func()->m_data = buffer->d_func()->m_data; -} - -void QAbstractBuffer::setData(const QByteArray &bytes) -{ - Q_D(QAbstractBuffer); - if (bytes != d->m_data) { - d->m_data = bytes; - QNodePrivate::get(this)->notifyPropertyChange("data", QVariant::fromValue(d->m_data)); - emit dataChanged(); - } -} - -QByteArray QAbstractBuffer::data() const -{ - Q_D(const QAbstractBuffer); - return d->m_data; -} - -} // Qt3D - -QT_END_NAMESPACE diff --git a/src/core/io/qabstractbuffer.h b/src/core/io/qabstractbuffer.h deleted file mode 100644 index 07723d476..000000000 --- a/src/core/io/qabstractbuffer.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DCORE_QABSTRACTBUFFER_H -#define QT3DCORE_QABSTRACTBUFFER_H - -#include <Qt3DCore/qt3dcore_global.h> -#include <Qt3DCore/QNode> -#include <QtCore/QSharedPointer> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -class QAbstractBufferPrivate; - -class QT3DCORESHARED_EXPORT QAbstractBuffer : public QNode -{ - Q_OBJECT -public: - QAbstractBuffer(QNode *parent = 0); - virtual ~QAbstractBuffer(); - - void setData(const QByteArray &bytes); - QByteArray data() const; - -protected: - QAbstractBuffer(QAbstractBufferPrivate &dd, QNode *parent = 0); - void copy(const QNode *ref) Q_DECL_OVERRIDE; - -Q_SIGNALS: - void dataChanged(); - -private: - Q_DECLARE_PRIVATE(QAbstractBuffer) -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3DCORE_QABSTRACTBUFFER_H diff --git a/src/core/io/qabstractbuffer_p.h b/src/core/io/qabstractbuffer_p.h deleted file mode 100644 index f4e548746..000000000 --- a/src/core/io/qabstractbuffer_p.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DCORE_QABSTRACTBUFFER_P_H -#define QT3DCORE_QABSTRACTBUFFER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <private/qnode_p.h> -#include <private/qt3dcore_global_p.h> - -#include <QByteArray> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -class QAbstractBuffer; - -class QT3DCORE_PRIVATE_EXPORT QAbstractBufferPrivate : public QNodePrivate -{ -public: - Q_DECLARE_PUBLIC(QAbstractBuffer) - - QAbstractBufferPrivate(); - QByteArray m_data; -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3DCORE_QABSTRACTBUFFER_P_H diff --git a/src/core/io/qurlhelper.cpp b/src/core/io/qurlhelper.cpp deleted file mode 100644 index fab671b94..000000000 --- a/src/core/io/qurlhelper.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qurlhelper_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -QString QUrlHelper::urlToLocalFileOrQrc(const QUrl &url) -{ - const QString scheme(url.scheme().toLower()); - if (scheme == QLatin1String("qrc")) { - if (url.authority().isEmpty()) - return QLatin1Char(':') + url.path(); - return QString(); - } - -#if defined(Q_OS_ANDROID) - if (scheme == QLatin1String("assets")) { - if (url.authority().isEmpty()) - return url.toString(); - return QString(); - } -#endif - - return url.toLocalFile(); -} - -} // Qt3D - -QT_END_NAMESPACE diff --git a/src/core/io/qurlhelper_p.h b/src/core/io/qurlhelper_p.h deleted file mode 100644 index 9bc6b5dfe..000000000 --- a/src/core/io/qurlhelper_p.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DCORE_QURLHELPER_P_H -#define QT3DCORE_QURLHELPER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <Qt3DCore/qt3dcore_global.h> -#include <QUrl> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCore { - -class QT3DCORESHARED_EXPORT QUrlHelper -{ -public: - static QString urlToLocalFileOrQrc(const QUrl &url); -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3DCORE_QURLHELPER_P_H |