diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-07-27 11:57:46 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-08-04 14:31:15 +0000 |
commit | 40bb2d29b92c28c662a94b77a8170567aba087ab (patch) | |
tree | 8bf2ae8ceed43013b04b9d59682b2d80f142d0b7 /src/gui/kernel/qplatformtheme.h | |
parent | 2079081dcf6968690d0c8c50c46531c31989ffd4 (diff) |
Add QPlatformTheme::fileIcon()
Add a way to return an icon instead of a pixmap of a specific size for a
file for usage by QFileIconProvider, etc.
Fall back to fileIconPixmap() if fileIcon() returns a null icon.
This allows for supporting XDG theme icons and Qt Quick applications
accessing file icons.
Change-Id: I9ffbd6602e1a6a490c0046d950636447c5127474
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel/qplatformtheme.h')
-rw-r--r-- | src/gui/kernel/qplatformtheme.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index b16fdd7939..c04ebd2190 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -55,6 +55,7 @@ QT_BEGIN_NAMESPACE +class QIcon; class QIconEngine; class QMenu; class QMenuBar; @@ -301,6 +302,8 @@ public: virtual QVariant themeHint(ThemeHint hint) const; virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const; + virtual QIcon fileIcon(const QFileInfo &fileInfo, + QPlatformTheme::IconOptions iconOptions = 0) const; virtual QPixmap fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &size, QPlatformTheme::IconOptions iconOptions = 0) const; |