Link against: avkon.lib eikcoctl.lib eikctl.lib form.lib uiklaf.lib
None
#include <EIKFPNE.H>
Inherits CAknNumericEdwin.
A fixed number of decimal places is permitted, set by API. Exponential notation is not permitted.
Validation, consisting of a check that the contents are parsable as a number (using TLex::Val()) and a range check, is carried out when PrepareForFocusLossL is called. Invalid contents cause a leave of that method.
Value() only returns a value corresponding reliably to the value in the editor after a non-leaving call to PrepareForFocusLossL.
All values, defaults, minima and maxima set by API or resource are TInts. The Real value is obtained by dividing by 10^<number of="" decimal="" places>="">
The number of characters in the editor is calculated from the number of allowed decimal places. TODO but there is a bug - cannot handle + or - signs in front, nor missing leading 0s before the decimal place.
Public Member Functions |
|
IMPORT_C | CEikFixedPointEditor () |
C++ constructor. |
|
IMPORT_C void | ConstructL (TInt aMin, TInt aMax) |
2nd stage Constructor |
|
IMPORT_C TInt | Value () const |
Access the value in the editor. |
|
IMPORT_C TValidationStatus | GetValueAsInteger (TInt &aValue) |
Read out the value from the editor as a integer. |
|
IMPORT_C void | SetValueL (const TInt *aValue) |
Set the value in the editor. |
|
IMPORT_C void | SetMinMax (TInt aMin, TInt aMax) |
Set minimum and maximum valid values. |
|
IMPORT_C void | GetMinMax (TInt &aMin, TInt &aMax) const |
Get minimum and maximum valid values. |
|
IMPORT_C void | SetDecimalPlaces (TInt aDecimalPlaces) |
This sets the number of allowed decimal places in the displayed text. |
|
IMPORT_C TInt | DecimalPlaces () const |
This returns the number of allowed decimal places in the displayed text. |
|
virtual IMPORT_C void | ConstructFromResourceL (TResourceReader &aReader) |
From resource constructor. |
|
virtual IMPORT_C void | PrepareForFocusLossL () |
Called by framework when focus is being taken off editor. |
|
virtual IMPORT_C TCoeInputCapabilities | InputCapabilities () const |
Sets the input capabilities of the editor. |
|
virtual IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
Specific Key handling for numeric editor. |
|
virtual IMPORT_C void | HandleResourceChange (TInt aType) |
Update contents of editor on certain resource change events. |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl. |
|
C++ constructor. |
|
From resource constructor. Refer to eikon.rh for the FIXPTED resource structure
Reimplemented from CEikEdwin. |
|
2nd stage Constructor |
|
This returns the number of allowed decimal places in the displayed text. The number is that used to set the power of 10 by which all integer values in the API are divided by before use, and the power of 10 by which all displayed values are multiplied by when turning them into integers.
|
|
Get minimum and maximum valid values.
|
|
Read out the value from the editor as a integer.
|
|
From CCoeControl. Handles pointer events
Reimplemented from CAknNumericEdwin. |
|
Update contents of editor on certain resource change events. Reimplemented from CEikEdwin. |
|
Sets the input capabilities of the editor. Reimplemented from CEikEdwin. |
|
Specific Key handling for numeric editor. Reimplemented from CEikEdwin. |
|
Called by framework when focus is being taken off editor. May be called by client code. |
|
This sets the number of allowed decimal places in the displayed text. The number is also used to set the power of 10 by which all integer values in the API are divided by before use, and the power of 10 by which all displayed values are multiplied by when turning them into integers.
|
|
Set minimum and maximum valid values.
|
|
Set the value in the editor. The passed value is divided by 10^(decimal places) before formatting to text in the editor.
|
|
Access the value in the editor. The returned value is multiplied by 10^(decimal places) before formatting to text in the editor. The value is reliable only immediately after setting and after a non-leaving call to PrepareForFocusLossL
|