Changeset View
Changeset View
Standalone View
Standalone View
kcms/lookandfeel/kcm.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 71 | { | |||
---|---|---|---|---|---|
80 | about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); | 80 | about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); | ||
81 | setAboutData(about); | 81 | setAboutData(about); | ||
82 | setButtons(Apply | Default); | 82 | setButtons(Apply | Default); | ||
83 | 83 | | |||
84 | m_model = new QStandardItemModel(this); | 84 | m_model = new QStandardItemModel(this); | ||
85 | QHash<int, QByteArray> roles = m_model->roleNames(); | 85 | QHash<int, QByteArray> roles = m_model->roleNames(); | ||
86 | roles[PluginNameRole] = "pluginName"; | 86 | roles[PluginNameRole] = "pluginName"; | ||
87 | roles[ScreenhotRole] = "screenshot"; | 87 | roles[ScreenhotRole] = "screenshot"; | ||
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"; | ||
94 | roles[HasWidgetStyleRole] = "hasWidgetStyle"; | 95 | roles[HasWidgetStyleRole] = "hasWidgetStyle"; | ||
95 | roles[HasIconsRole] = "hasIcons"; | 96 | roles[HasIconsRole] = "hasIcons"; | ||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 167 | { | |||
181 | 182 | | |||
182 | const QList<Plasma::Package> pkgs = availablePackages(); | 183 | const QList<Plasma::Package> pkgs = availablePackages(); | ||
183 | for (const Plasma::Package &pkg : pkgs) { | 184 | for (const Plasma::Package &pkg : pkgs) { | ||
184 | if (!pkg.metadata().isValid()) { | 185 | if (!pkg.metadata().isValid()) { | ||
185 | continue; | 186 | continue; | ||
186 | } | 187 | } | ||
187 | QStandardItem* row = new QStandardItem(pkg.metadata().name()); | 188 | QStandardItem* row = new QStandardItem(pkg.metadata().name()); | ||
188 | row->setData(pkg.metadata().pluginName(), PluginNameRole); | 189 | row->setData(pkg.metadata().pluginName(), PluginNameRole); | ||
189 | row->setData(pkg.filePath("previews", QStringLiteral("preview.png")), ScreenhotRole); | 190 | row->setData(pkg.filePath("preview"), ScreenhotRole); | ||
191 | row->setData(pkg.filePath("fullscreenpreview"), FullScreenPreviewRole); | ||||
190 | 192 | | |||
191 | //What the package provides | 193 | //What the package provides | ||
192 | row->setData(!pkg.filePath("splashmainscript").isEmpty(), HasSplashRole); | 194 | row->setData(!pkg.filePath("splashmainscript").isEmpty(), HasSplashRole); | ||
193 | row->setData(!pkg.filePath("lockscreenmainscript").isEmpty(), HasLockScreenRole); | 195 | row->setData(!pkg.filePath("lockscreenmainscript").isEmpty(), HasLockScreenRole); | ||
194 | row->setData(!pkg.filePath("runcommandmainscript").isEmpty(), HasRunCommandRole); | 196 | row->setData(!pkg.filePath("runcommandmainscript").isEmpty(), HasRunCommandRole); | ||
195 | row->setData(!pkg.filePath("logoutmainscript").isEmpty(), HasLogoutRole); | 197 | row->setData(!pkg.filePath("logoutmainscript").isEmpty(), HasLogoutRole); | ||
196 | 198 | | |||
197 | if (!pkg.filePath("defaults").isEmpty()) { | 199 | if (!pkg.filePath("defaults").isEmpty()) { | ||
▲ Show 20 Lines • Show All 520 Lines • Show Last 20 Lines |