![]() |
LeechCraft
0.6.70-10870-g558588d6ec
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... | |
![]() | |
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 50 of file settableiconprovider.h.
void LeechCraft::Util::SettableIconProvider::ClearIcon | ( | const QStringList & | path | ) |
Clears the icon associated with the given path.
[in] | path | The path to clear. |
Definition at line 46 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 LeechCraft::Util::WidthIconProvider.
Definition at line 51 of file settableiconprovider.cpp.
void LeechCraft::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 41 of file settableiconprovider.cpp.