Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/src/iconmodel.cpp
Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Line(s) | |||||
404 | } | 404 | } | ||
405 | 405 | | |||
406 | void IconModel::output(const QString& text) | 406 | void IconModel::output(const QString& text) | ||
407 | { | 407 | { | ||
408 | cout << text.toLocal8Bit(); | 408 | cout << text.toLocal8Bit(); | ||
409 | cout.flush(); | 409 | cout.flush(); | ||
410 | } | 410 | } | ||
411 | 411 | | |||
412 | QVariantList IconModel::inOtherThemes(const QString& name, int iconSize) | ||||
413 | { | ||||
414 | QVariantList list; | ||||
415 | const QStringList themes = KIconTheme::list(); | ||||
416 | for (const auto& themeName : themes) { | ||||
417 | const KIconTheme theme(themeName); | ||||
418 | const QString iconPath = theme.iconPathByName(name, iconSize, KIconLoader::MatchBest); | ||||
419 | list.append(QVariantMap({{"themeName", themeName}, {"iconPath", iconPath}})); | ||||
420 | } | ||||
421 | return list; | ||||
422 | } |