4#ifndef QQMLPREVIEWFILEENGINE_H
5#define QQMLPREVIEWFILEENGINE_H
20#include <private/qabstractfileengine_p.h>
21#include <private/qfsfileengine_p.h>
22#include <QtCore/qbuffer.h>
34 bool open(QIODevice::OpenMode
flags, std::optional<QFile::Permissions> permissions)
override;
35 bool close()
override;
49 bool flush()
override;
57 bool mkdir(
const QString &dirName,
bool createParentDirectories,
58 std::optional<QFile::Permissions> permissions = std::nullopt)
const override;
59 bool rmdir(
const QString &dirName,
bool recurseParentDirectories)
const override;
68 int handle()
const override;
\inmodule QtCore \reentrant
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.
\inmodule QtCore \reentrant
FileOwner
\value OwnerUser The user who owns the file.
FileTime
These are used by the fileTime() function.
FileName
These values are used to request a file name in a particular format.
\inmodule QtCore \reentrant
\inmodule QtCore\reentrant
bool supportsExtension(Extension extension) const override
bool link(const QString &newName) override
Creates a link from the file currently specified by fileName() to newName.
uint ownerId(FileOwner) const override
If owner is OwnerUser return the ID of the user who owns the file.
bool setPermissions(uint perms) override
Requests that the file's permissions be set to perms.
Iterator * endEntryList() override
bool caseSensitive() const override
Should return true if the underlying file system is case-sensitive; otherwise return false.
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,...
bool seek(qint64) override
Sets the file position to the given offset.
void setFileName(const QString &file) override
Sets the file engine's file name to file.
QDateTime fileTime(FileTime time) const override
If time is BirthTime, return when the file was born (created).
bool mkdir(const QString &dirName, bool createParentDirectories, std::optional< QFile::Permissions > permissions=std::nullopt) const override
Requests that the directory dirName be created with the specified permissions.
Iterator * beginEntryList(QDir::Filters filters, const QStringList &filterNames) override
Returns an instance of a QAbstractFileEngineIterator using filters for entry filtering and filterName...
QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override
Requests that a list of all the files matching the filters list based on the filterNames in the file ...
bool flush() override
Flushes the open file, returning true if successful; otherwise returns false.
qint64 read(char *data, qint64 maxlen) override
Reads a number of characters from the file into data.
qint64 write(const char *data, qint64 len) override
Writes len bytes from data to the file.
bool open(QIODevice::OpenMode flags, std::optional< QFile::Permissions > permissions) override
Opens the file in the specified mode.
qint64 pos() const override
Returns the current file position.
qint64 readLine(char *data, qint64 maxlen) override
This function reads one line, terminated by a '\n' character, from the file info data.
bool syncToDisk() override
bool copy(const QString &newName) override
Copies the contents of this file to a file with the name newName.
bool setSize(qint64 size) override
Requests that the file be set to size size.
bool isRelativePath() const override
Return true if the file referred to by this file engine has a relative path; otherwise return false.
bool rmdir(const QString &dirName, bool recurseParentDirectories) const override
Requests that the directory dirName is deleted from the file system.
QString owner(FileOwner) const override
If owner is OwnerUser return the name of the user who owns the file.
bool renameOverwrite(const QString &newName) override
bool isSequential() const override
Returns true if the file is a sequential access device; returns false if the file is a direct access ...
int handle() const override
Returns the native file handle for this file engine.
bool rename(const QString &newName) override
Requests that the file be renamed to newName in the file system.
qint64 size() const override
Returns the size of the file.
bool remove() override
Requests that the file is deleted from the file system.
bool close() override
Closes the file, returning true if successful; otherwise returns false.
QByteArray id() const override
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QT_BEGIN_NAMESPACE typedef uchar * output
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]