Changeset View
Changeset View
Standalone View
Standalone View
kcms/lookandfeel/kcm.cpp
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 77 | KAboutData* about = new KAboutData(QStringLiteral("kcm_lookandfeel"), i18n("Configure Look and Feel details"), | |||
---|---|---|---|---|---|
78 | QStringLiteral("0.1"), QString(), KAboutLicense::LGPL); | 78 | QStringLiteral("0.1"), QString(), KAboutLicense::LGPL); | ||
79 | about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); | 79 | about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); | ||
80 | setAboutData(about); | 80 | setAboutData(about); | ||
81 | setButtons(Apply | Default); | 81 | setButtons(Apply | Default); | ||
82 | 82 | | |||
83 | m_model = new QStandardItemModel(this); | 83 | m_model = new QStandardItemModel(this); | ||
84 | QHash<int, QByteArray> roles = m_model->roleNames(); | 84 | QHash<int, QByteArray> roles = m_model->roleNames(); | ||
85 | roles[PluginNameRole] = "pluginName"; | 85 | roles[PluginNameRole] = "pluginName"; | ||
86 | roles[DescriptionRole] = "description"; | ||||
86 | roles[ScreenhotRole] = "screenshot"; | 87 | roles[ScreenhotRole] = "screenshot"; | ||
87 | roles[FullScreenPreviewRole] = "fullScreenPreview"; | 88 | roles[FullScreenPreviewRole] = "fullScreenPreview"; | ||
88 | roles[HasSplashRole] = "hasSplash"; | 89 | roles[HasSplashRole] = "hasSplash"; | ||
89 | roles[HasLockScreenRole] = "hasLockScreen"; | 90 | roles[HasLockScreenRole] = "hasLockScreen"; | ||
90 | roles[HasRunCommandRole] = "hasRunCommand"; | 91 | roles[HasRunCommandRole] = "hasRunCommand"; | ||
91 | roles[HasLogoutRole] = "hasLogout"; | 92 | roles[HasLogoutRole] = "hasLogout"; | ||
92 | 93 | | |||
93 | roles[HasColorsRole] = "hasColors"; | 94 | roles[HasColorsRole] = "hasColors"; | ||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | 186 | { | |||
200 | 201 | | |||
201 | const QList<Plasma::Package> pkgs = availablePackages({"defaults", "layouts"}); | 202 | const QList<Plasma::Package> pkgs = availablePackages({"defaults", "layouts"}); | ||
202 | for (const Plasma::Package &pkg : pkgs) { | 203 | for (const Plasma::Package &pkg : pkgs) { | ||
203 | if (!pkg.metadata().isValid()) { | 204 | if (!pkg.metadata().isValid()) { | ||
204 | continue; | 205 | continue; | ||
205 | } | 206 | } | ||
206 | QStandardItem* row = new QStandardItem(pkg.metadata().name()); | 207 | QStandardItem* row = new QStandardItem(pkg.metadata().name()); | ||
207 | row->setData(pkg.metadata().pluginName(), PluginNameRole); | 208 | row->setData(pkg.metadata().pluginName(), PluginNameRole); | ||
209 | row->setData(pkg.metadata().comment(), DescriptionRole); | ||||
208 | row->setData(pkg.filePath("preview"), ScreenhotRole); | 210 | row->setData(pkg.filePath("preview"), ScreenhotRole); | ||
209 | row->setData(pkg.filePath("fullscreenpreview"), FullScreenPreviewRole); | 211 | row->setData(pkg.filePath("fullscreenpreview"), FullScreenPreviewRole); | ||
210 | 212 | | |||
211 | //What the package provides | 213 | //What the package provides | ||
212 | row->setData(!pkg.filePath("splashmainscript").isEmpty(), HasSplashRole); | 214 | row->setData(!pkg.filePath("splashmainscript").isEmpty(), HasSplashRole); | ||
213 | row->setData(!pkg.filePath("lockscreenmainscript").isEmpty(), HasLockScreenRole); | 215 | row->setData(!pkg.filePath("lockscreenmainscript").isEmpty(), HasLockScreenRole); | ||
214 | row->setData(!pkg.filePath("runcommandmainscript").isEmpty(), HasRunCommandRole); | 216 | row->setData(!pkg.filePath("runcommandmainscript").isEmpty(), HasRunCommandRole); | ||
215 | row->setData(!pkg.filePath("logoutmainscript").isEmpty(), HasLogoutRole); | 217 | row->setData(!pkg.filePath("logoutmainscript").isEmpty(), HasLogoutRole); | ||
▲ Show 20 Lines • Show All 602 Lines • Show Last 20 Lines |