#include <albert/icon.h>
|
virtual | ~Icon ()=default |
| Destructs the icon.
|
|
virtual std::unique_ptr< Icon > | clone () const =0 |
| Returns a clone of this icon.
|
|
virtual QSize | actualSize (const QSize &device_independent_size, double device_pixel_ratio) |
| Returns the device independent size of the icon available for the given device_independent_size and device_pixel_ratio.
|
|
virtual QPixmap | pixmap (const QSize &device_independent_size, double device_pixel_ratio) |
| Returns a pixmap for the requested device_independent_size and device_pixel_ratio.
|
|
virtual void | paint (QPainter *painter, const QRect &rect)=0 |
| Uses the given painter to paint the icon into the rectangle rect.
|
|
virtual bool | isNull () |
| Returns true if the icon is valid; otherwise returns false .
|
|
virtual QString | toUrl () const =0 |
| Returns a URL representation of the icon.
|
|
virtual QString | cacheKey () |
| Returns the cache key of the icon.
|
|
◆ ~Icon()
virtual albert::Icon::~Icon |
( |
| ) |
|
|
virtualdefault |
◆ actualSize()
virtual QSize albert::Icon::actualSize |
( |
const QSize & |
device_independent_size, |
|
|
double |
device_pixel_ratio |
|
) |
| |
|
virtual |
Returns the device independent size of the icon available for the given device_independent_size and device_pixel_ratio.
The base implementations returns device_independent_size.
◆ cacheKey()
virtual QString albert::Icon::cacheKey |
( |
| ) |
|
|
virtual |
Returns the cache key of the icon.
The base implementation calls toUrl. Reimplement to get faster lookups.
◆ clone()
virtual std::unique_ptr< Icon > albert::Icon::clone |
( |
| ) |
const |
|
pure virtual |
Returns a clone of this icon.
◆ isNull()
virtual bool albert::Icon::isNull |
( |
| ) |
|
|
virtual |
Returns true
if the icon is valid; otherwise returns false
.
The base implementation returns false
.
◆ paint()
virtual void albert::Icon::paint |
( |
QPainter * |
painter, |
|
|
const QRect & |
rect |
|
) |
| |
|
pure virtual |
Uses the given painter to paint the icon into the rectangle rect.
◆ pixmap()
virtual QPixmap albert::Icon::pixmap |
( |
const QSize & |
device_independent_size, |
|
|
double |
device_pixel_ratio |
|
) |
| |
|
virtual |
Returns a pixmap for the requested device_independent_size and device_pixel_ratio.
The base implementation creates a transparent pixmap of actualSize and calls paint on it.
◆ toUrl()
virtual QString albert::Icon::toUrl |
( |
| ) |
const |
|
pure virtual |
Returns a URL representation of the icon.
The documentation for this class was generated from the following file:
- workspace/albert/include/albert/icon.h