MagicSmoke
$VERSION$
|
#include "misc.h"
#include <TimeStamp>
#include <math.h>
#include "MOServerFormat"
#include <QCoreApplication>
#include <QDateTime>
#include <QSettings>
#include <QFileInfo>
#include <QDir>
#include <SharedDPtr>
Classes | |
class | MLocalFormat::Private |
Functions | |
QString | cent2str (qint64 c, bool localize) |
converts a cent value into a (localized) string More... | |
QString | currentDir () |
returns the current directory (the one last used in a file dialog) More... | |
DEFINE_SHARED_DPTR (MLocalFormat) | |
QString | htmlize (QString str) |
converts special HTML characters into harmless &-codes, so the text can be included More... | |
QRegExp | priceRegExp (bool localize) |
return a (localized) regular expression that validates prices More... | |
void | setCurrentDir (QString fn) |
sets a new current directory (transparently handles files and directories) More... | |
qint64 | str2cent (QString s, bool localize) |
converts a (localized) string back into a cent value (must not contain spaces or extra dots) More... | |
QString | unix2date (qint64 tm, bool localize) |
converts a unix timestamp into a date More... | |
QString | unix2dateTime (qint64 tm, bool localize) |
converts a unix timestamp into a date-time-string More... | |
QString | unix2time (qint64 tm, bool localize) |
converts a unix timestamp into a time (ommitting the date) More... | |
QString | xmlize (QString str, QString newline) |
converts special XML characters into harmless &-codes, so the text can be included More... | |
QByteArray | xmlize (QByteArray str, QString newline) |
converts special XML characters into harmless &-codes, so the text can be included More... | |
QString cent2str | ( | qint64 | c, |
bool | localize | ||
) |
converts a cent value into a (localized) string
References MLocalFormat::formatMoney(), and MLocalFormat::setNonLocalized().
Referenced by MOOrderInfo::amountDueString(), MOOrderInfo::amountPaidString(), MOOrder::amountPaidString(), MOOrder::amountToPayStr(), MOOrder::amountToRefundStr(), MOverview::deductVoucher(), MTELabel::getVariable(), MCentSpinBox::MCentSpinBox(), MElamEngine::MElamEngine(), MEventSummary::MEventSummary(), MOVoucher::priceString(), MOTicket::priceString(), MTEExampleDelegate::setModelData(), MCentSpinBox::setValue(), toMoneyFunc(), MOOrderInfo::totalPriceString(), MOOrder::totalPriceString(), and MOVoucher::valueString().
QString currentDir | ( | ) |
returns the current directory (the one last used in a file dialog)
Referenced by MTicketEditor::openFile(), MOdfEditor::openFile(), and printOfficeFile().
DEFINE_SHARED_DPTR | ( | MLocalFormat | ) |
QString htmlize | ( | QString | str | ) |
converts special HTML characters into harmless &-codes, so the text can be included
Referenced by MEventSummary::MEventSummary(), toError(), and MApplication::versionDlg().
QRegExp priceRegExp | ( | bool | localize | ) |
return a (localized) regular expression that validates prices
References MLocalFormat::moneyRegExp(), and MLocalFormat::setNonLocalized().
void setCurrentDir | ( | QString | fn | ) |
sets a new current directory (transparently handles files and directories)
Referenced by MTicketEditor::openFile(), MOdfEditor::openFile(), printOfficeFile(), MTicketEditor::saveFileAs(), and MOdfEditor::saveFileAs().
qint64 str2cent | ( | QString | s, |
bool | localize | ||
) |
converts a (localized) string back into a cent value (must not contain spaces or extra dots)
References MLocalFormat::scanMoney(), and MLocalFormat::setNonLocalized().
Referenced by fromMoneyFunc(), MTELabel::getVariable(), MElamEngine::MElamEngine(), and MTEExampleDelegate::setEditorData().
QString unix2date | ( | qint64 | tm, |
bool | localize | ||
) |
converts a unix timestamp into a date
References MLocalFormat::formatDate(), and MLocalFormat::setNonLocalized().
Referenced by unix2DTFunc(), and MOVoucher::validDate().
QString unix2dateTime | ( | qint64 | tm, |
bool | localize | ||
) |
converts a unix timestamp into a date-time-string
References MLocalFormat::formatDateTime(), and MLocalFormat::setNonLocalized().
Referenced by MTELabel::getVariable(), MUserAuditDialog::MUserAuditDialog(), MOrderAuditDialog::openTicketAuditDialog(), MOrderAuditDialog::openVoucherAuditDialog(), and unix2DTFunc().
QString unix2time | ( | qint64 | tm, |
bool | localize | ||
) |
converts a unix timestamp into a time (ommitting the date)
References MLocalFormat::formatTime(), and MLocalFormat::setNonLocalized().
Referenced by unix2DTFunc().
QString xmlize | ( | QString | str, |
QString | newline | ||
) |
converts special XML characters into harmless &-codes, so the text can be included
Referenced by MOdtRenderer::convertV1toV2().
QByteArray xmlize | ( | QByteArray | str, |
QString | newline | ||
) |
converts special XML characters into harmless &-codes, so the text can be included