Changeset View
Changeset View
Standalone View
Standalone View
tests/plasmasurfacetest.cpp
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Line(s) | |||||
167 | 167 | | |||
168 | int main(int argc, char **argv) | 168 | int main(int argc, char **argv) | ||
169 | { | 169 | { | ||
170 | QCoreApplication app(argc, argv); | 170 | QCoreApplication app(argc, argv); | ||
171 | QCommandLineParser parser; | 171 | QCommandLineParser parser; | ||
172 | parser.addHelpOption(); | 172 | parser.addHelpOption(); | ||
173 | QCommandLineOption notificationOption(QStringLiteral("notification")); | 173 | QCommandLineOption notificationOption(QStringLiteral("notification")); | ||
174 | parser.addOption(notificationOption); | 174 | parser.addOption(notificationOption); | ||
175 | QCommandLineOption criticalNotificationOption(QStringLiteral("criticalNotification")); | ||||
176 | parser.addOption(criticalNotificationOption); | ||||
175 | QCommandLineOption panelOption(QStringLiteral("panel")); | 177 | QCommandLineOption panelOption(QStringLiteral("panel")); | ||
176 | parser.addOption(panelOption); | 178 | parser.addOption(panelOption); | ||
177 | QCommandLineOption desktopOption(QStringLiteral("desktop")); | 179 | QCommandLineOption desktopOption(QStringLiteral("desktop")); | ||
178 | parser.addOption(desktopOption); | 180 | parser.addOption(desktopOption); | ||
179 | QCommandLineOption osdOption(QStringLiteral("osd")); | 181 | QCommandLineOption osdOption(QStringLiteral("osd")); | ||
180 | parser.addOption(osdOption); | 182 | parser.addOption(osdOption); | ||
181 | QCommandLineOption tooltipOption(QStringLiteral("tooltip")); | 183 | QCommandLineOption tooltipOption(QStringLiteral("tooltip")); | ||
182 | parser.addOption(tooltipOption); | 184 | parser.addOption(tooltipOption); | ||
183 | QCommandLineOption skipTaskbarOption(QStringLiteral("skipTaskbar")); | 185 | QCommandLineOption skipTaskbarOption(QStringLiteral("skipTaskbar")); | ||
184 | parser.addOption(skipTaskbarOption); | 186 | parser.addOption(skipTaskbarOption); | ||
185 | parser.process(app); | 187 | parser.process(app); | ||
186 | QCommandLineOption skipSwitcherOption(QStringLiteral("skipSwitcher")); | 188 | QCommandLineOption skipSwitcherOption(QStringLiteral("skipSwitcher")); | ||
187 | parser.addOption(skipSwitcherOption); | 189 | parser.addOption(skipSwitcherOption); | ||
188 | parser.process(app); | 190 | parser.process(app); | ||
189 | 191 | | |||
190 | PlasmaSurfaceTest client; | 192 | PlasmaSurfaceTest client; | ||
191 | 193 | | |||
192 | if (parser.isSet(notificationOption)) { | 194 | if (parser.isSet(notificationOption)) { | ||
193 | client.setRole(PlasmaShellSurface::Role::Notification); | 195 | client.setRole(PlasmaShellSurface::Role::Notification); | ||
196 | } else if (parser.isSet(criticalNotificationOption)) { | ||||
197 | client.setRole(PlasmaShellSurface::Role::CriticalNotification); | ||||
194 | } else if (parser.isSet(panelOption)) { | 198 | } else if (parser.isSet(panelOption)) { | ||
195 | client.setRole(PlasmaShellSurface::Role::Panel); | 199 | client.setRole(PlasmaShellSurface::Role::Panel); | ||
196 | } else if (parser.isSet(desktopOption)) { | 200 | } else if (parser.isSet(desktopOption)) { | ||
197 | client.setRole(PlasmaShellSurface::Role::Desktop); | 201 | client.setRole(PlasmaShellSurface::Role::Desktop); | ||
198 | } else if (parser.isSet(osdOption)) { | 202 | } else if (parser.isSet(osdOption)) { | ||
199 | client.setRole(PlasmaShellSurface::Role::OnScreenDisplay); | 203 | client.setRole(PlasmaShellSurface::Role::OnScreenDisplay); | ||
200 | } else if (parser.isSet(tooltipOption)) { | 204 | } else if (parser.isSet(tooltipOption)) { | ||
201 | client.setRole(PlasmaShellSurface::Role::ToolTip); | 205 | client.setRole(PlasmaShellSurface::Role::ToolTip); | ||
Show All 10 Lines |