Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SHGAPI.H
Link against: sheng.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class TShgNumberFormat

class TShgNumberFormat;

Description

Defines number formats for formatting numeric cells.

A format is got/set through CShgCellAdditionalData.

Members

Defined in TShgNumberFormat:
ECurrency, EDateDM, EDateDMmm, EDateDMmmYy, EDateDdMmYy, EDateDdMmYy12a, EDateDdMmYy24, EDateDdMmmYy, EDateMD, EDateMmDdYy, EDateMmDdYy12a, EDateMmDdYy24, EDateMmm, EDateMmmYy, EDateMmmmm, EDateMmmmmDYyyy, EDateMmmmmYy, EDateYyMmDd, EDateYyMmDd12a, EDateYyMmDd24, EDefaultDecimalPlaces, EDefaultFormat, EEndOfFormatsWithDecimalPlaces, EFirst, EFixed, EGeneral, ELast, EPercent, EScientific, EStartOfFormatsInferrableFromText, EStartOfFormatsWithDecimalPlaces, EText, ETime12a, ETime12sa, ETime24, ETime24s, ETriad, ETrueFalse, ExternalizeL(), InternalizeL(), TFormat, TShgNumberFormat(), TShgNumberFormat(), anonymous, iDecimalPlaces, iFormat, operator==()


Construction and destruction


TShgNumberFormat()

IMPORT_C TShgNumberFormat();

Description

Default constructor.

Default format is EGeneral, with 2 decimal places.


TShgNumberFormat()

IMPORT_C TShgNumberFormat(const TShgNumberFormat &aNumberFormat);

Description

Copy constructor.

Parameters

const TShgNumberFormat &aNumberFormat

Object to copy

[Top]


Member functions


operator==()

IMPORT_C TBool operator==(const TShgNumberFormat &aNumberFormat) const;

Description

Equality operator.

Parameters

const TShgNumberFormat &aNumberFormat

Object to compare

Return value

TBool

True if the object settings are equal, else false


InternalizeL()

IMPORT_C void InternalizeL(RReadStream &aReadStream);

Description

Internalises the object.

Parameters

RReadStream &aReadStream

Stream to read from


ExternalizeL()

IMPORT_C void ExternalizeL(RWriteStream &aWriteStream) const;

Description

Externalises the object.

Parameters

RWriteStream &aWriteStream

Stream to write to

[Top]


Member enumerations


Enum TFormat

TFormat

Description

Number formats.

EFirst

Indicates the beginning of the enumeration.

EGeneral

This displays numbers in standard notation, with decimal places if required. It aligns text to the left side of a cell, and numbers to the right.

EStartOfFormatsWithDecimalPlaces

Indicates the beginning of the enumerators for formats for which the number of decimal places can be specified.

EFixed

This displays numbers with a specified number of decimal places.

EScientific

This displays values as a single digit to the left of the decimal point, a specified number of decimal places, and then an exponent, e.g. 1.50E+06.

ECurrency

This prefixes numbers with a chosen currency sign.

EPercent

This displays numbers as percentages with a sign after them. 1 is taken to be 100%, so 0.45 will be displayed as 45%.

ETriad

This splits long numbers before the decimal point into groups of 3 digits, e.g. 3,000,000.

EEndOfFormatsWithDecimalPlaces

Indicates the end of the enumerators for formats for which the number of decimal places can be specified.

ETrueFalse

A value of 0 will be displayed as FALSE, while all other values are displayed as TRUE.

EText

Treats all information as text.

EStartOfFormatsInferrableFromText

Indicates the beginning of the enumerators for formats parseable from text.

EDateDM

Date format: dd/mm.

EDateMD

Date format: mm/dd.

EDateDdMmYy

Date format: dd/mm/yy.

EDateMmDdYy

Date format: mm/dd/yy.

EDateYyMmDd

Date format: yy/mm/dd.

EDateDMmm

Date format: dd abbreviated-month-name.

EDateDMmmYy

Date format: d abbreviated-month-name yy.

EDateDdMmmYy

Date format: dd abbreviated-month-name yy.

EDateMmm

Date format: abbreviated-month-name.

EDateMmmmm

Date format: full-month-name.

EDateMmmYy

Date format: abbreviated-month-name yy.

EDateMmmmmYy

Date format: full-month-name yy.

EDateMmmmmDYyyy

Date format: full-month-name dd yyyy.

EDateDdMmYy12a

Time/date format: dd/mm/yy 12-hour-time-format.

EDateDdMmYy24

Time/date format: dd/mm/yy 24-hour-time-format.

EDateMmDdYy12a

Time/date format: mm/dd/yy 12-hour-time-format.

EDateMmDdYy24

Time/date format: mm/dd/yy 24-hour-time-format.

EDateYyMmDd12a

Time/date format: yy/mm/dd 12-hour-time-format.

EDateYyMmDd24

Time/date format: yy/mm/dd 12-hour-time-format.

ETime12a

Time format: 12-hour-time-format.

ETime12sa

Time format: 12-hour-time-format, including seconds.

ETime24

Time format: 24-hour-time-format.

ETime24s

Time format: 24-hour-time-format, including seconds.

ELast

Indicates the end of the enumerators.

EDefaultFormat

Default format, EGeneral.


Enum anonymous

n/a

Description

Constant definition.

EDefaultDecimalPlaces

Default number of decimal places to show.

[Top]


Member data


iFormat

TFormat iFormat;

Description

Number format.


iDecimalPlaces

TInt iDecimalPlaces;

Description

Number of decimal places to show.