QFileIconProvider 类

QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel 类。 更多...

头: #include <QFileIconProvider>
qmake: QT += widgets

公共类型

enum IconType { Computer, Desktop, Trashcan, Network, ..., File }
enum 选项 { DontUseCustomDirectoryIcons }
flags 选项

公共函数

QFileIconProvider ()
virtual ~QFileIconProvider ()
virtual QIcon icon (IconType type ) const
virtual QIcon icon (const QFileInfo & info ) const
选项 options () const
void setOptions (Options options )
virtual QString type (const QFileInfo & info ) const

详细描述

QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel 类。

成员类型文档编制

enum QFileIconProvider:: IconType

常量
QFileIconProvider::Computer 0
QFileIconProvider::Desktop 1
QFileIconProvider::Trashcan 2
QFileIconProvider::Network 3
QFileIconProvider::Drive 4
QFileIconProvider::Folder 5
QFileIconProvider::File 6

enum QFileIconProvider:: 选项
flags QFileIconProvider:: 选项

常量 描述
QFileIconProvider::DontUseCustomDirectoryIcons 0x00000001 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.

该枚举在 Qt 5.2 引入或被修改。

The Options type is a typedef for QFlags <Option>. It stores an OR combination of Option values.

成员函数文档编制

QFileIconProvider:: QFileIconProvider ()

构造文件图标提供程序。

[virtual] QFileIconProvider:: ~QFileIconProvider ()

销毁文件图标提供程序。

[virtual] QIcon QFileIconProvider:: icon ( IconType type ) const

Returns an icon set for the given type .

[virtual] QIcon QFileIconProvider:: icon (const QFileInfo & info ) const

Returns an icon for the file described by info .

选项 QFileIconProvider:: options () const

Returns all the options that affect the icon provider. By default, all options are disabled.

该函数在 Qt 5.2 引入。

另请参阅 setOptions ().

void QFileIconProvider:: setOptions ( 选项 options )

options 影响图标提供程序。

该函数在 Qt 5.2 引入。

另请参阅 options ().

[virtual] QString QFileIconProvider:: type (const QFileInfo & info ) const

返回文件的类型,描述通过 info .