Albert
Loading...
Searching...
No Matches
iconprovider.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <QIcon>
6#include <QPixmap>
7#include <QSize>
8#include <QStringList>
9#include <albert/export.h>
10
11namespace albert{
12
47QPixmap ALBERT_EXPORT pixmapFromUrl(const QString &url, const QSize &requestedSize);
48
58QPixmap ALBERT_EXPORT pixmapFromUrls(const QStringList &urls, const QSize &requestedSize);
59
68QIcon ALBERT_EXPORT iconFromUrl(const QString &url);
69
78QIcon ALBERT_EXPORT iconFromUrls(const QStringList &urls);
79
91QPixmap ALBERT_EXPORT genericPixmap(int size, const QColor& bgcolor = {}, const QColor& fgcolor = Qt::black, const QString& text = {}, float scalar = 1.);
92
104QIcon ALBERT_EXPORT genericIcon(int size, const QColor& bgcolor = {}, const QColor& fgcolor = Qt::black, const QString& text = {}, float scalar = 1.);
105
114QIcon ALBERT_EXPORT fileIcon(const QString &path);
115
126#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
127QString ALBERT_EXPORT xdgIconLookup(const QString &name);
128#endif
129
130}
131
Definition action.h:10
QIcon iconFromUrls(const QStringList &urls)
URL list based icon factory.
QIcon iconFromUrl(const QString &url)
URL based icon factory.
QIcon fileIcon(const QString &path)
Create an icon for a file using QFileIconProvider.
QIcon genericIcon(int size, const QColor &bgcolor={}, const QColor &fgcolor=Qt::black, const QString &text={}, float scalar=1.)
Generic icon factory.
QPixmap pixmapFromUrl(const QString &url, const QSize &requestedSize)
URL based icon factory.
QPixmap genericPixmap(int size, const QColor &bgcolor={}, const QColor &fgcolor=Qt::black, const QString &text={}, float scalar=1.)
Generic pixmap factory.
QPixmap pixmapFromUrls(const QStringList &urls, const QSize &requestedSize)
URL list based icon factory.