S60 3rd Edition SDK for Symbian OS
Example Applications Guide

LandmarksListBox.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : LandmarksListBox.cpp
00004 *  Part of     : Landmark Reference Application
00005 *  Interface   : -
00006 *  Description : Implements the CLandmarksContainerBase class
00007 *  Version     : 1.0
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 // INCLUDE FILES
00017 #include "LandmarksListBox.h"
00018 #include "LandmarksListBoxModel.h"
00019 
00020 // ============================ MEMBER FUNCTIONS ===============================
00021 
00022 // -----------------------------------------------------------------------------
00023 // CLandmarksListBox::ConstructL
00024 // Symbian 2nd phase constructor can leave.
00025 // -----------------------------------------------------------------------------
00026 //
00027 void CLandmarksListBox::ConstructL(
00028     const CCoeControl* aParent,
00029     TInt aFlags)
00030     {
00031     // Create a specialized model, forwarding the filtering algorithm to the 
00032     // landmark API.
00033     iModel = new (ELeave) CLandmarksListBoxModel;
00034 
00035     // Continue construction of the object.
00036     CEikColumnListBox::ConstructL(aParent, aFlags);
00037     }
00038 
00039 // -----------------------------------------------------------------------------
00040 // CLandmarksListBox::CreateModelL
00041 // 
00042 // (other items were commented in a header).
00043 // -----------------------------------------------------------------------------
00044 //
00045 void CLandmarksListBox::CreateModelL()
00046     {
00047     // Do nothing. Model is already constructed in constructor.
00048     // This method must be overridden to prevent base class to recreate a new, 
00049     // for our purpuses, non-suitable model.
00050     }
00051 
00052 // -----------------------------------------------------------------------------
00053 // CLandmarksListBox::Model
00054 // 
00055 // (other items were commented in a header).
00056 // -----------------------------------------------------------------------------
00057 //
00058 CLandmarksListBoxModel* CLandmarksListBox::Model() const
00059     {
00060     return static_cast <CLandmarksListBoxModel*> (iModel);
00061     }
00062 
00063 // End of File
00064 

© Nokia 2006

Back to top