CAknGlobalListQuery Class Reference

API published in: S60 1st Ed

Link against: aknnotify.lib eiksrv.lib

Capability Information

Required Capabilities

None


#include <akngloballistquery.h>

Detailed Description

CAknGlobalListQuery Uses notification framework to show a global list query.

Usage: Create an active object, start it and pass its TRequestStatus as a parameter to ShowListQueryL. After the user selects one item from the list query, the request status will hold the number of the selected item. If the user selected Cancel, the request status will hold -1.

Example 1. Show the global list query: CDesCArray* textArray = iCoeEnv->ReadDesCArrayResourceL( R_GLOBAL_LIST_ARRAY ); CleanupStack::PushL(textArray); TInt result = -555; if ( iListObserver ) { iListObserver->Cancel(); delete iListObserver; } iListObserver = new(ELeave) CGlobalListObserver(iEikonEnv); iListObserver->Start(); iGlobalListQuery->ShowListQueryL(textArray, iListObserver->iStatus, 4); CleanupStack::PopAndDestroy(); // textArray

Example 2. Get and handle the result in active object. void CMyActiveObject::RunL() { TBuf<120> msg = _L("Received: "); msg.AppendNum( iStatus.Int() ); iEnv->InfoMsg(msg); Cancel(); }


Public Member Functions

IMPORT_C  ~CAknGlobalListQuery ()
  Destructor.
IMPORT_C void  ShowListQueryL (const MDesCArray *aItems, TRequestStatus &aStatus, const TInt aIndex=KGlobalListQueryDefaultIndex)
  Shows global list query synchronously.
IMPORT_C void  MoveSelectionUp ()
  Move selection up.
IMPORT_C void  MoveSelectionDown ()
  Move selection down.
IMPORT_C void  SelectItem ()
  Select currently selected item in the list.
IMPORT_C void  CancelListQuery ()
  Cancel the list query.
IMPORT_C void  SetHeadingL (const TDesC &aHeading)
  Sets the heading for the query.
IMPORT_C void  SetSecondaryDisplayData (CAknSDData *aData)
  Sets additional information to be sent to secondary display.

Static Public Member Functions

static IMPORT_C CAknGlobalListQuery NewL ()
  Two-phased constructor.
static IMPORT_C CAknGlobalListQuery NewLC ()
  Two-phased constructor.

Constructor & Destructor Documentation

IMPORT_C CAknGlobalListQuery::~CAknGlobalListQuery  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CAknGlobalListQuery::CancelListQuery  ) 
 

Cancel the list query.

IMPORT_C void CAknGlobalListQuery::MoveSelectionDown  ) 
 

Move selection down.

IMPORT_C void CAknGlobalListQuery::MoveSelectionUp  ) 
 

Move selection up.

static IMPORT_C CAknGlobalListQuery* CAknGlobalListQuery::NewL  )  [static]
 

Two-phased constructor.

static IMPORT_C CAknGlobalListQuery* CAknGlobalListQuery::NewLC  )  [static]
 

Two-phased constructor.

Leaves the instance to cleanupstack

IMPORT_C void CAknGlobalListQuery::SelectItem  ) 
 

Select currently selected item in the list.

IMPORT_C void CAknGlobalListQuery::SetHeadingL const TDesC &  aHeading  ) 
 

Sets the heading for the query.

In order to have effect, the heading must be set before calling ShowListQueryL.

Parameters:
aHeading  Heading string.
IMPORT_C void CAknGlobalListQuery::SetSecondaryDisplayData CAknSDData *  aData  ) 
 

Sets additional information to be sent to secondary display.

Takes ownership of object. Must be called before sending data to notifier to have effect.

Parameters:
aData  Data to be sent to cover UI.
IMPORT_C void CAknGlobalListQuery::ShowListQueryL const MDesCArray *  aItems,
TRequestStatus &  aStatus,
const TInt  aIndex = KGlobalListQueryDefaultIndex
 

Shows global list query synchronously.

Parameters:
aItems  Strings for items
aStatus  TRequestStatus which will be completed when user selects one item from the list query.
aIndex  Index which item in the list will be highlighted

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

Copyright © Nokia Corporation 2001-2008
Back to top