Image Formats NG
Public Member Functions | Static Public Member Functions | List of all members
ImageTool::ToolParser Class Reference

This is helper class that simplifies usage of the QCommandLineParser. More...

Inherits QCommandLineParser.

Public Member Functions

 ToolParser (const QByteArray &toolName)
 Constructs a ToolParser instance with the given toolName.
 
void process (const QStringList &arguments)
 Parses and handles the default options (help). More...
 
Q_NORETURN void showHelp (int code)
 Prints help and throws ExitException with the given code.
 

Static Public Member Functions

static void showMessage (const QString &message)
 Prints the given message to the sdtout stream.
 
static void showError (const QString &message)
 Prints the given message to the sdterr stream.
 

Detailed Description

This is helper class that simplifies usage of the QCommandLineParser.

Provides built-in procesing of the help option which prints tool help.

Member Function Documentation

◆ process()

void ImageTool::ToolParser::process ( const QStringList &  arguments)

Parses and handles the default options (help).

Prints help and throws ExitException in case of parse error.