GrantleeTheme
icon.cpp
25 static QHash<QString, int> sizeOrGroupLookup = {{QStringLiteral("toolbar"), KIconLoader::Toolbar},
39 throw KTextTemplate::Exception(KTextTemplate::TagSyntaxError, QStringLiteral("icon tag takes at least 1 argument"));
42 throw KTextTemplate::Exception(KTextTemplate::TagSyntaxError, QStringLiteral("icon tag takes at maximum 3 arguments, %1 given").arg(partsSize));
75IconNode::IconNode(const QString &iconName, int sizeOrGroup, const QString &altText, QObject *parent)
116 QString iconPath = KIconLoader::global()->iconPath(iconName, mSizeOrGroup < KIconLoader::LastGroup ? mSizeOrGroup : -mSizeOrGroup);
124 QStringLiteral("<img src=\"%1\" align=\"top\" height=\"%2\" width=\"%2\" alt=\"%3\" title=\"%4\" />")
126 .arg(mSizeOrGroup < KIconLoader::LastGroup ? KIconLoader::global()->currentSize(static_cast<KIconLoader::Group>(mSizeOrGroup)) : mSizeOrGroup)
127 .arg(altText.isEmpty() ? iconName : altText, altText); // title is intentionally blank if no alt is provided
Group
Small
LastGroup
MainToolbar
Toolbar
Dialog
SizeHuge
SizeMedium
SizeEnormous
SizeSmallMedium
SizeSmall
SizeLarge
static KIconLoader * global()
QString iconPath(const QString &name, int group_or_size, bool canReturnNull, qreal scale) const
Q_INVOKABLE QStringList smartSplit(const QString &str) const
QVariant resolve(Context *c) const
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
KGuiItem ok()
const_iterator cend() const const
const_iterator constFind(const Key &key) const const
const_reference at(qsizetype i) const const
qsizetype size() const const
QString
int id() const const
QString arg(Args &&... args) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString mid(qsizetype position, qsizetype n) const const
qsizetype size() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
int toInt(bool *ok, int base) const const
bool canConvert() const const
bool isValid() const const
QMetaType metaType() const const
QString toString() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:10:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:10:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.