Changeset View
Changeset View
Standalone View
Standalone View
tests/osd/main.cpp
Context not available. | |||||
33 | QStringLiteral("Icon to use for OSD"), QStringLiteral("preferences-desktop-display-randr")); | 33 | QStringLiteral("Icon to use for OSD"), QStringLiteral("preferences-desktop-display-randr")); | ||
---|---|---|---|---|---|
34 | QCommandLineOption message = QCommandLineOption(QStringList() << QStringLiteral("m") << "message", | 34 | QCommandLineOption message = QCommandLineOption(QStringList() << QStringLiteral("m") << "message", | ||
35 | QStringLiteral("Icon to use for OSD"), QStringLiteral("OSD Test")); | 35 | QStringLiteral("Icon to use for OSD"), QStringLiteral("OSD Test")); | ||
36 | QCommandLineOption selector = QCommandLineOption({ QStringLiteral("s"), QStringLiteral("selector") }, | ||||
37 | QStringLiteral("Show new screen action selector")); | ||||
36 | KScreen::OsdTest osdtest; | 38 | KScreen::OsdTest osdtest; | ||
37 | QCommandLineParser parser; | 39 | QCommandLineParser parser; | ||
38 | parser.addHelpOption(); | 40 | parser.addHelpOption(); | ||
Context not available. | |||||
40 | parser.addOption(outputid); | 42 | parser.addOption(outputid); | ||
41 | parser.addOption(icon); | 43 | parser.addOption(icon); | ||
42 | parser.addOption(message); | 44 | parser.addOption(message); | ||
45 | parser.addOption(selector); | ||||
43 | parser.process(app); | 46 | parser.process(app); | ||
44 | 47 | | |||
45 | 48 | | |||
Context not available. | |||||
48 | osdtest.setUseDBus(true); | 51 | osdtest.setUseDBus(true); | ||
49 | } | 52 | } | ||
50 | if (parser.isSet(outputid)) { | 53 | if (parser.isSet(outputid)) { | ||
51 | | ||||
52 | osdtest.showOutputIdentifiers(); | 54 | osdtest.showOutputIdentifiers(); | ||
55 | } else if (parser.isSet(selector)) { | ||||
56 | osdtest.showActionSelector(); | ||||
53 | } else { | 57 | } else { | ||
54 | osdtest.showGenericOsd(parser.value(icon), parser.value(message)); | 58 | osdtest.showGenericOsd(parser.value(icon), parser.value(message)); | ||
55 | } | 59 | } | ||
Context not available. |