Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QDocCommandLineParser Struct Reference

#include <qdoccommandlineparser.h>

+ Inheritance diagram for QDocCommandLineParser:
+ Collaboration diagram for QDocCommandLineParser:

Public Member Functions

 QDocCommandLineParser ()
 
void process (const QStringList &arguments)
 
- Public Member Functions inherited from QCommandLineParser
 QCommandLineParser ()
 Constructs a command line parser object.
 
 ~QCommandLineParser ()
 Destroys the command line parser object.
 
void setSingleDashWordOptionMode (SingleDashWordOptionMode parsingMode)
 Sets the parsing mode to singleDashWordOptionMode.
 
void setOptionsAfterPositionalArgumentsMode (OptionsAfterPositionalArgumentsMode mode)
 Sets the parsing mode to parsingMode.
 
bool addOption (const QCommandLineOption &commandLineOption)
 Adds the option option to look for while parsing.
 
bool addOptions (const QList< QCommandLineOption > &options)
 
QCommandLineOption addVersionOption ()
 Adds the {-v} / {–version} option, which displays the version string of the application.
 
QCommandLineOption addHelpOption ()
 Adds help options to the command-line parser.
 
void setApplicationDescription (const QString &description)
 Sets the application description shown by helpText().
 
QString applicationDescription () const
 Returns the application description set in setApplicationDescription().
 
void addPositionalArgument (const QString &name, const QString &description, const QString &syntax=QString())
 Defines an additional argument to the application, for the benefit of the help text.
 
void clearPositionalArguments ()
 Clears the definitions of additional arguments from the help text.
 
void process (const QStringList &arguments)
 Processes the command line arguments.
 
void process (const QCoreApplication &app)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The command line is obtained from the QCoreApplication instance app.
 
bool parse (const QStringList &arguments)
 Parses the command line arguments.
 
QString errorText () const
 Returns a translated error text for the user.
 
bool isSet (const QString &name) const
 Checks whether the option name was passed to the application.
 
QString value (const QString &name) const
 Returns the option value found for the given option name optionName, or an empty string if not found.
 
QStringList values (const QString &name) const
 Returns a list of option values found for the given option name optionName, or an empty list if not found.
 
bool isSet (const QCommandLineOption &option) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Checks whether the option was passed to the application.
 
QString value (const QCommandLineOption &option) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the option value found for the given option, or an empty string if not found.
 
QStringList values (const QCommandLineOption &option) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns a list of option values found for the given option, or an empty list if not found.
 
QStringList positionalArguments () const
 Returns a list of positional arguments.
 
QStringList optionNames () const
 Returns a list of option names that were found.
 
QStringList unknownOptionNames () const
 Returns a list of unknown option names.
 
Q_NORETURN void showVersion ()
 Displays the version information from QCoreApplication::applicationVersion(), and exits the application.
 
Q_NORETURN void showHelp (int exitCode=0)
 Displays the help information, and exits the application.
 
QString helpText () const
 Returns a string containing the complete help information.
 

Public Attributes

QCommandLineOption defineOption
 
QCommandLineOption dependsOption
 
QCommandLineOption highlightingOption
 
QCommandLineOption showInternalOption
 
QCommandLineOption redirectDocumentationToDevNullOption
 
QCommandLineOption noExamplesOption
 
QCommandLineOption indexDirOption
 
QCommandLineOption installDirOption
 
QCommandLineOption outputDirOption
 
QCommandLineOption outputFormatOption
 
QCommandLineOption noLinkErrorsOption
 
QCommandLineOption autoLinkErrorsOption
 
QCommandLineOption debugOption
 
QCommandLineOption atomsDumpOption
 
QCommandLineOption prepareOption
 
QCommandLineOption generateOption
 
QCommandLineOption logProgressOption
 
QCommandLineOption singleExecOption
 
QCommandLineOption includePathOption
 
QCommandLineOption includePathSystemOption
 
QCommandLineOption frameworkOption
 
QCommandLineOption timestampsOption
 
QCommandLineOption useDocBookExtensions
 

Additional Inherited Members

- Public Types inherited from QCommandLineParser
enum  SingleDashWordOptionMode { ParseAsCompactedShortOptions , ParseAsLongOptions }
 This enum describes the way the parser interprets command-line options that use a single dash followed by multiple letters, as {-abc}. More...
 
enum  OptionsAfterPositionalArgumentsMode { ParseAsOptions , ParseAsPositionalArguments }
 This enum describes the way the parser interprets options that occur after positional arguments. More...
 
enum  MessageType { InformationMessage , ErrorMessage }
 
- Static Public Member Functions inherited from QCommandLineParser
static Q_NORETURN void showMessageAndExit (const QString &message, MessageType type, int exitCode=0)
 Displays a message, and exits the application with the given exitCode.
 

Detailed Description

Definition at line 11 of file qdoccommandlineparser.h.

Constructor & Destructor Documentation

◆ QDocCommandLineParser()

QDocCommandLineParser::QDocCommandLineParser ( )

Definition at line 11 of file qdoccommandlineparser.cpp.

Member Function Documentation

◆ process()

void QDocCommandLineParser::process ( const QStringList & arguments)

Definition at line 171 of file qdoccommandlineparser.cpp.

Member Data Documentation

◆ atomsDumpOption

QCommandLineOption QDocCommandLineParser::atomsDumpOption

Definition at line 20 of file qdoccommandlineparser.h.

◆ autoLinkErrorsOption

QCommandLineOption QDocCommandLineParser::autoLinkErrorsOption

Definition at line 20 of file qdoccommandlineparser.h.

◆ debugOption

QCommandLineOption QDocCommandLineParser::debugOption

Definition at line 20 of file qdoccommandlineparser.h.

◆ defineOption

QCommandLineOption QDocCommandLineParser::defineOption

Definition at line 16 of file qdoccommandlineparser.h.

◆ dependsOption

QCommandLineOption QDocCommandLineParser::dependsOption

Definition at line 16 of file qdoccommandlineparser.h.

◆ frameworkOption

QCommandLineOption QDocCommandLineParser::frameworkOption

Definition at line 22 of file qdoccommandlineparser.h.

◆ generateOption

QCommandLineOption QDocCommandLineParser::generateOption

Definition at line 21 of file qdoccommandlineparser.h.

◆ highlightingOption

QCommandLineOption QDocCommandLineParser::highlightingOption

Definition at line 16 of file qdoccommandlineparser.h.

◆ includePathOption

QCommandLineOption QDocCommandLineParser::includePathOption

Definition at line 22 of file qdoccommandlineparser.h.

◆ includePathSystemOption

QCommandLineOption QDocCommandLineParser::includePathSystemOption

Definition at line 22 of file qdoccommandlineparser.h.

◆ indexDirOption

QCommandLineOption QDocCommandLineParser::indexDirOption

Definition at line 18 of file qdoccommandlineparser.h.

◆ installDirOption

QCommandLineOption QDocCommandLineParser::installDirOption

Definition at line 18 of file qdoccommandlineparser.h.

◆ logProgressOption

QCommandLineOption QDocCommandLineParser::logProgressOption

Definition at line 21 of file qdoccommandlineparser.h.

◆ noExamplesOption

QCommandLineOption QDocCommandLineParser::noExamplesOption

Definition at line 18 of file qdoccommandlineparser.h.

◆ noLinkErrorsOption

QCommandLineOption QDocCommandLineParser::noLinkErrorsOption

Definition at line 20 of file qdoccommandlineparser.h.

◆ outputDirOption

QCommandLineOption QDocCommandLineParser::outputDirOption

Definition at line 19 of file qdoccommandlineparser.h.

◆ outputFormatOption

QCommandLineOption QDocCommandLineParser::outputFormatOption

Definition at line 19 of file qdoccommandlineparser.h.

◆ prepareOption

QCommandLineOption QDocCommandLineParser::prepareOption

Definition at line 21 of file qdoccommandlineparser.h.

◆ redirectDocumentationToDevNullOption

QCommandLineOption QDocCommandLineParser::redirectDocumentationToDevNullOption

Definition at line 17 of file qdoccommandlineparser.h.

◆ showInternalOption

QCommandLineOption QDocCommandLineParser::showInternalOption

Definition at line 17 of file qdoccommandlineparser.h.

◆ singleExecOption

QCommandLineOption QDocCommandLineParser::singleExecOption

Definition at line 21 of file qdoccommandlineparser.h.

◆ timestampsOption

QCommandLineOption QDocCommandLineParser::timestampsOption

Definition at line 23 of file qdoccommandlineparser.h.

◆ useDocBookExtensions

QCommandLineOption QDocCommandLineParser::useDocBookExtensions

Definition at line 23 of file qdoccommandlineparser.h.


The documentation for this struct was generated from the following files: