4#ifndef QFILESYSTEMMODEL_P_H
5#define QFILESYSTEMMODEL_P_H
18#include <QtGui/private/qtguiglobal_p.h>
21#include <private/qabstractitemmodel_p.h>
37class ExtendedInformation;
101 if (children.size() > 0)
150 return visibleChildren.indexOf(childName);
157 if (!
path.isEmpty()) {
158 if (
path.endsWith(u
'/'))
163 child->updateIcon(iconProvider,
child->fileName);
172 if (!
path.isEmpty()) {
173 if (
path.endsWith(u
'/'))
176 child->retranslateStrings(iconProvider,
path + u
'/' +
child->fileName);
178 child->retranslateStrings(iconProvider,
child->fileName);
186 int dirtyChildrenIndex = -1;
187 bool populatedChildren =
false;
201 return (indexNode != &root && !
index.isValid());
204 QFileSystemNode *node(
const QString &
path,
bool fetch =
true)
const;
207 bool filtersAcceptsNode(
const QFileSystemNode *node)
const;
208 bool passNameFilters(
const QFileSystemNode *node)
const;
209 void removeNode(QFileSystemNode *parentNode,
const QString &
name);
211 void addVisibleFiles(QFileSystemNode *parentNode,
const QStringList &newFiles);
212 void removeVisibleFile(QFileSystemNode *parentNode,
int visibleLocation);
217 if (
parent->dirtyChildrenIndex == -1)
218 return parent->visibleChildren.size() -
row - 1;
220 if (row < parent->dirtyChildrenIndex)
221 return parent->dirtyChildrenIndex -
row - 1;
233 return QFileSystemModel::tr(
"My Computer");
235 return QFileSystemModel::tr(
"Computer");
240 if (!delayedSortTimer.isActive())
241 delayedSortTimer.start(0);
254 void _q_performDelayedSort();
259#if QT_CONFIG(filesystemwatcher)
268#if QT_CONFIG(regularexpression)
270 std::vector<QRegularExpression> nameFiltersRegexps;
271 void rebuildNameFilterRegexps();
289 bool forceSort =
true;
290 bool readOnly =
true;
291 bool setRootPath =
false;
292 bool nameFilterDisables =
true;
295 bool disableRecursiveSort =
false;
virtual QIcon icon(IconType) const
Returns an icon set for the given type, using the current icon theme.
virtual QString type(const QFileInfo &) const
Returns the type of the file described by info.
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
QDateTime lastModified() const
Returns the date and time when the file was last modified.
bool isSymLink() const
Returns true if this object points to a symbolic link, shortcut, or alias; otherwise returns false.
bool isFile() const
Returns true if this object points to a file or to a symbolic link to a file.
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory.
qint64 size() const
Returns the file size in bytes.
bool isHidden() const
Returns true if this is a ‘hidden’ file; otherwise returns false.
QFile::Permissions permissions() const
Returns the complete OR-ed together combination of QFile::Permissions for the file.
void populate(const QExtendedInformation &fileInfo)
void updateIcon(QAbstractFileIconProvider *iconProvider, const QString &path)
bool hasInformation() const
QFileInfo fileInfo() const
QFile::Permissions permissions() const
QDateTime lastModified(const QTimeZone &tz) const
QHash< QFileSystemModelNodePathKey, QFileSystemNode * > children
QList< QString > visibleChildren
bool isSymLink(bool ignoreNtfsSymLinks=false) const
int visibleLocation(const QString &childName)
bool isExecutable() const
bool caseSensitive() const
void retranslateStrings(QAbstractFileIconProvider *iconProvider, const QString &path)
QHash< const QFileSystemNode *, bool > bypassFilters
QHash< QString, QString > resolvedSymLinks
QModelIndex index(const QString &path, int column=0)
bool isHiddenByFilter(QFileSystemNode *indexNode, const QModelIndex &index) const
QList< Fetching > toFetch
QFileSystemModelPrivate()
QBasicTimer fetchingTimer
int translateVisibleLocation(QFileSystemNode *parent, int row) const
static QString myComputer()
~QFileSystemModelPrivate()
The QFileSystemModel class provides a data model for the local filesystem.
The QIcon class provides scalable icons in different modes and states.
\macro QT_RESTRICTED_CAST_FROM_ASCII
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
qDeleteAll(list.begin(), list.end())
Combined button and popup list for selecting options.
static QString displayName(CGDirectDisplayID displayID)
std::pair< T1, T2 > QPair
constexpr bool operator!=(const timespec &t1, const timespec &t2)
QString QFileSystemModelNodePathKey
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLuint * paths
GLenum GLenum GLsizei void GLsizei void * column
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * row
bool operator>(const QPoint &a, const QPoint &b)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
#define QT_REQUIRE_CONFIG(feature)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
static int compare(quint64 a, quint64 b)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
QFileInfo info(fileName)
[8]
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
const QFileSystemNode * node
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent