1 | #ifndef OPTIONS_H |
2 | #define OPTIONS_H |
3 | |
4 | #include <QCommandLineOption> |
5 | |
6 | namespace Options |
7 | { |
8 | static QCommandLineOption hash() |
9 | { |
10 | static QCommandLineOption o{QStringLiteral("hash" ), |
11 | i18nc("Do not translate <path>" , "Generate a SHA1 hash for the package at <path>" ), |
12 | QStringLiteral("path" )}; |
13 | return o; |
14 | } |
15 | static QCommandLineOption global() |
16 | { |
17 | static QCommandLineOption o{QStringList{QStringLiteral("g" ), QStringLiteral("global" )}, |
18 | i18n("For install or remove, operates on packages installed for all users." )}; |
19 | return o; |
20 | } |
21 | static QCommandLineOption type() |
22 | { |
23 | static QCommandLineOption o{QStringList{QStringLiteral("t" ), QStringLiteral("type" )}, |
24 | i18nc("theme, wallpaper, etc. are keywords, but they may be translated, as both versions " |
25 | "are recognized by the application " |
26 | "(if translated, should be same as messages with 'package type' context below)" , |
27 | "The type of package, corresponding to the service type of the package plugin, e.g. KPackage/Generic, Plasma/Theme, " |
28 | "Plasma/Wallpaper, Plasma/Applet, etc." ), |
29 | QStringLiteral("type" ), |
30 | QStringLiteral("KPackage/Generic" )}; |
31 | return o; |
32 | } |
33 | static QCommandLineOption install() |
34 | { |
35 | static QCommandLineOption o{QStringList{QStringLiteral("i" ), QStringLiteral("install" )}, |
36 | i18nc("Do not translate <path>" , "Install the package at <path>" ), |
37 | QStringLiteral("path" )}; |
38 | return o; |
39 | } |
40 | static QCommandLineOption show() |
41 | { |
42 | static QCommandLineOption o{QStringList{QStringLiteral("s" ), QStringLiteral("show" )}, |
43 | i18nc("Do not translate <name>" , "Show information of package <name>" ), |
44 | QStringLiteral("name" )}; |
45 | return o; |
46 | } |
47 | static QCommandLineOption upgrade() |
48 | { |
49 | static QCommandLineOption o{QStringList{QStringLiteral("u" ), QStringLiteral("upgrade" )}, |
50 | i18nc("Do not translate <path>" , "Upgrade the package at <path>" ), |
51 | QStringLiteral("path" )}; |
52 | return o; |
53 | } |
54 | static QCommandLineOption list() |
55 | { |
56 | static QCommandLineOption o{QStringList{QStringLiteral("l" ), QStringLiteral("list" )}, i18n("List installed packages" )}; |
57 | return o; |
58 | } |
59 | static QCommandLineOption listTypes() |
60 | { |
61 | static QCommandLineOption o{QStringList{QStringLiteral("list-types" )}, i18n("List all known package types that can be installed" )}; |
62 | return o; |
63 | } |
64 | static QCommandLineOption remove() |
65 | { |
66 | static QCommandLineOption o{QStringList{QStringLiteral("r" ), QStringLiteral("remove" )}, |
67 | i18nc("Do not translate <name>" , "Remove the package named <name>" ), |
68 | QStringLiteral("name" )}; |
69 | return o; |
70 | } |
71 | static QCommandLineOption packageRoot() |
72 | { |
73 | static QCommandLineOption o{QStringList{QStringLiteral("p" ), QStringLiteral("packageroot" )}, |
74 | i18n("Absolute path to the package root. If not supplied, then the standard data" |
75 | " directories for this KDE session will be searched instead." ), |
76 | QStringLiteral("path" )}; |
77 | return o; |
78 | } |
79 | static QCommandLineOption appstream() |
80 | { |
81 | static QCommandLineOption o{QStringLiteral("appstream-metainfo" ), |
82 | i18nc("Do not translate <path>" , "Outputs the metadata for the package <path>" ), |
83 | QStringLiteral("path" )}; |
84 | return o; |
85 | } |
86 | static QCommandLineOption appstreamOutput() |
87 | { |
88 | static QCommandLineOption o{QStringLiteral("appstream-metainfo-output" ), |
89 | i18nc("Do not translate <path>" , "Outputs the metadata for the package into <path>" ), |
90 | QStringLiteral("path" )}; |
91 | return o; |
92 | } |
93 | } |
94 | |
95 | #endif // OPTIONS_H |
96 | |