CEikMfneNumber Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib

Capability Information

Required Capabilities

None


#include <
eikmfne.h>

Inherits CEikMfneField.


Detailed Description

A number field within a multi-field numeric editor.

Public Types

enum  { EFillWithLeadingZeros = 0x1, EPreserveOldWidthBeforeEditing = 0x2, ERepresentsYear = 0x4, EPublicallySettableFlags = EFillWithLeadingZeros|EPreserveOldWidthBeforeEditing|ERepresentsYear }
 Flags for the number field. More...

Public Member Functions

virtual IMPORT_C ~CEikMfneNumber ()
 Destructor.
IMPORT_C void SetMinimumAndMaximum (TInt aMinimumValue, TInt aMaximumValue, const CFont &aFont)
 Sets the minimum and maximum allowable values.
IMPORT_C void GetMinimumAndMaximum (TInt &aMinimumValue, TInt &aMaximumValue) const
 Gets the minimum and maximum allowable values.
IMPORT_C void SetValue (TInt aValue, const CFont &aFont)
 Sets the field's current value.
IMPORT_C TInt Value () const
 Gets the number field's value.
virtual IMPORT_C TBool IsValid () const
 Returns ETrue if the field contains more than zero digits.
IMPORT_C void SetUninitialised (TBool aUninitialised)
 Sets the uninitialized status of the field.
IMPORT_C TBool IsUninitialised () const
 Gets the uninitialized status of the field.
IMPORT_C void SetDigitType (TDigitType aDigitType, const CFont &aFont)
 Sets the digit display type.
IMPORT_C TDigitType DigitType () const
 Gets the digit display type.
IMPORT_C void RefreshDigitType (const CFont &aFont)
 Derive and set digit display type from locale information.
void SetTrailingZeros ()
TBool IsTextNull () const

Static Public Member Functions

static IMPORT_C CEikMfneNumberNewL (const CFont &aFont, TResourceReader &aResourceReader)
 Allocates and constructs a CEikMfneNumber from resource.
static IMPORT_C CEikMfneNumberNewL (const CFont &aFont, TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue, TUint32 aFlags)
 Allocates and constructs a CEikMfneNumber with the specified parameters.

Member Enumeration Documentation

anonymous enum
 

Flags for the number field.

EFillWithLeadingZeros, EPreserveOldWidthBeforeEditing and ERepresentsYear can only be set if EPublicallySettableFlags is set.

Enumerator:
EFillWithLeadingZeros  Prepends the number field's value with leading zeros up to the maximum allowable width of the field.
EPreserveOldWidthBeforeEditing  The field's minimum width in pixels is set to the current text's width in pixels.
ERepresentsYear  The number is a year.
EPublicallySettableFlags  Used internally to make sure only the previous three values are set.

Constructor & Destructor Documentation

virtual IMPORT_C CEikMfneNumber::~CEikMfneNumber  )  [virtual]
 

Destructor.

Deletes the number field's text.


Member Function Documentation

IMPORT_C TDigitType CEikMfneNumber::DigitType  )  const
 

Gets the digit display type.

Returns:
The digit display type of this number field
IMPORT_C void CEikMfneNumber::GetMinimumAndMaximum TInt &  aMinimumValue,
TInt &  aMaximumValue
const
 

Gets the minimum and maximum allowable values.

Parameters:
aMinimumValue On return, the minimum allowable value.
aMaximumValue On return, the maximum allowable value.
TBool CEikMfneNumber::IsTextNull  )  const
 
IMPORT_C TBool CEikMfneNumber::IsUninitialised  )  const
 

Gets the uninitialized status of the field.

Returns:
ETrue, if the field is set as uninitialized.
virtual IMPORT_C TBool CEikMfneNumber::IsValid  )  const [virtual]
 

Returns ETrue if the field contains more than zero digits.

Returns:
ETrue if the field contains more than zero digits.

Reimplemented from CEikMfneField.

static IMPORT_C CEikMfneNumber* CEikMfneNumber::NewL const CFont &  aFont,
TInt  aMinimumValue,
TInt  aMaximumValue,
TInt  aInitialValue,
TUint32  aFlags
[static]
 

Allocates and constructs a CEikMfneNumber with the specified parameters.

Parameters:
aFont The font to use.
aMinimumValue The minimum value.
aMaximumValue The maximum value.
aInitialValue The initial value. This must be greater than the minimum value and less than the maximum value.
aFlags The number field's flags. See the Anonymous enum.
Returns:
A newly constructed number field.
Panic:
8 If the initial value is not greater than or equal to the minimum value and less than or equal to the maximum value.
static IMPORT_C CEikMfneNumber* CEikMfneNumber::NewL const CFont &  aFont,
TResourceReader &  aResourceReader
[static]
 

Allocates and constructs a CEikMfneNumber from resource.

Obtains flags and the minimum and maximum values from an MFNE_NUMBER resource. Then calls the overloaded NewL() function.

Parameters:
aFont The font to use.
aResourceReader The resource reader to use.
Returns:
A newly constructed number field.
IMPORT_C void CEikMfneNumber::RefreshDigitType const CFont &  aFont  ) 
 

Derive and set digit display type from locale information.

Parameters:
aFont The font of the MFNE that owns this field, usually retrieved with CEikMfne::Font()
IMPORT_C void CEikMfneNumber::SetDigitType TDigitType  aDigitType,
const CFont &  aFont
 

Sets the digit display type.

Parameters:
aDigitType The digit display type to bet set for this number field
aFont The font of the MFNE that owns this field, usually retrieved with CEikMfne::Font()
IMPORT_C void CEikMfneNumber::SetMinimumAndMaximum TInt  aMinimumValue,
TInt  aMaximumValue,
const CFont &  aFont
 

Sets the minimum and maximum allowable values.

Parameters:
aMinimumValue The minimum value. Must be less than or equal to the maximum value.
aMaximumValue The maximum value.
aFont The font in use.
Panic:
9 If the minimum value is greater than the maximum value or if the minimum/maximum text length is greater than the maximum number of digits.
void CEikMfneNumber::SetTrailingZeros  ) 
 
IMPORT_C void CEikMfneNumber::SetUninitialised TBool  aUninitialised  ) 
 

Sets the uninitialized status of the field.

Parameters:
aUninitialised If ETrue, sets the field as uninitialized, i.e. it doesn't display anything.
IMPORT_C void CEikMfneNumber::SetValue TInt  aValue,
const CFont &  aFont
 

Sets the field's current value.

Parameters:
aValue The field's current value. This must be between the minimum value and the maximum value.
aFont The font.
Panic:
11 In debug builds only, if the value is less than the minimum value or greater than the maximum value.
IMPORT_C TInt CEikMfneNumber::Value  )  const
 

Gets the number field's value.

Note that this function will leave if the value is not valid, i.e. the number of digits is zero or the value is outside of the minimum and maximum range.

Returns:
The field's value.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top