19 setObjectName(m_group->entryPath());
20 setData(QStringLiteral(
"isApp"),
false);
30 setObjectName(m_app->storageId());
31 setData(QStringLiteral(
"isApp"),
true);
35AppSource::~AppSource()
49bool AppSource::isApp()
const
54void AppSource::updateGroup()
56 setData(QStringLiteral(
"iconName"), m_group->icon());
57 setData(QStringLiteral(
"name"), m_group->caption());
58 setData(QStringLiteral(
"comment"), m_group->comment());
59 setData(QStringLiteral(
"display"), !m_group->noDisplay());
62 const auto groupEntries = m_group->entries(
true,
false,
true);
64 if (p->isType(KST_KService)) {
66 entries << service->storageId();
67 }
else if (p->isType(KST_KServiceGroup)) {
69 entries << serviceGroup->entryPath();
70 }
else if (p->isType(KST_KServiceSeparator)) {
71 entries << QStringLiteral(
"---");
73 qDebug() <<
"unexpected object in entry list";
76 setData(QStringLiteral(
"entries"), entries);
81void AppSource::updateApp()
83 setData(QStringLiteral(
"iconName"), m_app->icon());
84 setData(QStringLiteral(
"name"), m_app->name());
85 setData(QStringLiteral(
"genericName"), m_app->genericName());
86 setData(QStringLiteral(
"menuId"), m_app->menuId());
87 setData(QStringLiteral(
"entryPath"), m_app->entryPath());
88 setData(QStringLiteral(
"comment"), m_app->comment());
89 setData(QStringLiteral(
"keywords"), m_app->keywords());
90 setData(QStringLiteral(
"categories"), m_app->categories());
91 setData(QStringLiteral(
"display"), !m_app->noDisplay());
void setData(const QString &key, const QVariant &value)
Set a value for a key.
void checkForUpdate()
Checks whether any data has changed and, if so, emits dataUpdated().
This class provides a generic API for write access to settings or services.
Namespace for everything in libplasma.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.