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 (long value, FormatType fmt, bool alwaysSigned, const QString ¤cySymbol) |
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
|
copnstructor
Definition at line 37 of file valueformatter.cc. |
Member Function Documentation
|
create a number format
Definition at line 244 of file valueformatter.cc. |
|
create a date format
Definition at line 536 of file valueformatter.cc. |
|
determine the formatting type that should be used to format this value in a cell with a given format type
Definition at line 140 of file valueformatter.cc. |
|
create a text representation of data in this Value
Definition at line 61 of file valueformatter.cc. |
|
create a text representation of data in this cell
Definition at line 41 of file valueformatter.cc. |
|
create a fraction format
Definition at line 341 of file valueformatter.cc. |
|
Remove trailing zeros and the decimal point if necessary unless the number has no decimal point.
Definition at line 209 of file valueformatter.cc. |
|
create a time format
Definition at line 462 of file valueformatter.cc. |
The documentation for this class was generated from the following files: