MagicSmoke
$VERSION$
|
Transport class for server formatting settings. This is used by both UIs to format numbers, dates, money, etc. The XML version of it is stored in the template directory, distributed between main and language dependent directory. More...
#include <srcMOServerFormat.h>
Public Types | |
enum | MoneyPos { NoSign =0, SignBeforeNum =1, SignAfterNum =2, SignBeforeSym =3, SignAfterSym =4, SignParen =5 } |
Position of the money sign in relation to number and currency symbol. More... | |
Public Member Functions | |
MOServerFormat () | |
default constructor: constructs an invalid instance of MOServerFormat More... | |
MOServerFormat (const MOServerFormat &) | |
copy constructor: creates a (deep) copy of the object More... | |
MOServerFormat (const QDomElement &) | |
special constructor: create from the XML representation, deserializing the object More... | |
virtual | ~MOServerFormat () |
destructor: deletes this copy of the object More... | |
virtual void | addmonths (Nullable< QString > a) |
virtual void | addshortmonths (Nullable< QString > a) |
virtual void | addshortweekdays (Nullable< QString > a) |
virtual void | addweekdays (Nullable< QString > a) |
virtual Nullable< QString > | amtext () const |
The text for AM in time stamps. More... | |
virtual void | clearmonths () |
virtual void | clearshortmonths () |
virtual void | clearshortweekdays () |
virtual void | clearweekdays () |
virtual Nullable< QString > | currencysymbol () const |
The currency used. More... | |
virtual Nullable< QString > | currencysymbolhtml () const |
The currency used in HTML notation. More... | |
virtual Nullable< QString > | currencysymbolplain () const |
The currency used in ASCII notation. More... | |
virtual Nullable< bool > | currencysymbolpos () const |
Where the currency symbol is found: false: before the number, true: behind the number. More... | |
virtual Nullable< QString > | dateformat () const |
The default format for dates, see the docu of MLocalFormat (Qt side) and LanguageManager (PHP side) for details. More... | |
virtual Nullable< QString > | datetimeformat () const |
The default format for date and time. More... | |
virtual Nullable< QString > | decimaldot () const |
The decimal dot for numbers. More... | |
virtual Nullable< qint64 > | moneydecimals () const |
The amount of decimals for money values - this must be the same for all languages on a server, the default is 2. More... | |
virtual Nullable< QString > | moneynegative () const |
Zero to three characters: for negative money values the first one is placed in front of the money value and the second one behind the money value. More... | |
virtual Nullable< MoneyPos > | moneynegativepos () const |
position of the negative money sign More... | |
virtual Nullable< QString > | moneypositive () const |
Zero to three characters: for positive money values the first one is placed in front of the money value and the second one behind the money value. More... | |
virtual Nullable< MoneyPos > | moneypositivepos () const |
position of the positive money sign More... | |
virtual QList< QString > | months () const |
The list of month names. More... | |
MOServerFormat & | operator= (const MOServerFormat &) |
copy assignment: creates a (deep) copy of the object More... | |
virtual Nullable< QString > | pmtext () const |
The text for PM in time stamps. More... | |
Q_ENUMS (MoneyPos) | |
virtual void | setamtext (Nullable< QString > s) |
The text for AM in time stamps. More... | |
virtual void | setcurrencysymbol (Nullable< QString > s) |
The currency used. More... | |
virtual void | setcurrencysymbolhtml (Nullable< QString > s) |
The currency used in HTML notation. More... | |
virtual void | setcurrencysymbolplain (Nullable< QString > s) |
The currency used in ASCII notation. More... | |
virtual void | setcurrencysymbolpos (Nullable< bool > s) |
Where the currency symbol is found: false: before the number, true: behind the number. More... | |
virtual void | setdateformat (Nullable< QString > s) |
The default format for dates, see the docu of MLocalFormat (Qt side) and LanguageManager (PHP side) for details. More... | |
virtual void | setdatetimeformat (Nullable< QString > s) |
The default format for date and time. More... | |
virtual void | setdecimaldot (Nullable< QString > s) |
The decimal dot for numbers. More... | |
virtual void | setmoneydecimals (Nullable< qint64 > s) |
The amount of decimals for money values - this must be the same for all languages on a server, the default is 2. More... | |
virtual void | setmoneynegative (Nullable< QString > s) |
Zero to three characters: for negative money values the first one is placed in front of the money value and the second one behind the money value. More... | |
virtual void | setmoneynegativepos (Nullable< MoneyPos > s) |
position of the negative money sign More... | |
virtual void | setmoneypositive (Nullable< QString > s) |
Zero to three characters: for positive money values the first one is placed in front of the money value and the second one behind the money value. More... | |
virtual void | setmoneypositivepos (Nullable< MoneyPos > s) |
position of the positive money sign More... | |
virtual void | setmonths (QList< QString > s) |
The list of month names. More... | |
virtual void | setpmtext (Nullable< QString > s) |
The text for PM in time stamps. More... | |
virtual void | setshortmonths (QList< QString > s) |
The list of abbreviated month names. More... | |
virtual void | setshortweekdays (QList< QString > s) |
The list of abbreviated week day names, starting with monday. More... | |
virtual void | setthousanddigits (Nullable< qint64 > s) |
The amount of digits between thousand separators, 0 for no thousand separator. More... | |
virtual void | setthousandseparator (Nullable< QString > s) |
The thousand separator for numbers, if it is a space the Web UI will actually use to prevent breaking the number. More... | |
virtual void | settimeformat (Nullable< QString > s) |
The default format for time. More... | |
virtual void | settimezone (Nullable< QString > s) |
Olsen database time zone name. More... | |
virtual void | setweekdays (QList< QString > s) |
The list of week day names, starting with monday. More... | |
virtual QList< QString > | shortmonths () const |
The list of abbreviated month names. More... | |
virtual QList< QString > | shortweekdays () const |
The list of abbreviated week day names, starting with monday. More... | |
virtual Nullable< qint64 > | thousanddigits () const |
The amount of digits between thousand separators, 0 for no thousand separator. More... | |
virtual Nullable< QString > | thousandseparator () const |
The thousand separator for numbers, if it is a space the Web UI will actually use to prevent breaking the number. More... | |
virtual Nullable< QString > | timeformat () const |
The default format for time. More... | |
virtual Nullable< QString > | timezone () const |
Olsen database time zone name. More... | |
QString | toString () |
Serializes the object to XML and returns the string representation of that XML. More... | |
QDomElement | toXml (QDomDocument &doc, QString name="ServerFormat") |
Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself. More... | |
void | toXml (QDomDocument &, QDomElement &) |
Serializes the object into the given element. More... | |
virtual QList< QString > | weekdays () const |
The list of week day names, starting with monday. More... | |
Static Public Member Functions | |
static MOServerFormat | fromString (const QString &) |
create MOServerFormat from XML formatted string (inverse of toString) More... | |
static MOServerFormat | fromXml (const QDomElement &) |
create MOServerFormat from XML (inverse of toXml) More... | |
static MoneyPos | locstr2MoneyPos (QString, bool *ok=0) |
Converts a localized string into the corresponding enum MoneyPos value. More... | |
static QString | MoneyPos2locstr (MoneyPos) |
Converts enum MoneyPos value into the corresponding localized string. More... | |
static QString | MoneyPos2str (MoneyPos) |
Converts enum MoneyPos value into the corresponding string. More... | |
static MoneyPos | str2MoneyPos (QString, bool *ok=0) |
Converts string into the corresponding enum MoneyPos value. More... | |
Protected Attributes | |
Nullable< QString > | mp_amtext |
Nullable< QString > | mp_currencysymbol |
Nullable< QString > | mp_currencysymbolhtml |
Nullable< QString > | mp_currencysymbolplain |
Nullable< bool > | mp_currencysymbolpos |
Nullable< QString > | mp_dateformat |
Nullable< QString > | mp_datetimeformat |
Nullable< QString > | mp_decimaldot |
Nullable< qint64 > | mp_moneydecimals |
Nullable< QString > | mp_moneynegative |
Nullable< MoneyPos > | mp_moneynegativepos |
Nullable< QString > | mp_moneypositive |
Nullable< MoneyPos > | mp_moneypositivepos |
QList< QString > | mp_months |
Nullable< QString > | mp_pmtext |
QList< QString > | mp_shortmonths |
QList< QString > | mp_shortweekdays |
Nullable< qint64 > | mp_thousanddigits |
Nullable< QString > | mp_thousandseparator |
Nullable< QString > | mp_timeformat |
Nullable< QString > | mp_timezone |
QList< QString > | mp_weekdays |
Properties | |
Nullable< QString > | amtext |
The text for AM in time stamps. More... | |
Nullable< QString > | currencysymbol |
The currency used. More... | |
Nullable< QString > | currencysymbolhtml |
The currency used in HTML notation. More... | |
Nullable< QString > | currencysymbolplain |
The currency used in ASCII notation. More... | |
Nullable< bool > | currencysymbolpos |
Where the currency symbol is found: false: before the number, true: behind the number. More... | |
Nullable< QString > | dateformat |
The default format for dates, see the docu of MLocalFormat (Qt side) and LanguageManager (PHP side) for details. More... | |
Nullable< QString > | datetimeformat |
The default format for date and time. More... | |
Nullable< QString > | decimaldot |
The decimal dot for numbers. More... | |
Nullable< qint64 > | moneydecimals |
The amount of decimals for money values - this must be the same for all languages on a server, the default is 2. More... | |
Nullable< QString > | moneynegative |
Zero to three characters: for negative money values the first one is placed in front of the money value and the second one behind the money value. More... | |
Nullable< MoneyPos > | moneynegativepos |
position of the negative money sign More... | |
Nullable< QString > | moneypositive |
Zero to three characters: for positive money values the first one is placed in front of the money value and the second one behind the money value. More... | |
Nullable< MoneyPos > | moneypositivepos |
position of the positive money sign More... | |
QList< QString > | months |
The list of month names. More... | |
Nullable< QString > | pmtext |
The text for PM in time stamps. More... | |
QList< QString > | shortmonths |
The list of abbreviated month names. More... | |
QList< QString > | shortweekdays |
The list of abbreviated week day names, starting with monday. More... | |
Nullable< qint64 > | thousanddigits |
The amount of digits between thousand separators, 0 for no thousand separator. More... | |
Nullable< QString > | thousandseparator |
The thousand separator for numbers, if it is a space the Web UI will actually use to prevent breaking the number. More... | |
Nullable< QString > | timeformat |
The default format for time. More... | |
Nullable< QString > | timezone |
Olsen database time zone name. More... | |
QList< QString > | weekdays |
The list of week day names, starting with monday. More... | |
Transport class for server formatting settings. This is used by both UIs to format numbers, dates, money, etc. The XML version of it is stored in the template directory, distributed between main and language dependent directory.
Position of the money sign in relation to number and currency symbol.
|
inline |
default constructor: constructs an invalid instance of MOServerFormat
Referenced by fromString(), and fromXml().
MOServerFormat::MOServerFormat | ( | const MOServerFormat & | o | ) |
copy constructor: creates a (deep) copy of the object
References mp_amtext, mp_currencysymbol, mp_currencysymbolhtml, mp_currencysymbolplain, mp_currencysymbolpos, mp_dateformat, mp_datetimeformat, mp_decimaldot, mp_moneydecimals, mp_moneynegative, mp_moneynegativepos, mp_moneypositive, mp_moneypositivepos, mp_months, mp_pmtext, mp_shortmonths, mp_shortweekdays, mp_thousanddigits, mp_thousandseparator, mp_timeformat, mp_timezone, and mp_weekdays.
|
explicit |
special constructor: create from the XML representation, deserializing the object
References addmonths(), addshortmonths(), addshortweekdays(), addweekdays(), setamtext(), setcurrencysymbol(), setcurrencysymbolhtml(), setcurrencysymbolplain(), setcurrencysymbolpos(), setdateformat(), setdatetimeformat(), setdecimaldot(), setmoneydecimals(), setmoneynegative(), setmoneynegativepos(), setmoneypositive(), setmoneypositivepos(), setpmtext(), setthousanddigits(), setthousandseparator(), settimeformat(), settimezone(), and str2MoneyPos().
|
inlinevirtual |
destructor: deletes this copy of the object
|
inlinevirtual |
Referenced by MOServerFormat().
|
inlinevirtual |
Referenced by MOServerFormat().
|
inlinevirtual |
Referenced by MOServerFormat().
|
inlinevirtual |
Referenced by MOServerFormat().
|
inlinevirtual |
The text for AM in time stamps.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
The currency used.
|
inlinevirtual |
The currency used in HTML notation.
|
inlinevirtual |
The currency used in ASCII notation.
|
inlinevirtual |
Where the currency symbol is found: false: before the number, true: behind the number.
|
inlinevirtual |
The default format for dates, see the docu of MLocalFormat (Qt side) and LanguageManager (PHP side) for details.
|
inlinevirtual |
The default format for date and time.
|
inlinevirtual |
The decimal dot for numbers.
|
static |
create MOServerFormat from XML formatted string (inverse of toString)
References MOServerFormat().
|
static |
create MOServerFormat from XML (inverse of toXml)
References MOServerFormat().
|
static |
Converts a localized string into the corresponding enum MoneyPos value.
References NoSign, SignAfterNum, SignAfterSym, SignBeforeNum, SignBeforeSym, and SignParen.
|
inlinevirtual |
The amount of decimals for money values - this must be the same for all languages on a server, the default is 2.
|
inlinevirtual |
Zero to three characters: for negative money values the first one is placed in front of the money value and the second one behind the money value.
|
inlinevirtual |
position of the negative money sign
|
static |
Converts enum MoneyPos value into the corresponding localized string.
References NoSign, SignAfterNum, SignAfterSym, SignBeforeNum, SignBeforeSym, and SignParen.
|
static |
Converts enum MoneyPos value into the corresponding string.
References NoSign, SignAfterNum, SignAfterSym, SignBeforeNum, SignBeforeSym, and SignParen.
|
inlinevirtual |
Zero to three characters: for positive money values the first one is placed in front of the money value and the second one behind the money value.
|
inlinevirtual |
position of the positive money sign
|
inlinevirtual |
The list of month names.
MOServerFormat & MOServerFormat::operator= | ( | const MOServerFormat & | o | ) |
copy assignment: creates a (deep) copy of the object
References mp_amtext, mp_currencysymbol, mp_currencysymbolhtml, mp_currencysymbolplain, mp_currencysymbolpos, mp_dateformat, mp_datetimeformat, mp_decimaldot, mp_moneydecimals, mp_moneynegative, mp_moneynegativepos, mp_moneypositive, mp_moneypositivepos, mp_months, mp_pmtext, mp_shortmonths, mp_shortweekdays, mp_thousanddigits, mp_thousandseparator, mp_timeformat, mp_timezone, and mp_weekdays.
|
inlinevirtual |
The text for PM in time stamps.
MOServerFormat::Q_ENUMS | ( | MoneyPos | ) |
|
inlinevirtual |
The text for AM in time stamps.
Referenced by MOServerFormat().
|
inlinevirtual |
The currency used.
Referenced by MOServerFormat().
|
inlinevirtual |
The currency used in HTML notation.
Referenced by MOServerFormat().
|
inlinevirtual |
The currency used in ASCII notation.
Referenced by MOServerFormat().
|
inlinevirtual |
Where the currency symbol is found: false: before the number, true: behind the number.
Referenced by MOServerFormat().
|
inlinevirtual |
The default format for dates, see the docu of MLocalFormat (Qt side) and LanguageManager (PHP side) for details.
Referenced by MOServerFormat().
|
inlinevirtual |
The default format for date and time.
Referenced by MOServerFormat().
|
inlinevirtual |
The decimal dot for numbers.
Referenced by MOServerFormat().
|
inlinevirtual |
The amount of decimals for money values - this must be the same for all languages on a server, the default is 2.
Referenced by MOServerFormat().
|
inlinevirtual |
Zero to three characters: for negative money values the first one is placed in front of the money value and the second one behind the money value.
Referenced by MOServerFormat().
|
inlinevirtual |
position of the negative money sign
Referenced by MOServerFormat().
|
inlinevirtual |
Zero to three characters: for positive money values the first one is placed in front of the money value and the second one behind the money value.
Referenced by MOServerFormat().
|
inlinevirtual |
position of the positive money sign
Referenced by MOServerFormat().
|
inlinevirtual |
The list of month names.
|
inlinevirtual |
The text for PM in time stamps.
Referenced by MOServerFormat().
|
inlinevirtual |
The list of abbreviated month names.
|
inlinevirtual |
The list of abbreviated week day names, starting with monday.
|
inlinevirtual |
The amount of digits between thousand separators, 0 for no thousand separator.
Referenced by MOServerFormat().
|
inlinevirtual |
The thousand separator for numbers, if it is a space the Web UI will actually use to prevent breaking the number.
Referenced by MOServerFormat().
|
inlinevirtual |
The default format for time.
Referenced by MOServerFormat().
|
inlinevirtual |
Olsen database time zone name.
Referenced by MOServerFormat().
|
inlinevirtual |
The list of week day names, starting with monday.
|
inlinevirtual |
The list of abbreviated month names.
|
inlinevirtual |
The list of abbreviated week day names, starting with monday.
|
static |
Converts string into the corresponding enum MoneyPos value.
References NoSign, SignAfterNum, SignAfterSym, SignBeforeNum, SignBeforeSym, and SignParen.
Referenced by MOServerFormat().
|
inlinevirtual |
The amount of digits between thousand separators, 0 for no thousand separator.
|
inlinevirtual |
The thousand separator for numbers, if it is a space the Web UI will actually use to prevent breaking the number.
|
inlinevirtual |
The default format for time.
|
inlinevirtual |
Olsen database time zone name.
QString MOServerFormat::toString | ( | ) |
Serializes the object to XML and returns the string representation of that XML.
References toXml().
QDomElement MOServerFormat::toXml | ( | QDomDocument & | doc, |
QString | name = "ServerFormat" |
||
) |
Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself.
doc | the DOM document node for which to generate the element |
name | the name to give the generated element, per default "MOServerFormat" is used |
Referenced by toString().
void MOServerFormat::toXml | ( | QDomDocument & | doc, |
QDomElement & | r | ||
) |
Serializes the object into the given element.
References mp_amtext, mp_currencysymbol, mp_currencysymbolhtml, mp_currencysymbolplain, mp_currencysymbolpos, mp_dateformat, mp_datetimeformat, mp_decimaldot, mp_moneydecimals, mp_moneynegative, mp_moneynegativepos, mp_moneypositive, mp_moneypositivepos, mp_months, mp_pmtext, mp_shortmonths, mp_shortweekdays, mp_thousanddigits, mp_thousandseparator, mp_timeformat, mp_timezone, and mp_weekdays.
|
inlinevirtual |
The list of week day names, starting with monday.
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
protected |
Referenced by MOServerFormat(), operator=(), and toXml().
|
readwrite |
The text for AM in time stamps.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The currency used.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The currency used in HTML notation.
|
readwrite |
The currency used in ASCII notation.
|
readwrite |
Where the currency symbol is found: false: before the number, true: behind the number.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The default format for dates, see the docu of MLocalFormat (Qt side) and LanguageManager (PHP side) for details.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The default format for date and time.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The decimal dot for numbers.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The amount of decimals for money values - this must be the same for all languages on a server, the default is 2.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
Zero to three characters: for negative money values the first one is placed in front of the money value and the second one behind the money value.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
position of the negative money sign
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
Zero to three characters: for positive money values the first one is placed in front of the money value and the second one behind the money value.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
position of the positive money sign
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The list of month names.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The text for PM in time stamps.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The list of abbreviated month names.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The list of abbreviated week day names, starting with monday.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The amount of digits between thousand separators, 0 for no thousand separator.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The thousand separator for numbers, if it is a space the Web UI will actually use to prevent breaking the number.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The default format for time.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
Olsen database time zone name.
Referenced by MLocalFormat::MLocalFormat().
|
readwrite |
The list of week day names, starting with monday.
Referenced by MLocalFormat::MLocalFormat().