Example Application Guide

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# CGeoProfileSelector Class Reference

`#include <geoprofileselector.h>`

Inheritance diagram for CGeoProfileSelector:

List of all members.

## Detailed Description

Geo Profile Selector

Definition at line 30 of file geoprofileselector.h.

## Public Member Functions
virtual | ~CGeoProfileSelector ()
TInt | SelectGeoProfileL (TInt &aProfileId)
## Static Public Member Functions
static CGeoProfileSelector * | NewLC ()
## Private Member Functions
| CGeoProfileSelector ()
void | ConstructL ()
## Private Attributes
HBufC * | iProfilePopupTitle

## Constructor & Destructor Documentation

CGeoProfileSelector::~CGeoProfileSelector | ( |  | ) | `[virtual]`

| C++ Destructor. Frees all the resources Definition at line 48 of file geoprofileselector.cpp. References iProfilePopupTitle.
    00049     {
    00050     delete iProfilePopupTitle;
    00051     }

CGeoProfileSelector::CGeoProfileSelector | ( |  | ) | `[private]`

| C++ Constructor Definition at line 40 of file geoprofileselector.cpp. Referenced by NewLC().
    00041     {
    00042     }

## Member Function Documentation

CGeoProfileSelector * CGeoProfileSelector::NewLC | ( |  | ) | `[static]`

| Constructs a new instance of CGeoProfileSelector Definition at line 57 of file geoprofileselector.cpp. References CGeoProfileSelector(). Referenced by CGeoProfileEditor::HandleProfileSelectionL().
    00058     {
    00059     CGeoProfileSelector* self = new ( ELeave ) CGeoProfileSelector();
    00060     CleanupStack::PushL( self );
    00061     self->ConstructL();
    00062     return self;
    00063     }

TInt CGeoProfileSelector::SelectGeoProfileL | ( | TInt & | aProfileId | ) |

| Select Profile Definition at line 79 of file geoprofileselector.cpp. Referenced by CGeoProfileEditor::HandleProfileSelectionL().
    00080     {
    00081     TInt retVal = KErrCancel;
    00082
    00083     // Index for profile selection
    00084     TInt index = 0;
    00085
    00086     // Load the Title text
    00087     HBufC* title = StringLoader::LoadLC( R_LBL_GEOPROFILES_PROFILE );
    00088
    00089     // Obtain the list of profiles
    00090     MProEngEngine* profileEng = ProEngFactory::NewEngineL();
    00091     CleanupReleasePushL( *profileEng );
    00092
    00093     MProEngProfileNameArray* profileNames = profileEng->ProfileNameArrayLC();
    00094
    00095     // Create the list Query Dialog
    00096     CAknListQueryDialog* placeQuery = new( ELeave ) CAknListQueryDialog( &index );
    00097     placeQuery->PrepareLC( R_GEOPROFILES_LIST_QUERY );
    00098
    00099     // Assign Title Text
    00100     CAknPopupHeadingPane *  heading = placeQuery->QueryHeading();
    00101     if( heading )
    00102         {
    00103         heading->SetTextL( *title );
    00104         }
    00105
    00106     // Descriptor array
    00107     CDesCArrayFlat* array = new ( ELeave ) CDesCArrayFlat( 4 );
    00108     CleanupStack::PushL( array );
    00109
    00110     HBufC* profileName = HBufC::NewLC( 256 );
    00111     TPtr profileNamePtr = profileName->Des();
    00112
    00113     for ( TInt i = 0; i < profileNames->MdcaCount(); i++ )
    00114         {
    00115         profileNamePtr.Zero();
    00116         profileNamePtr.Append( KTab );
    00117         profileNamePtr.Append( profileNames->MdcaPoint( i ));
    00118
    00119         array->AppendL( *profileName );
    00120         }
    00121
    00122     // Cleanup the profile Name buffer
    00123     CleanupStack::PopAndDestroy( profileName );
    00124
    00125     // Assign the Item text array
    00126     placeQuery->SetItemTextArray( array );
    00127     placeQuery->SetOwnershipType(  ELbmOwnsItemArray );
    00128     CleanupStack::Pop( array );
    00129
    00130     if ( placeQuery->RunLD())
    00131         {
    00132         retVal = KErrNone;
    00133
    00134         // Obtain the Profile Name and Profile ID at index
    00135         aProfileId = profileNames->ProfileId( index );
    00136         }
    00137
    00138     CleanupStack::PopAndDestroy( 3, title );
    00139     return retVal;
    00140     }

void CGeoProfileSelector::ConstructL | ( |  | ) | `[private]`

| Second phase of two phase construction Definition at line 69 of file geoprofileselector.cpp. References iProfilePopupTitle.
    00070     {
    00071     // Allocate the Title text
    00072     iProfilePopupTitle = NULL;
    00073     }

## Member Data Documentation

HBufC* CGeoProfileSelector::iProfilePopupTitle`[private]`

| Title text for pop-up dialog Owns Definition at line 65 of file geoprofileselector.h. Referenced by ConstructL(), and ~CGeoProfileSelector().

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

- geoprofileselector.h
- geoprofileselector.cpp

© Nokia 2009 |