LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::SettableIconProvider Class Reference

QML image provider with settable icons for each path. More...

#include "settableiconprovider.h"

+ Inheritance diagram for LC::Util::SettableIconProvider:
+ Collaboration diagram for LC::Util::SettableIconProvider:

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...
 

Detailed Description

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().

See also
WidthIconProvider

Definition at line 33 of file settableiconprovider.h.

Member Function Documentation

◆ ClearIcon()

void LC::Util::SettableIconProvider::ClearIcon ( const QStringList &  path)

Clears the icon associated with the given path.

Parameters
[in]pathThe path to clear.
See also
SetIcon()
GetIcon()

Definition at line 24 of file settableiconprovider.cpp.

◆ GetIcon()

QIcon LC::Util::SettableIconProvider::GetIcon ( const QStringList &  path)
overridevirtual

Returns the icon for the path previously set with SetIcon().

Parameters
[in]pathThe path for which to return an the icon.
Returns
The icon for the path, or a null icon of no icon is associated with it.
See also
SetIcon()
ClearIcon()

Implements LC::Util::WidthIconProvider.

Definition at line 29 of file settableiconprovider.cpp.

◆ SetIcon()

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.

Parameters
[in]pathThe path associated with the icon.
[in]iconThe icon to associate with the path.
See also
ClearIcon()
GetIcon()

Definition at line 19 of file settableiconprovider.cpp.


The documentation for this class was generated from the following files: