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