QuasarAppLib 1.0.530.c9fba11
helpdata.cpp File Reference
#include "helpdata.h"
#include <iostream>
#include <sys/ioctl.h>
#include <unistd.h>
Include dependency graph for helpdata.cpp:

Go to the source code of this file.

Namespaces

namespace  QuasarAppUtils
 The QuasarAppUtils namespace contains the base functions for all applications of the QuasarApp group. All methods of the QuasarAppUtils classes are static.
namespace  QuasarAppUtils::Help
 Help namespace contains functions for printing help in to console. All Print functions automatically calc width of the console and aligns the text to fit the window.

Macros

#define EXPANDER(COUNT, ITEM)
#define SPACES(X)
#define SECTION_MARGIN   SPACES(SectionMargin)
#define WIDTH   ((MAX_LENGTH > 10)? MAX_LENGTH: width())

Functions

void QuasarAppUtils::Help::print (const QString &key, const QString &value, int keyLength)
void QuasarAppUtils::Help::print (const Options &optionsList)
 print This method print a one options list.
void QuasarAppUtils::Help::print (const Section &help)
 print This method print all sections of the help.
void 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.
int QuasarAppUtils::Help::width ()
 width This method return current width of the console window.

Macro Definition Documentation

◆ EXPANDER

#define EXPANDER ( COUNT,
ITEM )
Value:
QString(COUNT, ITEM).toStdString()

Definition at line 24 of file helpdata.cpp.

◆ SECTION_MARGIN

#define SECTION_MARGIN   SPACES(SectionMargin)

Definition at line 26 of file helpdata.cpp.

◆ SPACES

#define SPACES ( X)
Value:
EXPANDER(X, ' ')
#define EXPANDER(COUNT, ITEM)
Definition helpdata.cpp:24

Definition at line 25 of file helpdata.cpp.

◆ WIDTH

#define WIDTH   ((MAX_LENGTH > 10)? MAX_LENGTH: width())

Definition at line 27 of file helpdata.cpp.