Qt 4.8
Public Types | Public Functions | Public Variables | Properties | List of all members
QExtendedInformation Class Reference

#include <qfileinfogatherer_p.h>

Public Types

enum  Type { Dir, File, System }
 

Public Functions

QFileInfo fileInfo () const
 
bool isCaseSensitive () const
 
bool isDir ()
 
bool isFile ()
 
bool isHidden () const
 
bool isSymLink (bool ignoreNtfsSymLinks=false) const
 
bool isSystem ()
 
QDateTime lastModified () const
 
bool operator== (const QExtendedInformation &fileInfo) const
 
QFile::Permissions permissions () const
 
 QExtendedInformation ()
 
 QExtendedInformation (const QFileInfo &info)
 
qint64 size () const
 
Type type () const
 

Public Variables

QString displayType
 
QIcon icon
 

Properties

QFileInfo mFileInfo
 

Detailed Description

Definition at line 70 of file qfileinfogatherer_p.h.

Enumerations

◆ Type

Constructors and Destructors

◆ QExtendedInformation() [1/2]

QExtendedInformation::QExtendedInformation ( )
inline

Definition at line 74 of file qfileinfogatherer_p.h.

74 {}

◆ QExtendedInformation() [2/2]

QExtendedInformation::QExtendedInformation ( const QFileInfo info)
inline

Definition at line 75 of file qfileinfogatherer_p.h.

75 : mFileInfo(info) {}

Functions

◆ fileInfo()

QFileInfo QExtendedInformation::fileInfo ( ) const
inline

Definition at line 125 of file qfileinfogatherer_p.h.

Referenced by QFileSystemModelPrivate::QFileSystemNode::populate(), and QFileSystemModel::setData().

125  {
126  return mFileInfo;
127  }

◆ isCaseSensitive()

bool QExtendedInformation::isCaseSensitive ( ) const
inline

Definition at line 88 of file qfileinfogatherer_p.h.

88  {
90  return fe.caseSensitive();
91  }
QString absoluteFilePath() const
Returns an absolute path including the file name.
Definition: qfileinfo.cpp:534
bool caseSensitive() const
Returns true for Windows, false for Unix.
The QFSFileEngine class implements Qt&#39;s default file engine.
Definition: qfsfileengine.h:60

◆ isDir()

bool QExtendedInformation::isDir ( )
inline

Definition at line 77 of file qfileinfogatherer_p.h.

◆ isFile()

bool QExtendedInformation::isFile ( )
inline

Definition at line 78 of file qfileinfogatherer_p.h.

◆ isHidden()

bool QExtendedInformation::isHidden ( ) const
inline

Definition at line 121 of file qfileinfogatherer_p.h.

121  {
122  return mFileInfo.isHidden();
123  }
bool isHidden() const
Returns true if this is a `hidden&#39; file; otherwise returns false.
Definition: qfileinfo.cpp:951

◆ isSymLink()

bool QExtendedInformation::isSymLink ( bool  ignoreNtfsSymLinks = false) const
inline

Definition at line 111 of file qfileinfogatherer_p.h.

Referenced by QFileInfoGatherer::getInfo().

112  {
113  if (ignoreNtfsSymLinks) {
114 #ifdef Q_WS_WIN
116 #endif
117  }
118  return mFileInfo.isSymLink();
119  }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int compare(const QString &s) const
Definition: qstring.cpp:5037
QString suffix() const
Returns the suffix of the file.
Definition: qfileinfo.cpp:834
bool isSymLink() const
Returns true if this object points to a symbolic link (or to a shortcut on Windows); otherwise return...
Definition: qfileinfo.cpp:1044

◆ isSystem()

bool QExtendedInformation::isSystem ( )
inline

Definition at line 79 of file qfileinfogatherer_p.h.

◆ lastModified()

QDateTime QExtendedInformation::lastModified ( ) const
inline

Definition at line 129 of file qfileinfogatherer_p.h.

129  {
130  return mFileInfo.lastModified();
131  }
QDateTime lastModified() const
Returns the date and time when the file was last modified.
Definition: qfileinfo.cpp:1296

◆ operator==()

bool QExtendedInformation::operator== ( const QExtendedInformation fileInfo) const
inline

Definition at line 81 of file qfileinfogatherer_p.h.

81  {
82  return mFileInfo == fileInfo.mFileInfo
83  && displayType == fileInfo.displayType
84  && permissions() == fileInfo.permissions();
85  }
QFile::Permissions permissions() const

◆ permissions()

QFile::Permissions QExtendedInformation::permissions ( ) const
inline

Definition at line 94 of file qfileinfogatherer_p.h.

Referenced by operator==().

94  {
95  return mFileInfo.permissions();
96  }
QFile::Permissions permissions() const
Returns the complete OR-ed together combination of QFile::Permissions for the file.
Definition: qfileinfo.cpp:1228

◆ size()

qint64 QExtendedInformation::size ( ) const
inline

Definition at line 133 of file qfileinfogatherer_p.h.

Referenced by QFileInfoGatherer::getInfo().

133  {
134  qint64 size = -1;
136  size = 0;
138  size = mFileInfo.size();
139  if (!mFileInfo.exists() && !mFileInfo.isSymLink())
140  size = -1;
141  return size;
142  }
bool exists() const
Returns true if the file exists; otherwise returns false.
Definition: qfileinfo.cpp:675
__int64 qint64
Definition: qglobal.h:942
qint64 size() const
Returns the file size in bytes.
Definition: qfileinfo.cpp:1248
bool isSymLink() const
Returns true if this object points to a symbolic link (or to a shortcut on Windows); otherwise return...
Definition: qfileinfo.cpp:1044

◆ type()

Type QExtendedInformation::type ( ) const
inline

Definition at line 98 of file qfileinfogatherer_p.h.

Referenced by isDir(), isFile(), isSystem(), and size().

98  {
99  if (mFileInfo.isDir()) {
101  }
102  if (mFileInfo.isFile()) {
104  }
105  if (!mFileInfo.exists() && mFileInfo.isSymLink()) {
107  }
109  }
bool exists() const
Returns true if the file exists; otherwise returns false.
Definition: qfileinfo.cpp:675
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise ret...
Definition: qfileinfo.cpp:990
bool isFile() const
Returns true if this object points to a file or to a symbolic link to a file.
Definition: qfileinfo.cpp:971
bool isSymLink() const
Returns true if this object points to a symbolic link (or to a shortcut on Windows); otherwise return...
Definition: qfileinfo.cpp:1044

Properties

◆ displayType

QString QExtendedInformation::displayType

Definition at line 144 of file qfileinfogatherer_p.h.

Referenced by QFileInfoGatherer::getInfo(), and operator==().

◆ icon

QIcon QExtendedInformation::icon

Definition at line 145 of file qfileinfogatherer_p.h.

Referenced by QFileInfoGatherer::getInfo().

◆ mFileInfo

QFileInfo QExtendedInformation::mFileInfo
private

The documentation for this class was generated from the following file: