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.
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.
|