diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-10 17:15:03 +0200 |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-10 17:39:20 +0200 |
commit | 13a31fe82845f8b1f4d86919080d3b2a87c4d061 (patch) | |
tree | 6ec3b5c3bc0811abca5fc84d1aa094be30d4e8c4 /src/gui/image/qicon.h | |
parent | 35ef002453cbe9841e23a7d33064a51dbe99fb06 (diff) | |
download | qt4-tools-13a31fe82845f8b1f4d86919080d3b2a87c4d061.tar.gz |
Introducing icon theme support
Added some static functions to QIcon to support desktop
themes based on the freedesktop spec. It is not intended to
replace KIcon and the intention is to use it when available to
share icon cache between applications.
Applications currently using icon themes are Assistant, Designer
and the textedit demo.
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/image/qicon.h')
-rw-r--r-- | src/gui/image/qicon.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h index c318e14ffc..2a717179be 100644 --- a/src/gui/image/qicon.h +++ b/src/gui/image/qicon.h @@ -97,6 +97,16 @@ public: QList<QSize> availableSizes(Mode mode = Normal, State state = Off) const; + static QIcon fromTheme(const QString &name, const QIcon &fallback = QIcon()); + static bool hasThemeIcon(const QString &name); + + static QStringList themeSearchPaths(); + static void setThemeSearchPaths(const QStringList &searchpath); + + static QString themeName(); + static void setThemeName(const QString &path); + + #ifdef QT3_SUPPORT enum Size { Small, Large, Automatic = Small }; static QT3_SUPPORT void setPixmapSize(Size which, const QSize &size); |