QuasarAppLib
QuasarAppUtils::Help Namespace Reference

Help namespace contains functions for printing help in to console. All Print fucntions automaticly calc width of the console and aligns the text to fit the window. More...

Typedefs

typedef QMultiMap< QString, QStringOptions
 Options this is list of key-descriptions pairs of help. The key is name of the available argument and description is description of the available argument.
 
typedef QMultiMap< QString, OptionsSection
 Section This is list of the help Sections. The one section it is Title of the section and Help::Options list.
 
typedef Section Charters
 Charters is wraper of the Section type.
 

Functions

void print (const QString &key, const QString &value, int keyLength)
 
void print (const Options &oprionsList)
 print This method print a one options list.
 
void print (const Section &help)
 print This method print all sections of the help.
 
void setLineLength (int newLength)
 setLineLength sets new length of the help line (width of the console window). If you set this into -1 then the window width will be selected automatically.
 
int width ()
 width This method return current width of the cosole window.
 

Detailed Description

Help namespace contains functions for printing help in to console. All Print fucntions automaticly calc width of the console and aligns the text to fit the window.

Typedef Documentation

◆ Charters

Charters is wraper of the Section type.

Warning
This type is depricated. Use the Help:Section type.

Definition at line 51 of file helpdata.h.

◆ Options

Options this is list of key-descriptions pairs of help. The key is name of the available argument and description is description of the available argument.

Example:

Options myOptionsList = {{"argument1", "This is test argumetn1 of my application."},
{"argument2", "This is test argumetn2 of my application."}};
QMultiMap< QString, QString > Options
Options this is list of key-descriptions pairs of help. The key is name of the available argument and...
Definition helpdata.h:32
void gen(int size, QByteArray &result)

Definition at line 32 of file helpdata.h.

◆ Section

Section This is list of the help Sections. The one section it is Title of the section and Help::Options list.

Example:

Options myOptionsList = {{"argument1", "This is test argumetn1 of my application."},
{"argument2", "This is test argumetn2 of my application."}};
Section mySections = {{"This Is main section of the help", myOptionsList}};
void print(const QString &key, const QString &value, int keyLength)
Definition helpdata.cpp:37
QMultiMap< QString, Options > Section
Section This is list of the help Sections. The one section it is Title of the section and Help::Optio...
Definition helpdata.h:45

Definition at line 45 of file helpdata.h.

Function Documentation

◆ print() [1/3]

void QUASARAPPSHARED_EXPORT QuasarAppUtils::Help::print ( const Options oprionsList)

print This method print a one options list.

Parameters
oprionsListThis is options list.

Definition at line 61 of file helpdata.cpp.

Here is the call graph for this function:

◆ print() [2/3]

void QuasarAppUtils::Help::print ( const QString key,
const QString value,
int  keyLength 
)

Definition at line 37 of file helpdata.cpp.

Here is the caller graph for this function:

◆ print() [3/3]

void QUASARAPPSHARED_EXPORT QuasarAppUtils::Help::print ( const Section help)

print This method print all sections of the help.

Note
This is main method for printing helps.
Parameters
helpThis is sections list.

Definition at line 76 of file helpdata.cpp.

Here is the call graph for this function:

◆ setLineLength()

void QUASARAPPSHARED_EXPORT QuasarAppUtils::Help::setLineLength ( int  newLength)

setLineLength sets new length of the help line (width of the console window). If you set this into -1 then the window width will be selected automatically.

Parameters
newLengthThis is a new size of the console window.

Definition at line 87 of file helpdata.cpp.

◆ width()

int QuasarAppUtils::Help::width ( )

width This method return current width of the cosole window.

Returns
width in pxels of the cosole window.

Definition at line 91 of file helpdata.cpp.