![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtGui More...
#include <qabstractfileiconprovider.h>
Public Types | |
enum | IconType { Computer , Desktop , Trashcan , Network , Drive , Folder , File } |
\value Computer The icon used for the computing device as a whole \value Desktop The icon for the special "Desktop" directory of the user \value Trashcan The icon for the user's "Trash" place in the desktop's file manager \value Network The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network \value Drive The icon used for disk drives \value Folder The standard folder icon used to represent directories on local filesystems \value File The icon used for generic text file types More... | |
enum | Option { DontUseCustomDirectoryIcons = 0x00000001 } |
\value DontUseCustomDirectoryIcons Always use the default directory icon. More... | |
Public Member Functions | |
QAbstractFileIconProvider () | |
Constructs a file icon provider. | |
virtual | ~QAbstractFileIconProvider () |
Destroys the file icon provider. | |
virtual QIcon | icon (IconType) const |
Returns an icon set for the given type, using the current icon theme. | |
virtual QIcon | icon (const QFileInfo &) const |
Returns an icon for the file described by info, using the current icon theme. | |
virtual QString | type (const QFileInfo &) const |
Returns the type of the file described by info. | |
virtual void | setOptions (Options) |
Sets options that affect the icon provider. | |
virtual Options | options () const |
Returns all the options that affect the icon provider. | |
Protected Member Functions | |
QAbstractFileIconProvider (QAbstractFileIconProviderPrivate &dd) | |
Protected Attributes | |
QScopedPointer< QAbstractFileIconProviderPrivate > | d_ptr |
\inmodule QtGui
The QAbstractFileIconProvider class provides file icons for the QFileSystemModel class.
Definition at line 16 of file qabstractfileiconprovider.h.
\value Computer The icon used for the computing device as a whole \value Desktop The icon for the special "Desktop" directory of the user \value Trashcan The icon for the user's "Trash" place in the desktop's file manager \value Network The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network \value Drive The icon used for disk drives \value Folder The standard folder icon used to represent directories on local filesystems \value File The icon used for generic text file types
Enumerator | |
---|---|
Computer | |
Desktop | |
Trashcan | |
Network | |
Drive | |
Folder | |
File |
Definition at line 19 of file qabstractfileiconprovider.h.
\value DontUseCustomDirectoryIcons Always use the default directory icon.
Some platforms allow the user to set a different icon. Custom icon lookup cause a big performance impact over network or removable drives.
Enumerator | |
---|---|
DontUseCustomDirectoryIcons |
Definition at line 20 of file qabstractfileiconprovider.h.
QAbstractFileIconProvider::QAbstractFileIconProvider | ( | ) |
Constructs a file icon provider.
Definition at line 162 of file qabstractfileiconprovider.cpp.
|
virtualdefault |
Destroys the file icon provider.
|
protected |
Definition at line 170 of file qabstractfileiconprovider.cpp.
Returns an icon for the file described by info, using the current icon theme.
Reimplemented in QFileIconProvider.
Definition at line 225 of file qabstractfileiconprovider.cpp.
Returns an icon set for the given type, using the current icon theme.
Reimplemented in QFileIconProvider.
Definition at line 211 of file qabstractfileiconprovider.cpp.
References d.
Referenced by QFileInfoGatherer::getInfo(), and QFileSystemModelPrivate::QFileSystemNode::updateIcon().
|
virtual |
Returns all the options that affect the icon provider.
By default, all options are disabled.
Definition at line 198 of file qabstractfileiconprovider.cpp.
References d.
Referenced by QFileDialog::setOptions(), and setOptions().
Sets options that affect the icon provider.
Definition at line 186 of file qabstractfileiconprovider.cpp.
Referenced by QFileDialog::setOptions().
Returns the type of the file described by info.
Definition at line 236 of file qabstractfileiconprovider.cpp.
References QFileInfo::absoluteFilePath(), d, info, QFileInfo::isDir(), QFileInfo::isFile(), QFileSystemEntry::isRootPath(), QFileInfo::isSymLink(), mimeType, Q_UNUSED, and QCoreApplication::translate().
Referenced by QFileInfoGatherer::getInfo(), and QFileSystemModelPrivate::QFileSystemNode::retranslateStrings().
|
protected |
Definition at line 37 of file qabstractfileiconprovider.h.