MythTV  master
mythtv-setup/commandlineparser.cpp
Go to the documentation of this file.
1 #include <QString>
2 
3 #include "mythcorecontext.h"
4 #include "commandlineparser.h"
5 
9 
11 {
12  return "Mythtv-setup is the setup application for the backend server. It is \n"
13  "used to configure the backend, and manage tuner cards and storage. \n"
14  "Most settings will require a restart of the backend before they take \n"
15  "effect.";
16 }
17 
19 {
20  addHelp();
22  addVersion();
23  addWindowed();
24  addMouse();
25  addGeometry();
26  addDisplay();
27  addLogging();
28 
29  add("--expert", "expert", false, "", "Expert mode.");
30  add("--scan-list", "scanlist", false, "", "no help");
31  add("--scan-save-only", "savescan", false, "", "no help");
32  add("--scan-non-interactive", "scannoninteractive", false, "", "no help");
33 
34  add("--freq-std", "freqstd", "atsc", "",
35  "Specify the frequency standard to be used with command "
36  "line channel scanner")
37  ->SetParentOf("modulation")
38  ->SetParentOf("region");
39  add("--modulation", "modulation", "vsb8", "",
40  "Specify the frequency modulation to be used with command "
41  "line channel scanner");
42  add("--region", "region", "us", "",
43  "Specify the region for the frequency standard to be used with command "
44  "line channel scanner");
45 
46  add("--input-name", "inputname", "", "",
47  "Specify which input to scan for, if specified card "
48  "supports multiple.");
49  add("--FTAonly", "ftaonly", false, "", "Only import 'Free To Air' channels.");
50  add("--add-full-ts", "addfullts", false, "",
51  "Create addition Transport Stream channels, "
52  "which allow recording of the full, unaltered, transport stream.");
53  add("--service-type", "servicetype", "all", "",
54  "To be used with channel scanning or importing, specify "
55  "the type of services to import. Select from the following, "
56  "multiple can be added with '+':\n"
57  " all, tv, radio");
58 
59  add("--scan", "scan", 0U, "",
60  "Run the command line channel scanner on a specified card ID.")
61  ->SetParentOf("freqstd")
62  ->SetParentOf("inputname")
63  ->SetParentOf("ftaonly")
64  ->SetParentOf("servicetype")
65  ->SetParentOf("addfullts")
66  ->SetBlocks("importscan");
67 
68 
69  add("--scan-import", "importscan", 0U, "",
70  "Import an existing scan from the database. Use --scan-list "
71  "to enumerate scans available for import.")
72  ->SetParentOf("ftaonly")
73  ->SetParentOf("servicetype");
74 }
CommandLineArg * add(QString arg, QString name, bool def, QString help, QString longhelp)
void addWindowed(void)
Canned argument definition for –windowed and -no-windowed.
void addMouse(void)
Canned argument definition for –mouse-cursor and –no-mouse-cursor.
Parent class for defining application command line parsers.
void addVersion(void)
Canned argument definition for –version.
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
void addHelp(void)
Canned argument definition for –help.
#define MYTH_APPNAME_MYTHTV_SETUP
void addGeometry(void)
Canned argument definition for –geometry.
CommandLineArg * SetParentOf(const QString &opt)
Set argument as parent of given child.
QString GetHelpHeader(void) const override
void addDisplay(void)
Canned argument definition for -display.
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
CommandLineArg * SetBlocks(const QString &opt)
Set argument as incompatible with given option.