BPS C++ API  2.24.4
BpsMdeHtml Class Reference

A helper class derived from QString to conveniently read HTML files, replace translatable texts and replace parameter tags. More...

#include <bpsmdehtml.h>

+ Inheritance diagram for BpsMdeHtml:

Public Member Functions

 BpsMdeHtml (const char *aFile)
 Construct by reading the HTML template from a file. More...
 
 BpsMdeHtml (const QByteArray &aFile)
 Construct by reading the HTML template from a file. More...
 
 BpsMdeHtml (const QString &aString)
 Construct a HTML object from a QString. More...
 
BpsMdeHtml set (const QString &aTag, bool aValue)
 Replace parameter tags marked in the HTML with {{aTag}} by another value. More...
 
BpsMdeHtml set (const QString &aTag, const QString &aValue)
 Replace parameter tags marked in the HTML with {{aTag}} by another value. More...
 
BpsMdeHtml set (const QString &aTag, int aValue)
 Replace parameter tags marked in the HTML with {{aTag}} by another value. More...
 
BpsMdeHtml set (const QString &aTag, qlonglong aValue)
 Replace parameter tags marked in the HTML with {{aTag}} by another value. More...
 
BpsMdeHtml set (const QString &aTag, qulonglong aValue)
 Replace parameter tags marked in the HTML with {{aTag}} by another value. More...
 
BpsMdeHtml setInputTypes (BpsMdeSession *aSession)
 Replace input type tags by the approptiate HTML input type: More...
 
BpsMdeHtml trn (const QString &aText, const QString &aTranslated)
 Replace translation texts marked in the HTML with [[aText]] by a translated text. More...
 
- Public Member Functions inherited from QString
QStringappend (const char *str)
 
QStringappend (const QByteArray &ba)
 
QStringappend (const QChar *str, int len)
 
QStringappend (const QString &str)
 
QStringappend (const QStringRef &reference)
 
QStringappend (QChar ch)
 
QStringappend (QLatin1String str)
 
QStringappend (QStringView str)
 
QString arg (Args &&... args) const const
 
QString arg (char a, int fieldWidth, QChar fillChar) const const
 
QString arg (const QString &a, int fieldWidth, QChar fillChar) const const
 
QString arg (const QString &a1, const QString &a2) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3, const QString &a4) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3, const QString &a4, const QString &a5) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3, const QString &a4, const QString &a5, const QString &a6) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3, const QString &a4, const QString &a5, const QString &a6, const QString &a7) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3, const QString &a4, const QString &a5, const QString &a6, const QString &a7, const QString &a8) const const
 
QString arg (const QString &a1, const QString &a2, const QString &a3, const QString &a4, const QString &a5, const QString &a6, const QString &a7, const QString &a8, const QString &a9) const const
 
QString arg (double a, int fieldWidth, char format, int precision, QChar fillChar) const const
 
QString arg (int a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (long a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (QChar a, int fieldWidth, QChar fillChar) const const
 
QString arg (QLatin1String a, int fieldWidth, QChar fillChar) const const
 
QString arg (qlonglong a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (QStringView a, int fieldWidth, QChar fillChar) const const
 
QString arg (qulonglong a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (short a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (uint a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (ulong a, int fieldWidth, int base, QChar fillChar) const const
 
QString arg (ushort a, int fieldWidth, int base, QChar fillChar) const const
 
const QChar at (int position) const const
 
QCharRef back ()
 
QChar back () const const
 
QString::iterator begin ()
 
QString::const_iterator begin () const const
 
int capacity () const const
 
QString::const_iterator cbegin () const const
 
QString::const_iterator cend () const const
 
void chop (int n)
 
QString chopped (int len) const const
 
void clear ()
 
int compare (const QString &other, Qt::CaseSensitivity cs) const const
 
int compare (const QStringRef &ref, Qt::CaseSensitivity cs) const const
 
int compare (QChar ch, Qt::CaseSensitivity cs) const const
 
int compare (QLatin1String other, Qt::CaseSensitivity cs) const const
 
int compare (QStringView s, Qt::CaseSensitivity cs) const const
 
QString::const_iterator constBegin () const const
 
const QCharconstData () const const
 
QString::const_iterator constEnd () const const
 
bool contains (const QRegExp &rx) const const
 
bool contains (const QRegularExpression &re) const const
 
bool contains (const QRegularExpression &re, QRegularExpressionMatch *rmatch) const const
 
bool contains (const QString &str, Qt::CaseSensitivity cs) const const
 
bool contains (const QStringRef &str, Qt::CaseSensitivity cs) const const
 
bool contains (QChar ch, Qt::CaseSensitivity cs) const const
 
bool contains (QLatin1String str, Qt::CaseSensitivity cs) const const
 
bool contains (QRegExp &rx) const const
 
bool contains (QStringView str, Qt::CaseSensitivity cs) const const
 
int count () const const
 
int count (const QRegExp &rx) const const
 
int count (const QRegularExpression &re) const const
 
int count (const QString &str, Qt::CaseSensitivity cs) const const
 
int count (const QStringRef &str, Qt::CaseSensitivity cs) const const
 
int count (QChar ch, Qt::CaseSensitivity cs) const const
 
QString::const_reverse_iterator crbegin () const const
 
QString::const_reverse_iterator crend () const const
 
QChardata ()
 
const QChardata () const const
 
QString::iterator end ()
 
QString::const_iterator end () const const
 
bool endsWith (const QString &s, Qt::CaseSensitivity cs) const const
 
bool endsWith (const QStringRef &s, Qt::CaseSensitivity cs) const const
 
bool endsWith (QChar c, Qt::CaseSensitivity cs) const const
 
bool endsWith (QLatin1String s, Qt::CaseSensitivity cs) const const
 
bool endsWith (QStringView str, Qt::CaseSensitivity cs) const const
 
QStringfill (QChar ch, int size)
 
QCharRef front ()
 
QChar front () const const
 
int indexOf (const QRegExp &rx, int from) const const
 
int indexOf (const QRegularExpression &re, int from) const const
 
int indexOf (const QRegularExpression &re, int from, QRegularExpressionMatch *rmatch) const const
 
int indexOf (const QString &str, int from, Qt::CaseSensitivity cs) const const
 
int indexOf (const QStringRef &str, int from, Qt::CaseSensitivity cs) const const
 
int indexOf (QChar ch, int from, Qt::CaseSensitivity cs) const const
 
int indexOf (QLatin1String str, int from, Qt::CaseSensitivity cs) const const
 
int indexOf (QRegExp &rx, int from) const const
 
int indexOf (QStringView str, int from, Qt::CaseSensitivity cs) const const
 
QStringinsert (int position, const char *str)
 
QStringinsert (int position, const QByteArray &str)
 
QStringinsert (int position, const QChar *unicode, int size)
 
QStringinsert (int position, const QString &str)
 
QStringinsert (int position, const QStringRef &str)
 
QStringinsert (int position, QChar ch)
 
QStringinsert (int position, QLatin1String str)
 
QStringinsert (int position, QStringView str)
 
bool isEmpty () const const
 
bool isLower () const const
 
bool isNull () const const
 
bool isRightToLeft () const const
 
bool isUpper () const const
 
bool isValidUtf16 () const const
 
int lastIndexOf (const QRegExp &rx, int from) const const
 
int lastIndexOf (const QRegularExpression &re, int from) const const
 
int lastIndexOf (const QRegularExpression &re, int from, QRegularExpressionMatch *rmatch) const const
 
int lastIndexOf (const QString &str, int from, Qt::CaseSensitivity cs) const const
 
int lastIndexOf (const QStringRef &str, int from, Qt::CaseSensitivity cs) const const
 
int lastIndexOf (QChar ch, int from, Qt::CaseSensitivity cs) const const
 
int lastIndexOf (QLatin1String str, int from, Qt::CaseSensitivity cs) const const
 
int lastIndexOf (QRegExp &rx, int from) const const
 
int lastIndexOf (QStringView str, int from, Qt::CaseSensitivity cs) const const
 
QString left (int n) const const
 
QString leftJustified (int width, QChar fill, bool truncate) const const
 
QStringRef leftRef (int n) const const
 
int length () const const
 
int localeAwareCompare (const QString &other) const const
 
int localeAwareCompare (const QStringRef &other) const const
 
QString mid (int position, int n) const const
 
QStringRef midRef (int position, int n) const const
 
QString normalized (QString::NormalizationForm mode, QChar::UnicodeVersion version) const const
 
bool operator!= (const char *other) const const
 
bool operator!= (const char *s1, const QString &s2)
 
bool operator!= (const QByteArray &other) const const
 
bool operator!= (const QString &s1, const QString &s2)
 
bool operator!= (QLatin1String other) const const
 
const QString operator+ (char ch, const QString &s)
 
const QString operator+ (const char *s1, const QString &s2)
 
const QString operator+ (const QString &s, char ch)
 
const QString operator+ (const QString &s1, const char *s2)
 
const QString operator+ (const QString &s1, const QString &s2)
 
QStringoperator+= (char ch)
 
QStringoperator+= (const char *str)
 
QStringoperator+= (const QByteArray &ba)
 
QStringoperator+= (const QString &other)
 
QStringoperator+= (const QStringRef &str)
 
QStringoperator+= (QChar ch)
 
QStringoperator+= (QLatin1String str)
 
QStringoperator+= (QStringView str)
 
bool operator< (const char *other) const const
 
bool operator< (const char *s1, const QString &s2)
 
bool operator< (const QByteArray &other) const const
 
bool operator< (const QString &s1, const QString &s2)
 
bool operator< (QLatin1String other) const const
 
QDataStreamoperator<< (QDataStream &stream, const QString &string)
 
bool operator<= (const char *other) const const
 
bool operator<= (const char *s1, const QString &s2)
 
bool operator<= (const QByteArray &other) const const
 
bool operator<= (const QString &s1, const QString &s2)
 
bool operator<= (QLatin1String other) const const
 
QStringoperator= (char ch)
 
QStringoperator= (const char *str)
 
QStringoperator= (const QByteArray &ba)
 
QStringoperator= (const QString &other)
 
QStringoperator= (QChar ch)
 
QStringoperator= (QLatin1String str)
 
QStringoperator= (QString &&other)
 
bool operator== (const char *other) const const
 
bool operator== (const char *s1, const QString &s2)
 
bool operator== (const QByteArray &other) const const
 
bool operator== (const QString &s1, const QString &s2)
 
bool operator== (QLatin1String other) const const
 
bool operator> (const char *other) const const
 
bool operator> (const char *s1, const QString &s2)
 
bool operator> (const QByteArray &other) const const
 
bool operator> (const QString &s1, const QString &s2)
 
bool operator> (QLatin1String other) const const
 
bool operator>= (const char *other) const const
 
bool operator>= (const char *s1, const QString &s2)
 
bool operator>= (const QByteArray &other) const const
 
bool operator>= (const QString &s1, const QString &s2)
 
bool operator>= (QLatin1String other) const const
 
QDataStreamoperator>> (QDataStream &stream, QString &string)
 
QCharRef operator[] (int position)
 
const QChar operator[] (int position) const const
 
QCharRef operator[] (uint position)
 
const QChar operator[] (uint position) const const
 
QStringprepend (const char *str)
 
QStringprepend (const QByteArray &ba)
 
QStringprepend (const QChar *str, int len)
 
QStringprepend (const QString &str)
 
QStringprepend (const QStringRef &str)
 
QStringprepend (QChar ch)
 
QStringprepend (QLatin1String str)
 
QStringprepend (QStringView str)
 
void push_back (const QString &other)
 
void push_back (QChar ch)
 
void push_front (const QString &other)
 
void push_front (QChar ch)
 
 QString (const char *str)
 
 QString (const QByteArray &ba)
 
 QString (const QChar *unicode, int size)
 
 QString (const QString &other)
 
 QString (int size, QChar ch)
 
 QString (QChar ch)
 
 QString (QLatin1String str)
 
 QString (QString &&other)
 
 QStringLiteral (str)
 
 QT_NO_CAST_FROM_ASCII QT_NO_CAST_FROM_ASCII
 
 QT_NO_CAST_TO_ASCII QT_NO_CAST_TO_ASCII
 
 QT_RESTRICTED_CAST_FROM_ASCII QT_RESTRICTED_CAST_FROM_ASCII
 
QString::reverse_iterator rbegin ()
 
QString::const_reverse_iterator rbegin () const const
 
QStringremove (const QRegExp &rx)
 
QStringremove (const QRegularExpression &re)
 
QStringremove (const QString &str, Qt::CaseSensitivity cs)
 
QStringremove (int position, int n)
 
QStringremove (QChar ch, Qt::CaseSensitivity cs)
 
QStringremove (QLatin1String str, Qt::CaseSensitivity cs)
 
QString::reverse_iterator rend ()
 
QString::const_reverse_iterator rend () const const
 
QString repeated (int times) const const
 
QStringreplace (const QChar *before, int blen, const QChar *after, int alen, Qt::CaseSensitivity cs)
 
QStringreplace (const QRegExp &rx, const QString &after)
 
QStringreplace (const QRegularExpression &re, const QString &after)
 
QStringreplace (const QString &before, const QString &after, Qt::CaseSensitivity cs)
 
QStringreplace (const QString &before, QLatin1String after, Qt::CaseSensitivity cs)
 
QStringreplace (int position, int n, const QChar *unicode, int size)
 
QStringreplace (int position, int n, const QString &after)
 
QStringreplace (int position, int n, QChar after)
 
QStringreplace (QChar before, QChar after, Qt::CaseSensitivity cs)
 
QStringreplace (QChar c, QLatin1String after, Qt::CaseSensitivity cs)
 
QStringreplace (QChar ch, const QString &after, Qt::CaseSensitivity cs)
 
QStringreplace (QLatin1String before, const QString &after, Qt::CaseSensitivity cs)
 
QStringreplace (QLatin1String before, QLatin1String after, Qt::CaseSensitivity cs)
 
void reserve (int size)
 
void resize (int size)
 
void resize (int size, QChar fillChar)
 
QString right (int n) const const
 
QString rightJustified (int width, QChar fill, bool truncate) const const
 
QStringRef rightRef (int n) const const
 
QString section (const QRegExp &reg, int start, int end, QString::SectionFlags flags) const const
 
QString section (const QRegularExpression &re, int start, int end, QString::SectionFlags flags) const const
 
QString section (const QString &sep, int start, int end, QString::SectionFlags flags) const const
 
QString section (QChar sep, int start, int end, QString::SectionFlags flags) const const
 
QStringsetNum (double n, char format, int precision)
 
QStringsetNum (float n, char format, int precision)
 
QStringsetNum (int n, int base)
 
QStringsetNum (long n, int base)
 
QStringsetNum (qlonglong n, int base)
 
QStringsetNum (qulonglong n, int base)
 
QStringsetNum (short n, int base)
 
QStringsetNum (uint n, int base)
 
QStringsetNum (ulong n, int base)
 
QStringsetNum (ushort n, int base)
 
QStringsetRawData (const QChar *unicode, int size)
 
QStringsetUnicode (const QChar *unicode, int size)
 
QStringsetUtf16 (const ushort *unicode, int size)
 
void shrink_to_fit ()
 
QString simplified () const const
 
int size () const const
 
QStringList split (const QRegExp &rx, QString::SplitBehavior behavior) const const
 
QStringList split (const QRegExp &rx, Qt::SplitBehavior behavior) const const
 
QStringList split (const QRegularExpression &re, QString::SplitBehavior behavior) const const
 
QStringList split (const QRegularExpression &re, Qt::SplitBehavior behavior) const const
 
QStringList split (const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QStringList split (const QString &sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QStringList split (QChar sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QStringList split (QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QVector< QStringRefsplitRef (const QRegExp &rx, QString::SplitBehavior behavior) const const
 
QVector< QStringRefsplitRef (const QRegExp &rx, Qt::SplitBehavior behavior) const const
 
QVector< QStringRefsplitRef (const QRegularExpression &re, QString::SplitBehavior behavior) const const
 
QVector< QStringRefsplitRef (const QRegularExpression &re, Qt::SplitBehavior behavior) const const
 
QVector< QStringRefsplitRef (const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QVector< QStringRefsplitRef (const QString &sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QVector< QStringRefsplitRef (QChar sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QVector< QStringRefsplitRef (QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
 
QStringsprintf (const char *cformat,...)
 
void squeeze ()
 
bool startsWith (const QString &s, Qt::CaseSensitivity cs) const const
 
bool startsWith (const QStringRef &s, Qt::CaseSensitivity cs) const const
 
bool startsWith (QChar c, Qt::CaseSensitivity cs) const const
 
bool startsWith (QLatin1String s, Qt::CaseSensitivity cs) const const
 
bool startsWith (QStringView str, Qt::CaseSensitivity cs) const const
 
void swap (QString &other)
 
QByteArray toAscii () const const
 
QString toCaseFolded () const const
 
CFStringRef toCFString () const const
 
double toDouble (bool *ok) const const
 
float toFloat (bool *ok) const const
 
QString toHtmlEscaped () const const
 
int toInt (bool *ok, int base) const const
 
QByteArray toLatin1 () const const
 
QByteArray toLocal8Bit () const const
 
long toLong (bool *ok, int base) const const
 
qlonglong toLongLong (bool *ok, int base) const const
 
QString toLower () const const
 
NSString * toNSString () const const
 
short toShort (bool *ok, int base) const const
 
std::string toStdString () const const
 
std::u16string toStdU16String () const const
 
std::u32string toStdU32String () const const
 
std::wstring toStdWString () const const
 
QVector< uint > toUcs4 () const const
 
uint toUInt (bool *ok, int base) const const
 
ulong toULong (bool *ok, int base) const const
 
qulonglong toULongLong (bool *ok, int base) const const
 
QString toUpper () const const
 
ushort toUShort (bool *ok, int base) const const
 
QByteArray toUtf8 () const const
 
int toWCharArray (wchar_t *array) const const
 
QString trimmed () const const
 
void truncate (int position)
 
const QCharunicode () const const
 
const ushort * utf16 () const const
 
QStringvsprintf (const char *cformat, va_list ap)
 

Static Public Member Functions

static QString dialogTags (BpsMdeSession *aSession)
 Return the browser specific header tags for a regular dialog page. More...
 
static void errorPage (BpsMdeRequest *aRequest, BpsMdeSession *aSession, const QString &aTitle, const QString &aMessage, const QString &aUrl=QString())
 Shows the standard error page of the MDE server. More...
 
static QString escapeHtml (const QString &aText)
 Escapes special chars by their html entity: less than, greater than, ampersand. More...
 
static QString fromHtml (const QString &aText)
 Convert a HTML to normal text. More...
 
static void menuPage (BpsMdeRequest *aRequest, BpsMdeSession *aSession, const QString &aTitle, const QList< BpsMdeApplication * > &aApplications)
 Shows a standard menu page of the MDE server. More...
 
static QString menuTags (BpsMdeSession *aSession)
 Return the browser specific header tags for a menu page. More...
 
static QString nbsp ()
 
static QString prevNextTags (BpsMdeSession *aSession)
 Return the browser specific header tags for a dialog page with previous/next buttons. More...
 
static QString quitTags (BpsMdeSession *aSession)
 Return the browser specific header tags for the quit page. More...
 
static QString toHtml (const QString &aText)
 Convert a normal text to HTML. More...
 
- Static Public Member Functions inherited from QString
QString asprintf (const char *cformat,...)
 
int compare (const QString &s1, const QString &s2, Qt::CaseSensitivity cs)
 
int compare (const QString &s1, const QStringRef &s2, Qt::CaseSensitivity cs)
 
int compare (const QString &s1, QLatin1String s2, Qt::CaseSensitivity cs)
 
int compare (QLatin1String s1, const QString &s2, Qt::CaseSensitivity cs)
 
QString fromAscii (const char *str, int size)
 
QString fromAscii (const QByteArray &str)
 
QString fromCFString (CFStringRef string)
 
QString fromLatin1 (const char *str, int size)
 
QString fromLatin1 (const QByteArray &str)
 
QString fromLocal8Bit (const char *str, int size)
 
QString fromLocal8Bit (const QByteArray &str)
 
QString fromNSString (const NSString *string)
 
QString fromRawData (const QChar *unicode, int size)
 
QString fromStdString (const std::string &str)
 
QString fromStdU16String (const std::u16string &str)
 
QString fromStdU32String (const std::u32string &str)
 
QString fromStdWString (const std::wstring &str)
 
QString fromUcs4 (const char32_t *str, int size)
 
QString fromUcs4 (const uint *unicode, int size)
 
QString fromUtf16 (const char16_t *str, int size)
 
QString fromUtf16 (const ushort *unicode, int size)
 
QString fromUtf8 (const char *str, int size)
 
QString fromUtf8 (const QByteArray &str)
 
QString fromWCharArray (const wchar_t *string, int size)
 
int localeAwareCompare (const QString &s1, const QString &s2)
 
int localeAwareCompare (const QString &s1, const QStringRef &s2)
 
QString number (double n, char format, int precision)
 
QString number (int n, int base)
 
QString number (long n, int base)
 
QString number (qlonglong n, int base)
 
QString number (qulonglong n, int base)
 
QString number (uint n, int base)
 
QString number (ulong n, int base)
 
QString vasprintf (const char *cformat, va_list ap)
 

Additional Inherited Members

- Public Types inherited from QString
enum  NormalizationForm
 
enum  SectionFlag
 
enum  SplitBehavior
 
- Public Attributes inherited from QString
typedef const_iterator
 
typedef const_pointer
 
typedef const_reference
 
typedef const_reverse_iterator
 
typedef ConstIterator
 
typedef difference_type
 
typedef Iterator
 
typedef iterator
 
 KeepEmptyParts
 
 NormalizationForm_C
 
 NormalizationForm_D
 
 NormalizationForm_KC
 
 NormalizationForm_KD
 
typedef pointer
 
typedef reference
 
typedef reverse_iterator
 
 SectionCaseInsensitiveSeps
 
 SectionDefault
 
typedef SectionFlags
 
 SectionIncludeLeadingSep
 
 SectionIncludeTrailingSep
 
 SectionSkipEmpty
 
typedef size_type
 
 SkipEmptyParts
 
typedef value_type
 

Detailed Description

A helper class derived from QString to conveniently read HTML files, replace translatable texts and replace parameter tags.

An extra collection of static methods provide convenience in using core html pages and other items.

Constructor & Destructor Documentation

◆ BpsMdeHtml() [1/3]

BpsMdeHtml::BpsMdeHtml ( const QString aString)

Construct a HTML object from a QString.

Parameters
aStringThe string to use.

◆ BpsMdeHtml() [2/3]

BpsMdeHtml::BpsMdeHtml ( const char *  aFile)

Construct by reading the HTML template from a file.

Parameters
aFileThe file name to read from.

◆ BpsMdeHtml() [3/3]

BpsMdeHtml::BpsMdeHtml ( const QByteArray aFile)

Construct by reading the HTML template from a file.

Parameters
aFileThe file name to read from.

Member Function Documentation

◆ dialogTags()

static QString BpsMdeHtml::dialogTags ( BpsMdeSession aSession)
static

Return the browser specific header tags for a regular dialog page.

Parameters
aSessionThe session handled.
Returns
The header tags (meta commands).

◆ errorPage()

static void BpsMdeHtml::errorPage ( BpsMdeRequest aRequest,
BpsMdeSession aSession,
const QString aTitle,
const QString aMessage,
const QString aUrl = QString() 
)
static

Shows the standard error page of the MDE server.

Parameters
aRequestThe request handled.
aSessionThe session handled.
aTitleThe page title.
aMessageThe error message.
aUrlThe URL (local page) to call after confirmation.

◆ escapeHtml()

static QString BpsMdeHtml::escapeHtml ( const QString aText)
static

Escapes special chars by their html entity: less than, greater than, ampersand.

Parameters
aTextThe text maybe holding special chars with html markup meaning.
Returns
The text with the problematic characters escaped.

◆ fromHtml()

static QString BpsMdeHtml::fromHtml ( const QString aText)
static

Convert a HTML to normal text.

Parameters
aTextThe HTML text.
Returns
The normal code.

◆ menuPage()

static void BpsMdeHtml::menuPage ( BpsMdeRequest aRequest,
BpsMdeSession aSession,
const QString aTitle,
const QList< BpsMdeApplication * > &  aApplications 
)
static

Shows a standard menu page of the MDE server.

Only applications with non-empty text and icon, and having access are taken into the menu. The menu is first populated with the applications having a fixed position, and then filled up with the others. The applications with not fixed position are ordered by text() ascending (case-insensitive compare).

Parameters
aRequestThe request handled.
aSessionThe session handled.
aTitleA page title (sent in HTML header only).
aApplicationsThe list of applications as source.

◆ menuTags()

static QString BpsMdeHtml::menuTags ( BpsMdeSession aSession)
static

Return the browser specific header tags for a menu page.

Parameters
aSessionThe session handled.
Returns
The header tags (meta commands).

◆ nbsp()

static QString BpsMdeHtml::nbsp ( )
static
Returns
The HTML entity for non breaking space.

◆ prevNextTags()

static QString BpsMdeHtml::prevNextTags ( BpsMdeSession aSession)
static

Return the browser specific header tags for a dialog page with previous/next buttons.

Parameters
aSessionThe session handled.
Returns
The header tags (meta commands).

◆ quitTags()

static QString BpsMdeHtml::quitTags ( BpsMdeSession aSession)
static

Return the browser specific header tags for the quit page.

Parameters
aSessionThe session handled.
Returns
The header tags (meta commands).

◆ set() [1/5]

BpsMdeHtml BpsMdeHtml::set ( const QString aTag,
bool  aValue 
)

Replace parameter tags marked in the HTML with {{aTag}} by another value.

Parameters
aTagThe template tag, without the curly braces.
aValueThe value to insert instead of the tag (true="1", false="0").
Returns
Reference to this object.

◆ set() [2/5]

BpsMdeHtml BpsMdeHtml::set ( const QString aTag,
const QString aValue 
)

Replace parameter tags marked in the HTML with {{aTag}} by another value.

Basically this does exactly what trn() does, only with curly braces in place of square brackets.

Parameters
aTagThe template tag, without the curly braces.
aValueThe value to insert instead of the tag.
Returns
Reference to this object.

◆ set() [3/5]

BpsMdeHtml BpsMdeHtml::set ( const QString aTag,
int  aValue 
)

Replace parameter tags marked in the HTML with {{aTag}} by another value.

Parameters
aTagThe template tag, without the curly braces.
aValueThe value to insert instead of the tag.
Returns
Reference to this object.

◆ set() [4/5]

BpsMdeHtml BpsMdeHtml::set ( const QString aTag,
qlonglong  aValue 
)

Replace parameter tags marked in the HTML with {{aTag}} by another value.

Parameters
aTagThe template tag, without the curly braces.
aValueThe value to insert instead of the tag.
Returns
Reference to this object.

◆ set() [5/5]

BpsMdeHtml BpsMdeHtml::set ( const QString aTag,
qulonglong  aValue 
)

Replace parameter tags marked in the HTML with {{aTag}} by another value.

Parameters
aTagThe template tag, without the curly braces.
aValueThe value to insert instead of the tag.
Returns
Reference to this object.

◆ setInputTypes()

BpsMdeHtml BpsMdeHtml::setInputTypes ( BpsMdeSession aSession)

Replace input type tags by the approptiate HTML input type:

TagDescriptionHTML4HTML5
{{itp_int}}Integer numbertextnumber
{{itp_date}}Datetexttel
{{itp_dec}}Decimal (real) numbertextnumber
{{itp_pin}}PINpasswordnumber
{{itp_artid}}Article IDtexttext or tel (*)
{{itp_lotid}}Lot IDtexttext or tel (*)
{{itp_pnrid}}Partner IDtexttext or tel (*)
{{itp_slcid}}Stock Location IDtexttext or tel (*)

(*) Depending on validator mask.

Parameters
aSessionThe session handled.
Returns
Reference to this object.

◆ toHtml()

static QString BpsMdeHtml::toHtml ( const QString aText)
static

Convert a normal text to HTML.

Newlines get replaced by BR tags, ampersands are replaced by the html entity.

Parameters
aTextThe regular text.
Returns
The HTML code.

◆ trn()

BpsMdeHtml BpsMdeHtml::trn ( const QString aText,
const QString aTranslated 
)

Replace translation texts marked in the HTML with [[aText]] by a translated text.

Basically this does exactly what set() does, only with square brackets in place of curly braces.

Parameters
aTextThe template text, without the brackets.
aTranslatedThe translated text be inserted instead of the template text replace.
Returns
Reference to this object.

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