camerauis/cameraapp/generic/inc/CamSceneListBoxModel.h
changeset 19 d9aefe59d544
parent 3 8b2d6d0384b0
child 21 fa6d9f75d6a6
child 28 3075d9b614e6
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Scenes list box model*
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef CAMSCENELISTBOXMODEL_H
       
    19 #define CAMSCENELISTBOXMODEL_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "CamCaptureSetupListBoxModel.h"
       
    23 #include "CamAppController.h"
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 class CCamAppController;
       
    28 
       
    29 /**
       
    30 *  List box model for Camera scenes
       
    31 *
       
    32 *  @since 3.0
       
    33 */
       
    34 class CCamSceneListBoxModel : public CCamCaptureSetupListBoxModel
       
    35   {
       
    36   public:  // Constructors and destructor
       
    37 
       
    38     /**
       
    39     * Two-phased constructor.
       
    40     */
       
    41     static CCamSceneListBoxModel* NewLC( CCamAppController& aController,
       
    42                                          TCamCameraMode aMode,
       
    43                                          RPointerArray<HBufC>& aSummaryTitleTextArray,
       
    44                                          RPointerArray<HBufC>& aSummaryDescriptionTextArray,
       
    45                                          TBool aUserBaseScenes,
       
    46                                          TRect aListBoxRect );
       
    47       
       
    48     /**
       
    49     * Destructor.
       
    50     */
       
    51     virtual ~CCamSceneListBoxModel();
       
    52 
       
    53 
       
    54   private:
       
    55 
       
    56     /**
       
    57     * C++ default constructor.
       
    58     */
       
    59     CCamSceneListBoxModel( CCamAppController& aController, 
       
    60                            TCamCameraMode aMode,
       
    61                            RPointerArray<HBufC>& aSummaryTitleTextArray,
       
    62                            RPointerArray<HBufC>& aSummaryDescriptionTextArray,
       
    63                            TBool aUserBaseScenes );
       
    64 
       
    65     /**
       
    66     * By default Symbian 2nd phase constructor is private.
       
    67     */
       
    68     void ConstructL( TRect aListBoxRect );
       
    69         
       
    70     /**
       
    71     * Select the resource to use and load listbox data
       
    72     * from the selected resource.
       
    73     */
       
    74     void GetDataFromResourceL();
       
    75         
       
    76     /**
       
    77     * Get settings for all supported scenes
       
    78     * @since 3.0
       
    79     * @param aResourceId ID of resource definition for scenes
       
    80     */
       
    81     void GetScenesDataL( TInt aResourceId );
       
    82 
       
    83     /**
       
    84     * Is specified scene suported for current product
       
    85     * @since 3.0
       
    86     * @param aSceneValue Identifier for scene (i.e ECamSceneAuto)
       
    87     * @return ETrue if scene is supported by current product
       
    88     */
       
    89     TBool IsSupportedScene( TInt aSceneValue );
       
    90 
       
    91 
       
    92   private:    // Data
       
    93 
       
    94     // capture mode (still/video)
       
    95     TCamCameraMode iMode;
       
    96 
       
    97     // Array of title descriptions for the summary title lines 
       
    98     RPointerArray<HBufC>& iSummaryTitleTextArray;
       
    99     // Array of descriptons for the summary description lines
       
   100     RPointerArray<HBufC>& iSummaryDescriptionTextArray;
       
   101 
       
   102     // Whether we are displaying the user scene base scene list or not.
       
   103     TBool iUserBaseScenes;
       
   104     CCamAppController& iController;
       
   105   };
       
   106 
       
   107 #endif      // CAMSCENELISTBOXMODEL_H   
       
   108             
       
   109 // End of File