LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
QML image provider with settable icons for each path. More...
#include "settableiconprovider.h"
Public Member Functions | |
void | SetIcon (const QStringList &path, const QIcon &icon) |
Sets the icon for the given path. More... | |
void | ClearIcon (const QStringList &path) |
Clears the icon associated with the given path. More... | |
QIcon | GetIcon (const QStringList &path) override |
Returns the icon for the path previously set with SetIcon(). More... | |
Public Member Functions inherited from LC::Util::WidthIconProvider | |
WidthIconProvider () | |
QPixmap | requestPixmap (const QString &id, QSize *size, const QSize &requestedSize) |
Reimplemented from QDeclarativeImageProvider::requestPixmap(). More... | |
QML image provider with settable icons for each path.
This class implements a QML image provider that provides preset icons for given paths. The icons are set via SetIcon() and ClearIcon().
Definition at line 33 of file settableiconprovider.h.
void LC::Util::SettableIconProvider::ClearIcon | ( | const QStringList & | path | ) |
Clears the icon associated with the given path.
[in] | path | The path to clear. |
Definition at line 24 of file settableiconprovider.cpp.
|
overridevirtual |
Returns the icon for the path previously set with SetIcon().
[in] | path | The path for which to return an the icon. |
Implements LC::Util::WidthIconProvider.
Definition at line 29 of file settableiconprovider.cpp.
void LC::Util::SettableIconProvider::SetIcon | ( | const QStringList & | path, |
const QIcon & | icon | ||
) |
Sets the icon for the given path.
If there is already an icon for this path, it is replaced by the new icon.
The icon set with this function is available for this path via the GetIcon() method.
[in] | path | The path associated with the icon. |
[in] | icon | The icon to associate with the path. |
Definition at line 19 of file settableiconprovider.cpp.