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
qiosfileengineassetslibrary.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#ifndef QIOSFILEENGINEASSETSLIBRARY_H
5#define QIOSFILEENGINEASSETSLIBRARY_H
6
7#include <QtCore/private/qabstractfileengine_p.h>
8
10
12
13class QIOSAssetData;
14
16{
17public:
20
21 bool open(QIODevice::OpenMode openMode, std::optional<QFile::Permissions> permissions) override;
22 bool close() override;
23 FileFlags fileFlags(FileFlags type) const override;
24 qint64 size() const override;
25 qint64 read(char *data, qint64 maxlen) override;
26 qint64 pos() const override;
27 bool seek(qint64 pos) override;
28 QString fileName(FileName file) const override;
29 void setFileName(const QString &file) override;
30
31#ifndef QT_NO_FILESYSTEMITERATOR
33 const QStringList &filterNames) override;
34#endif
35
37
38private:
39 QString m_fileName;
40 QString m_assetUrl;
41 qint64 m_offset;
42 mutable QIOSAssetData *m_data;
43
44 ALAsset *loadAsset() const;
45};
46
48
49#endif // QIOSFILEENGINEASSETSLIBRARY_H
50
\inmodule QtCore \reentrant
void setError(QFile::FileError error, const QString &str)
Sets the error type to error, and the error string to errorString.
std::unique_ptr< Iterator > IteratorUniquePtr
FileName
These values are used to request a file name in a particular format.
QFile::FileError error() const
Returns the QFile::FileError that resulted from the last failed operation.
FileError
This enum describes the errors that may be returned by the error() function.
Definition qfiledevice.h:39
void setError(QFile::FileError error, const QString &str)
bool open(QIODevice::OpenMode openMode, std::optional< QFile::Permissions > permissions) override
Opens the file in the specified mode.
qint64 pos() const override
Returns the current file position.
void setFileName(const QString &file) override
Sets the file engine's file name to file.
IteratorUniquePtr beginEntryList(const QString &path, QDir::Filters filters, const QStringList &filterNames) override
Returns a QAbstractFileEngine::IteratorUniquePtr, that can be used to iterate over the entries in pat...
bool seek(qint64 pos) override
Sets the file position to the given offset.
FileFlags fileFlags(FileFlags type) const override
This function should return the set of OR'd flags that are true for the file engine's file,...
qint64 read(char *data, qint64 maxlen) override
Reads a number of characters from the file into data.
qint64 size() const override
Returns the size of the file.
QIOSFileEngineAssetsLibrary(const QString &fileName)
bool close() override
Closes the file, returning true if successful; otherwise returns false.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString str
[2]
Combined button and popup list for selecting options.
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum type
GLsizei const GLchar *const * path
long long qint64
Definition qtypes.h:60
QFile file
[0]
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]