Albert
|
Albert private namespace. More...
Classes | |
class | DesktopEntryParser |
Desktop entry parser http://standards.freedesktop.org/desktop-entry-spec/latest/. More... | |
class | DynamicItem |
class | Frontend |
The interface for albert frontends. More... | |
class | RateLimiter |
Blocks execution. More... | |
class | TelemetryProvider |
struct | TimeIt |
Functions | |
QPixmap | pixmapFromUrl (const QString &url, const QSize &requestedSize) |
URL based icon factory. | |
QPixmap | pixmapFromUrls (const QStringList &urls, const QSize &requestedSize) |
URL list based icon factory. | |
QIcon | iconFromUrl (const QString &url) |
URL based icon factory. | |
QIcon | iconFromUrls (const QStringList &urls) |
URL list based icon factory. | |
QPixmap | genericPixmap (int size, const QColor &bgcolor={}, const QColor &fgcolor=Qt::black, const QString &text={}, float scalar=1.) |
Generic pixmap factory. | |
QIcon | genericIcon (const QColor &bgcolor={}, const QColor &fgcolor=Qt::black, const QString &text={}, float scalar=1.) |
Generic icon factory. | |
QIcon | fileIcon (const QString &path) |
Create an icon for a file using QFileIconProvider. | |
Albert private namespace.
QIcon albert::detail::fileIcon | ( | const QString & | path | ) |
Create an icon for a file using QFileIconProvider.
path | The path to the file. |
QIcon albert::detail::genericIcon | ( | const QColor & | bgcolor = {} , |
const QColor & | fgcolor = Qt::black , |
||
const QString & | text = {} , |
||
float | scalar = 1. |
||
) |
Generic icon factory.
Supports drawing a background circle with some text on it.
bgcolor | The background color. Default: none. |
fgcolor | The text color. Default: black. |
text | The text to display. Default: empty. |
scalar | Scalar for the default font size which is the pixmap height. Default: 1. |
QPixmap albert::detail::genericPixmap | ( | int | size, |
const QColor & | bgcolor = {} , |
||
const QColor & | fgcolor = Qt::black , |
||
const QString & | text = {} , |
||
float | scalar = 1. |
||
) |
Generic pixmap factory.
Supports drawing a background circle with some text on it.
bgcolor | The background color. Default: none. |
fgcolor | The text color. Default: black. |
text | The text to display. Default: empty. |
scalar | Scalar for the default font size which is the pixmap height. Default: 1. |
QIcon albert::detail::iconFromUrl | ( | const QString & | url | ) |
URL based icon factory.
url | The icon URL. |
QIcon albert::detail::iconFromUrls | ( | const QStringList & | urls | ) |
URL list based icon factory.
See iconFromUrl(const QString &url).
urls | The icon URLs. |
QPixmap albert::detail::pixmapFromUrl | ( | const QString & | url, |
const QSize & | requestedSize | ||
) |
URL based icon factory.
Supported URL schemes:
<path>
orfile:<path>
Use the file at path as icon.:<path>
orqrc:<path>
Use the file at path in the resource collection as icon.qfip:<path>
Uses fileIcon(const QString &path)qsp:<pixmap enumerator>
Get an icon from QStyle::StandardPixmap enum.xdg:<icon name>
Uses xdgIconLookup(const QString &name);gen:<>
Uses genericPixmapFactory. See also QColor::fromString.mask:?src=&radius=
Masks a given icon url.comp:?src1=<>&src2=<>
Composes two given icons.Examples
/absolute/path/to/a/local/image/file.png file:/absolute/path/to/a/local/image/file.png :path-to-a-qresource-file qrc:path-to-a-qresource-file qfip:/path/to/any/file/for/example/a.pdf qsp:SP_TrashIcon xdg:some-themed-icon-name gen:?background=blue&foreground=red&text=Hi&fontscalar=0.5
url | The icon URL. |
requestedSize | The size the pixmap should have if possible. |
QPixmap albert::detail::pixmapFromUrls | ( | const QStringList & | urls, |
const QSize & | requestedSize | ||
) |
URL list based icon factory.
See pixmapFromUrl(const QString &url, QSize *size, const QSize &requestedSize).
urls | The icon URLs. |
requestedSize | The size the pixmap should have if possible. |