kspread
KSpread::ValueFormatter Class Reference
#include <valueformatter.h>
Detailed Description
The ValueFormatter class generates a textual representation of data stored in a Value, with a given formatting.
Definition at line 38 of file valueformatter.h.
Public Member Functions | |
| ValueFormatter (ValueConverter *converter) | |
| QString | formatText (Cell *cell, FormatType fmtType) |
| QString | formatText (const Value &value, FormatType fmtType, int precision=-1, Format::FloatFormat floatFormat=Format::OnlyNegSigned, const QString &prefix=QString::null, const QString &postfix=QString::null, const QString ¤cySymbol=QString::null) |
| QString | dateFormat (const QDate &_date, FormatType fmtType) |
| QString | timeFormat (const QDateTime &_time, FormatType fmtType) |
Protected Member Functions | |
| FormatType | determineFormatting (const Value &value, FormatType fmtType) |
| QString | createNumberFormat (double value, int precision, FormatType fmt, bool alwaysSigned, const QString ¤cySymbol) |
| QString | fractionFormat (double value, FormatType fmtType) |
| QString | errorFormat (Cell *cell) |
| void | removeTrailingZeros (QString &str, QChar decimal_point) |
Protected Attributes | |
| ValueConverter * | converter |
Constructor & Destructor Documentation
| ValueFormatter::ValueFormatter | ( | ValueConverter * | converter | ) |
Member Function Documentation
| QString ValueFormatter::createNumberFormat | ( | double | value, | |
| int | precision, | |||
| FormatType | fmt, | |||
| bool | alwaysSigned, | |||
| const QString & | currencySymbol | |||
| ) | [protected] |
| QString ValueFormatter::dateFormat | ( | const QDate & | _date, | |
| FormatType | fmtType | |||
| ) |
| FormatType ValueFormatter::determineFormatting | ( | const Value & | value, | |
| FormatType | fmtType | |||
| ) | [protected] |
determine the formatting type that should be used to format this value in a cell with a given format type
Definition at line 133 of file valueformatter.cc.
| QString ValueFormatter::formatText | ( | const Value & | value, | |
| FormatType | fmtType, | |||
| int | precision = -1, |
|||
| Format::FloatFormat | floatFormat = Format::OnlyNegSigned, |
|||
| const QString & | prefix = QString::null, |
|||
| const QString & | postfix = QString::null, |
|||
| const QString & | currencySymbol = QString::null | |||
| ) |
| QString ValueFormatter::formatText | ( | Cell * | cell, | |
| FormatType | fmtType | |||
| ) |
| QString ValueFormatter::fractionFormat | ( | double | value, | |
| FormatType | fmtType | |||
| ) | [protected] |
| void ValueFormatter::removeTrailingZeros | ( | QString & | str, | |
| QChar | decimal_point | |||
| ) | [protected] |
Remove trailing zeros and the decimal point if necessary unless the number has no decimal point.
Definition at line 202 of file valueformatter.cc.
| QString ValueFormatter::timeFormat | ( | const QDateTime & | _time, | |
| FormatType | fmtType | |||
| ) |
The documentation for this class was generated from the following files:

