File indexing completed on 2024-07-14 03:55:08

0001 #ifndef OPTIONS_H
0002 #define OPTIONS_H
0003 
0004 #include <QCommandLineOption>
0005 
0006 namespace Options
0007 {
0008 static QCommandLineOption hash()
0009 {
0010     static QCommandLineOption o{QStringLiteral("hash"),
0011                                 i18nc("Do not translate <path>", "Generate a SHA1 hash for the package at <path>"),
0012                                 QStringLiteral("path")};
0013     return o;
0014 }
0015 static QCommandLineOption global()
0016 {
0017     static QCommandLineOption o{QStringList{QStringLiteral("g"), QStringLiteral("global")},
0018                                 i18n("For install or remove, operates on packages installed for all users.")};
0019     return o;
0020 }
0021 static QCommandLineOption type()
0022 {
0023     static QCommandLineOption o{QStringList{QStringLiteral("t"), QStringLiteral("type")},
0024                                 i18nc("theme, wallpaper, etc. are keywords, but they may be translated, as both versions "
0025                                       "are recognized by the application "
0026                                       "(if translated, should be same as messages with 'package type' context below)",
0027                                       "The type of package, corresponding to the service type of the package plugin, e.g. KPackage/Generic, Plasma/Theme, "
0028                                       "Plasma/Wallpaper, Plasma/Applet, etc."),
0029                                 QStringLiteral("type"),
0030                                 QStringLiteral("KPackage/Generic")};
0031     return o;
0032 }
0033 static QCommandLineOption install()
0034 {
0035     static QCommandLineOption o{QStringList{QStringLiteral("i"), QStringLiteral("install")},
0036                                 i18nc("Do not translate <path>", "Install the package at <path>"),
0037                                 QStringLiteral("path")};
0038     return o;
0039 }
0040 static QCommandLineOption show()
0041 {
0042     static QCommandLineOption o{QStringList{QStringLiteral("s"), QStringLiteral("show")},
0043                                 i18nc("Do not translate <name>", "Show information of package <name>"),
0044                                 QStringLiteral("name")};
0045     return o;
0046 }
0047 static QCommandLineOption upgrade()
0048 {
0049     static QCommandLineOption o{QStringList{QStringLiteral("u"), QStringLiteral("upgrade")},
0050                                 i18nc("Do not translate <path>", "Upgrade the package at <path>"),
0051                                 QStringLiteral("path")};
0052     return o;
0053 }
0054 static QCommandLineOption list()
0055 {
0056     static QCommandLineOption o{QStringList{QStringLiteral("l"), QStringLiteral("list")}, i18n("List installed packages")};
0057     return o;
0058 }
0059 static QCommandLineOption listTypes()
0060 {
0061     static QCommandLineOption o{QStringList{QStringLiteral("list-types")}, i18n("List all known package types that can be installed")};
0062     return o;
0063 }
0064 static QCommandLineOption remove()
0065 {
0066     static QCommandLineOption o{QStringList{QStringLiteral("r"), QStringLiteral("remove")},
0067                                 i18nc("Do not translate <name>", "Remove the package named <name>"),
0068                                 QStringLiteral("name")};
0069     return o;
0070 }
0071 static QCommandLineOption packageRoot()
0072 {
0073     static QCommandLineOption o{QStringList{QStringLiteral("p"), QStringLiteral("packageroot")},
0074                                 i18n("Absolute path to the package root. If not supplied, then the standard data"
0075                                      " directories for this KDE session will be searched instead."),
0076                                 QStringLiteral("path")};
0077     return o;
0078 }
0079 static QCommandLineOption appstream()
0080 {
0081     static QCommandLineOption o{QStringLiteral("appstream-metainfo"),
0082                                 i18nc("Do not translate <path>", "Outputs the metadata for the package <path>"),
0083                                 QStringLiteral("path")};
0084     return o;
0085 }
0086 static QCommandLineOption appstreamOutput()
0087 {
0088     static QCommandLineOption o{QStringLiteral("appstream-metainfo-output"),
0089                                 i18nc("Do not translate <path>", "Outputs the metadata for the package into <path>"),
0090                                 QStringLiteral("path")};
0091     return o;
0092 }
0093 }
0094 
0095 #endif // OPTIONS_H