Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgtexturereader.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5#include <private/qtexturefilereader_p.h>
6
7#include <private/qsgcompressedtexture_p.h>
8
10
15
17{
18 delete m_reader;
19}
20
22{
23 if (!m_reader)
24 return nullptr;
25
26 QTextureFileData texData = m_reader->read();
27 if (!texData.isValid())
28 return nullptr;
29
30 return new QSGCompressedTextureFactory(texData);
31}
32
34{
35 return m_reader ? m_reader->canRead() : false;
36}
37
42
IOBluetoothDevice * device
\inmodule QtCore \reentrant
Definition qiodevice.h:34
The QQuickTextureFactory class provides an interface for loading custom textures from QML....
QQuickTextureFactory * read()
QSGTextureReader(QIODevice *device, const QString &fileName=QString())
static QList< QByteArray > supportedFileFormats()
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QTextureFileData read()
static QList< QByteArray > supportedFileFormats()
Combined button and popup list for selecting options.