CAknQueryValueDurationArray Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <aknqueryvalueduration.h>

Detailed Description

Wraps an array of numeric values, adapts it into a descriptor array.

Public Types

typedef CArrayFix< TTimeIntervalSeconds >  DurationArray
  Typedef for array containing TTimeIntervalSeconds items.
enum   { KSafeSizeOfDescriptorForDurationFormat = 32 }

Public Member Functions

IMPORT_C  ~CAknQueryValueDurationArray ()
IMPORT_C void  SetArray (DurationArray &aArray)
  Set the array of values.
IMPORT_C DurationArray Array () const
  Get the array of values as a TArray.
IMPORT_C const HBufC *  FormatString () const
  Return the TTime format string that is used to generate MDesCArray values.
IMPORT_C TInt  FormattedStringSize () const
  Return the size of a maximal time string formated using the format string that was supplied during construction of this instance.
IMPORT_C void  FormatDuration (TPtr &aText, TTimeIntervalSeconds aDuration) const
  Format a descriptor with the textual version of a duration, formated according to the format string.
virtual IMPORT_C TInt  MdcaCount () const
virtual IMPORT_C TPtrC  MdcaPoint (TInt aIndex) const
  Returns array element, converting value to text.

Static Public Member Functions

static IMPORT_C CAknQueryValueDurationArray NewL (TInt aResourceId)
  Two-phased constructor.
static IMPORT_C CAknQueryValueDurationArray NewLC (TInt aResourceId)
  See NewL.

Protected Member Functions

  CAknQueryValueDurationArray ()
void  ConstructL (TInt aResourceId)
  2nd stage construction.

Member Typedef Documentation

typedef CArrayFix<TTimeIntervalSeconds> CAknQueryValueDurationArray::DurationArray
 

Typedef for array containing TTimeIntervalSeconds items.


Member Enumeration Documentation

anonymous enum
 
Enumerator:
KSafeSizeOfDescriptorForDurationFormat 

Constructor & Destructor Documentation

IMPORT_C CAknQueryValueDurationArray::~CAknQueryValueDurationArray  ) 
 
CAknQueryValueDurationArray::CAknQueryValueDurationArray  )  [protected]
 

Member Function Documentation

IMPORT_C DurationArray* CAknQueryValueDurationArray::Array  )  const
 

Get the array of values as a TArray.

Note that client can use any implementation of array class, but the array is treated as a TArray.

Returns:
array of values, ownership is not passed
void CAknQueryValueDurationArray::ConstructL TInt  aResourceId  )  [protected]
 

2nd stage construction.

IMPORT_C void CAknQueryValueDurationArray::FormatDuration TPtr &  aText,
TTimeIntervalSeconds  aDuration
const
 

Format a descriptor with the textual version of a duration, formated according to the format string.

Number of hours is not bounded.

Parameters:
aText  descriptor to be filled, must be of sufficient size
aDuration  the interval to be formatted
IMPORT_C const HBufC* CAknQueryValueDurationArray::FormatString  )  const
 

Return the TTime format string that is used to generate MDesCArray values.

Returns:
format string
IMPORT_C TInt CAknQueryValueDurationArray::FormattedStringSize  )  const
 

Return the size of a maximal time string formated using the format string that was supplied during construction of this instance.

Two versions to eliminate compiler warnings.

Returns:
length of formatted string.
virtual IMPORT_C TInt CAknQueryValueDurationArray::MdcaCount  )  const [virtual]
 
Returns:
count of contained array
virtual IMPORT_C TPtrC CAknQueryValueDurationArray::MdcaPoint TInt  aIndex  )  const [virtual]
 

Returns array element, converting value to text.

WARNING: the returned pointer is only valid until the next time this method is invoked.

Parameters:
aIndex  index of element to return
Returns:
descriptor representing array element, ownership is not passed
static IMPORT_C CAknQueryValueDurationArray* CAknQueryValueDurationArray::NewL TInt  aResourceId  )  [static]
 

Two-phased constructor.

Parameters:
aResourceId  Recource id of a TBUF containing a duration format string. Client can use R_AVKON_TBUF_POPUP_FIELD_DEFAULT_DURATION_FORMAT if desired, or provide its own resource. (must be at least "%d%d%d")
static IMPORT_C CAknQueryValueDurationArray* CAknQueryValueDurationArray::NewLC TInt  aResourceId  )  [static]
 

See NewL.

IMPORT_C void CAknQueryValueDurationArray::SetArray DurationArray aArray  ) 
 

Set the array of values.

Note that client can use any implementation of array class, but must pass in a TArray generated from it (by calling the Array() method on the array class)

Parameters:
aArray  array of values, ownership is not passed

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

Copyright © Nokia Corporation 2001-2008
Back to top