Example Application Guide

 

geoprofilescontainer.h

00001 /*
00002 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
00003 * All rights reserved.
00004 * This component and the accompanying materials are made available
00005 * under the terms of the License "Eclipse Public License v1.0"
00006 * which accompanies this distribution, and is available
00007 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 *
00009 * Initial Contributors:
00010 * Nokia Corporation - initial contribution.
00011 *
00012 * Contributors:
00013 *
00014 * Description:  Container class for Geo Profiles Application
00015 *
00016 */
00017 
00018 
00019 #ifndef C_GEOPROFILESCONTAINER_H
00020 #define C_GEOPROFILESCONTAINER_H
00021 
00022 // SYSTEM INCLUDES
00023 #include <coecntrl.h>
00024 #include <eiklbo.h>
00025 
00026 // FORWARD DECLARATIONS
00027 class CGeoProfilesAppUi;
00028 class CGeoProfilesLBModel;
00029 class CAknSettingStyleListBox;
00030 class CGeoProfilesView;
00031 
00032 /**
00033  *  GeoProfiles Application's Container class. This class is the chief
00034  *  windowing component of GeoProfiles which displays the List of
00035  *  Tagged profiles
00036  */
00037 class CGeoProfilesContainer : public CCoeControl,
00038                               public MEikListBoxObserver
00039     {
00040 public:
00041         /**
00042          * Static Two phase constructor
00043          *
00044          * @param[in] aRect,             Client Rectangle for this window owning control.
00045          */
00046         static CGeoProfilesContainer* NewL( const TRect&                    aRect,
00047                                                   CGeoProfilesLBModel&  aListboxModel,
00048                                                   CGeoProfilesView&     aView );
00049         
00050         /**
00051          * Virtual destructor
00052          */
00053     ~CGeoProfilesContainer();
00054     
00055     /**
00056      * Updates the container
00057      */
00058     void UpdateL( CGeoProfilesLBModel&  aListboxModel );
00059     
00060     /**
00061      * Returns the currently focussed element.
00062      */
00063     TInt GetFocussedItem();    
00064         
00065 protected: // Inherited from Base classes
00066 
00067         /**
00068          * Inherited from CCoeControl
00069          */  
00070     void SizeChanged();
00071 
00072         /**
00073          * Inherited from CCoeControl
00074          */
00075     TInt CountComponentControls() const;
00076 
00077         /**
00078          * Inherited from CCoeControl
00079          */
00080     CCoeControl* ComponentControl( TInt aIndex ) const;
00081     
00082         /**
00083          * Inherited from CCoeControl
00084          */    
00085     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
00086                                                    TEventCode aType );
00087                                                    
00088         /**
00089          * Inherited from CCoeControl
00090          */
00091         void HandleResourceChange( TInt aType );
00092         
00093     /**
00094      * Inherited from MEikListBoxObserver
00095      */
00096     void HandleListBoxEventL( CEikListBox*      aListBox, 
00097                               TListBoxEvent     aEventType );
00098     
00099     /**
00100      * Focus changes event
00101      */
00102     void FocusChanged( TDrawNow aDrawNow );    
00103                                                                                             
00104 private:
00105         
00106         /**
00107          * C++ Default constructor
00108          */
00109     CGeoProfilesContainer( CGeoProfilesLBModel&  aListboxModel,
00110                            CGeoProfilesView&     aView );
00111     
00112         /**
00113          * Second phase of the two phase constructor
00114          */     
00115     void ConstructL( const TRect&       aRect );
00116     
00117     /**
00118      * Sets the Title text
00119      * @param aResourceText Resource to create title
00120      */
00121     void MakeTitleL( TInt aResourceText );
00122     
00123     /** 
00124      * Creates the Geo profiles List box       
00125      */
00126     void CreateListboxL();    
00127             
00128 private:
00129     /**
00130      * Reference to the list box model
00131      * Does not own
00132      */
00133     CGeoProfilesLBModel*            iListboxModel;
00134     
00135     /**
00136      * Settings list box for Geo Profiles list
00137      * Owns
00138      */
00139     CAknSettingStyleListBox*        iListBox;
00140     
00141     /**
00142      * Reference to the Container's view
00143      */
00144     CGeoProfilesView&               iView;
00145                  
00146         };
00147 
00148 #endif  // C_GEOPROFILESCONTAINER_H
00149 
00150 // End of File

© Nokia 2009

Back to top