MythTV  master
mythlcdserver/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  addHelp();
13  addVersion();
14  addDaemon();
15  addLogging();
16  //addPIDFile();
17 
18  add(QStringList{"-p", "--port"}, "port", 6545, "listen port",
19  "This is the port MythLCDServer will listen on for events.");
20  add(QStringList{"-m", "--startupmessage"}, "message", "",
21  "Message to display on startup.", "");
22  add(QStringList{"-t", "--messagetime"}, "messagetime", 30,
23  "Message display duration (in seconds)", "");
24  add(QStringList{"-x", "--debuglevel"}, "debug", 0,
25  "debug verbosity", "Control debugging verbosity, values from 0-10");
26 
27  add("--nodaemon", "nodaemon", false, "", "")
28  ->SetRemoved("This is the default behavior. No need for an argument.",
29  "0.25");
30 }
31 
commandlineparser.h
MYTH_APPNAME_MYTHLCDSERVER
#define MYTH_APPNAME_MYTHLCDSERVER
Definition: mythcorecontext.h:29
MythCommandLineParser
Parent class for defining application command line parsers.
Definition: mythcommandlineparser.h:116
MythCommandLineParser::addVersion
void addVersion(void)
Canned argument definition for –version.
Definition: mythcommandlineparser.cpp:2290
MythLCDServerCommandLineParser::MythLCDServerCommandLineParser
MythLCDServerCommandLineParser()
Definition: mythlcdserver/commandlineparser.cpp:6
MythLCDServerCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythlcdserver/commandlineparser.cpp:10
MythCommandLineParser::addLogging
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
Definition: mythcommandlineparser.cpp:2387
CommandLineArg::SetRemoved
CommandLineArg * SetRemoved(QString remstr="", QString remver="")
Set option as removed.
Definition: mythcommandlineparser.cpp:712
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.h:145
mythcorecontext.h
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2277
MythCommandLineParser::addDaemon
void addDaemon(void)
Canned argument definition for –daemon.
Definition: mythcommandlineparser.cpp:2329