QAbstractFileIconProvider Class

Die Klasse QAbstractFileIconProvider stellt Dateisymbole für die Klasse QFileSystemModel bereit. Mehr...

Kopfzeile: #include <QAbstractFileIconProvider>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Seit: Qt 6.0
Vererbt von:

QFileIconProvider

Öffentliche Typen

enum IconType { Computer, Desktop, Trashcan, Network, Drive, …, File }
enum Option { DontUseCustomDirectoryIcons }
flags Options

Öffentliche Funktionen

QAbstractFileIconProvider()
virtual ~QAbstractFileIconProvider()
virtual QIcon icon(QAbstractFileIconProvider::IconType type) const
virtual QIcon icon(const QFileInfo &info) const
virtual QAbstractFileIconProvider::Options options() const
virtual void setOptions(QAbstractFileIconProvider::Options options)
virtual QString type(const QFileInfo &info) const

Detaillierte Beschreibung

Dokumentation der Mitgliedstypen

enum QAbstractFileIconProvider::IconType

KonstanteWertBeschreibung
QAbstractFileIconProvider::Computer0Das für das gesamte Computergerät verwendete Symbol
QAbstractFileIconProvider::Desktop1Das Icon für das spezielle "Desktop"-Verzeichnis des Benutzers
QAbstractFileIconProvider::Trashcan2Das Symbol für den "Papierkorb" des Benutzers im Dateimanager des Desktops
QAbstractFileIconProvider::Network3Das Symbol für den Ort "Netzwerkserver" im Dateimanager des Desktops und für Arbeitsgruppen im Netzwerk
QAbstractFileIconProvider::Drive4Das Symbol für Festplattenlaufwerke
QAbstractFileIconProvider::Folder5Das Standard-Ordnersymbol für Verzeichnisse in lokalen Dateisystemen
QAbstractFileIconProvider::File6Das Symbol für generische Textdateiformate

enum QAbstractFileIconProvider::Option
flags QAbstractFileIconProvider::Options

KonstanteWertBeschreibung
QAbstractFileIconProvider::DontUseCustomDirectoryIcons0x00000001Verwendet immer das Standardverzeichnissymbol. Einige Plattformen erlauben es dem Benutzer, ein anderes Symbol zu setzen. Benutzerdefinierte Icon-Suche verursacht einen großen Performance-Einfluss über Netzwerk- oder Wechsellaufwerke.

Der Typ Options ist ein Typedef für QFlags<Option>. Er speichert eine ODER-Kombination von Optionswerten.

Dokumentation der Mitgliedsfunktionen

QAbstractFileIconProvider::QAbstractFileIconProvider()

Konstruiert einen Anbieter von Dateisymbolen.

[virtual noexcept] QAbstractFileIconProvider::~QAbstractFileIconProvider()

Zerstört den Dateisymbolanbieter.

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

Gibt einen Icon-Satz für das angegebene type zurück, wobei das aktuelle Icon-Thema verwendet wird.

Siehe auch QIcon::fromTheme.

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

Gibt ein Symbol für die durch info beschriebene Datei zurück, wobei das aktuelle Symbolthema verwendet wird.

Siehe auch QIcon::fromTheme.

[virtual] QAbstractFileIconProvider::Options QAbstractFileIconProvider::options() const

Gibt alle Optionen zurück, die den Symbolanbieter betreffen. Standardmäßig sind alle Optionen deaktiviert.

Siehe auch setOptions().

[virtual] void QAbstractFileIconProvider::setOptions(QAbstractFileIconProvider::Options options)

Legt options fest, die sich auf den Symbolanbieter auswirken.

Siehe auch options().

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

Gibt den Typ der Datei zurück, die durch info beschrieben wird.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.