Qmmp
Loading...
Searching...
No Matches
CommandLineManager Class Reference

#include <qmmpui/commandlinemanager.h>

Static Public Member Functions

static QString executeCommand (const QString &name, const QStringList &args, const QString &currentWorkingDir)
static bool hasOption (const QString &opt_str, CommandLineHandler::OptionFlags *flags=nullptr)
static void printUsage ()
static QString formatHelpString (const QString &line)

Detailed Description

Helper class used for handle command line plugins.

Author
Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru

Member Function Documentation

◆ executeCommand()

QString executeCommand ( const QString & name,
const QStringList & args,
const QString & currentWorkingDir )
static

Executes command opt_str.

Parameters
nameCommand line option name.
argsCommand arguments.
currentWorkingDirCurrent working directory.
Returns
Command output result.

◆ formatHelpString()

QString formatHelpString ( const QString & line)
static

Prepares help string for output.

Parameters
lineSpecially formatted help string. Example: "--command||description".

◆ hasOption()

bool hasOption ( const QString & opt_str,
CommandLineHandler::OptionFlags * flags = nullptr )
static

Return true if command opt_str is supported, otherwise returns false.

◆ printUsage()

void printUsage ( )
static

Prints usage to stdout.


The documentation for this class was generated from the following file: