Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QFileIconProvider Class Reference

\inmodule QtWidgets More...

#include <qfileiconprovider.h>

+ Inheritance diagram for QFileIconProvider:
+ Collaboration diagram for QFileIconProvider:

Public Member Functions

 QFileIconProvider ()
 Constructs a file icon provider.
 
 ~QFileIconProvider ()
 Destroys the file icon provider.
 
QIcon icon (IconType type) const override
 \reimp
 
QIcon icon (const QFileInfo &info) const override
 \reimp
 
- Public Member Functions inherited from QAbstractFileIconProvider
 QAbstractFileIconProvider ()
 Constructs a file icon provider.
 
virtual ~QAbstractFileIconProvider ()
 Destroys the file icon provider.
 
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.
 

Additional Inherited Members

- Public Types inherited from QAbstractFileIconProvider
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...
 
- Protected Member Functions inherited from QAbstractFileIconProvider
 QAbstractFileIconProvider (QAbstractFileIconProviderPrivate &dd)
 
- Protected Attributes inherited from QAbstractFileIconProvider
QScopedPointer< QAbstractFileIconProviderPrivated_ptr
 

Detailed Description

\inmodule QtWidgets

The QFileIconProvider class provides file icons for the QFileSystemModel class.

Definition at line 18 of file qfileiconprovider.h.

Constructor & Destructor Documentation

◆ QFileIconProvider()

QFileIconProvider::QFileIconProvider ( )

Constructs a file icon provider.

Definition at line 100 of file qfileiconprovider.cpp.

◆ ~QFileIconProvider()

QFileIconProvider::~QFileIconProvider ( )
default

Destroys the file icon provider.

Member Function Documentation

◆ icon() [1/2]

QIcon QFileIconProvider::icon ( const QFileInfo & info) const
overridevirtual

\reimp

Reimplemented from QAbstractFileIconProvider.

Definition at line 148 of file qfileiconprovider.cpp.

References d, info, QFileSystemEntry::isRootPath(), QStyle::SP_DirHomeIcon, QStyle::SP_DirIcon, QStyle::SP_DirLinkIcon, QStyle::SP_DriveCDIcon, QStyle::SP_DriveFDIcon, QStyle::SP_DriveHDIcon, QStyle::SP_DriveNetIcon, QStyle::SP_FileIcon, and QStyle::SP_FileLinkIcon.

+ Here is the call graph for this function:

◆ icon() [2/2]


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