#include <commandlinehandler.h>
Abstract base class of the command line plugins.
- Author
- Vladimir Kuznetsov vovan.nosp@m.ec@g.nosp@m.mail..nosp@m.ru
◆ OptionFlag
These flags describe attributes that change the behavior of command line option processing.
Enumerator |
---|
HiddenFromHelp | Hide this option in the user-visible help output.
|
NoStart | Do not start player instance (useful for extra help options).
|
◆ ~CommandLineHandler()
◆ executeCommand()
virtual QString executeCommand |
( |
int |
id, |
|
|
const QStringList & |
args |
|
) |
| |
|
pure virtual |
Executes given command. Subclass should reimplement this function.
- Parameters
-
id | Command identifier to execute |
args | Command arguments |
- Returns
- Command output
◆ flags()
CommandLineHandler::OptionFlags flags |
( |
int |
id | ) |
const |
Returtns flags for specified option identifier
- Parameters
-
id | Command line option identifier. |
◆ helpString() [1/2]
QStringList helpString |
( |
| ) |
const |
Returns a list of help strings.
◆ helpString() [2/2]
QString helpString |
( |
int |
id | ) |
const |
Returns help string for specified option.
- Parameters
-
id | Command line option identifier. |
- Returns
◆ identify()
int identify |
( |
const QString & |
name | ) |
const |
Returtns identifier for specified option name or -1 if option is not supported.
- Parameters
-
name | Command line option name. |
◆ registerOprions()
virtual void registerOprions |
( |
| ) |
|
|
pure virtual |
Registers command line options. Subclass should implement this function
◆ registerOption() [1/2]
void registerOption |
( |
int |
id, |
|
|
const QString & |
name, |
|
|
const QString & |
helpString, |
|
|
const QStringList & |
values = QStringList() |
|
) |
| |
|
protected |
Registers command line option. This function should be called inside registerOprions() implementation.
- Parameters
-
id | Option identifier. |
name | Option name. |
helpString | Option description. |
values | Value name list (optional). |
◆ registerOption() [2/2]
void registerOption |
( |
int |
id, |
|
|
const QStringList & |
names, |
|
|
const QString & |
helpString, |
|
|
const QStringList & |
values = QStringList() |
|
) |
| |
|
protected |
Registers command line option. This function should be called inside registerOprions() implementation.
- Parameters
-
id | Option identifier. |
names | Option names (i.e. short and long variants). |
helpString | Option description. |
values | Value name list (optional). |
◆ setOptionFlags()
void setOptionFlags |
( |
int |
id, |
|
|
OptionFlags |
flags |
|
) |
| |
|
protected |
Changes command line option flags.
- Parameters
-
id | Option identifier. |
flags | Option flags. |
◆ shortName()
virtual QString shortName |
( |
| ) |
const |
|
pure virtual |
Returns command line plugin short name for internal usage. Subclass should reimplement this function.
◆ translation()
virtual QString translation |
( |
| ) |
const |
|
pure virtual |
Returns translation file path without locale code and extension. Subclass should reimplement this function.
The documentation for this class was generated from the following file: