camerauis/cameraapp/generic/inc/CamCaptureSetupControlHandler.h
changeset 0 1ddebce53859
child 12 8c55c525d5d7
equal deleted inserted replaced
-1:000000000000 0:1ddebce53859
       
     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:  Class for creating, initializing and observing*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 #ifndef CAMCAPTURESETUPCONTROLHANDLER_H
       
    20 #define CAMCAPTURESETUPCONTROLHANDLER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24  
       
    25 #include "CamSettings.hrh"
       
    26 #include "CamSettingsInternal.hrh"
       
    27 #include "CamSettingValueObserver.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CCamAppController;
       
    33 class CCoeControl;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * Class to create, initialize and observe a capture set-up control
       
    39 *
       
    40 *  @since 2.8
       
    41 */
       
    42 class CCamCaptureSetupControlHandler : public CBase,
       
    43                                        public MCamSettingValueObserver
       
    44 
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47         
       
    48         /**
       
    49         * Constructor.
       
    50         * @since 2.8
       
    51         * @param aController The application controller providing access to the 
       
    52         *                   camera settings
       
    53         * @param aSettingType An enumeration value used to indicate the setting
       
    54         *                   to be edited
       
    55         */
       
    56         CCamCaptureSetupControlHandler( CCamAppController& aController,
       
    57                                         TCamSettingItemIds aSettingType );
       
    58 
       
    59         /**
       
    60         * Destructor.
       
    61         * @since 2.8
       
    62         */
       
    63         virtual ~CCamCaptureSetupControlHandler();
       
    64 
       
    65     public: // New functions
       
    66 
       
    67         /**
       
    68         * Create and initialize a new capture setup control
       
    69         * ownership of the control is transferred to the calling class.
       
    70         * @since 2.8
       
    71         * @return A pointer to the new control
       
    72         */
       
    73         CCoeControl* CreateCaptureSetupControlL( const CCoeControl* aParent );
       
    74 
       
    75         /**
       
    76         * From MCamSettingValueObserver
       
    77         * Handle an update to the setting that is created by the capture setup controller
       
    78         * @since 2.8
       
    79         */
       
    80         void HandleSettingValueUpdateL( TInt aNewValue );
       
    81         
       
    82         /**
       
    83         * Return the id of the title pane resource for the current setting type
       
    84         * @since 2.8
       
    85         * @return A title pane resource id
       
    86         */
       
    87         TInt ControlTitleResourceId() const;
       
    88 
       
    89         /**
       
    90         * Whether or not the control requires a viewfinder preview pane
       
    91         * @since 2.8
       
    92         * @return ETrue if the control needs a viewfinder pane, else EFalse
       
    93         */
       
    94         TBool ControlUsesViewFinder() const;
       
    95 
       
    96         /**
       
    97         * Whether or not the control is of listbox type
       
    98         * @return ETrue if listbox, else EFalse
       
    99         */
       
   100         TBool ControlIsListBox() const;
       
   101 
       
   102         /**
       
   103         * Whether or not the control is of slider type
       
   104         * @return ETrue if slider, else EFalse
       
   105         */
       
   106         TBool ControlIsSlider() const;
       
   107 
       
   108         /**
       
   109         * Return the id of the position resource for the current setting type
       
   110         * @since 2.8
       
   111         * @return A position resource id
       
   112         */
       
   113         TInt ControlPositionResourceId() const;
       
   114 
       
   115 		/**
       
   116         * Return the id of the viewfinder resource for the current setting type
       
   117         * @since 2.8
       
   118         * @return A viewfinder resource id
       
   119         */
       
   120         TInt ViewfinderResourceId() const;
       
   121 
       
   122         /**
       
   123         * Return Identifies which setting is being edited
       
   124         * @since 2.8
       
   125         * @return Identifies which setting is being edited
       
   126         */
       
   127         TCamSettingItemIds SettingType() const;
       
   128 
       
   129     private:   
       
   130 
       
   131         /**
       
   132         * Return the id of the resource to construct the control
       
   133         * @since 2.8
       
   134         * @return the control's resource id
       
   135         */
       
   136         TInt ResourceForControl() const;
       
   137 
       
   138     private:    // Data
       
   139         // Provides access to the settings model
       
   140         CCamAppController& iController;
       
   141         // Identifies which setting is being edited
       
   142         TCamSettingItemIds iSettingType;
       
   143     };
       
   144 
       
   145 #endif      // CAMCAPTURESETUPCONTROLHANDLER_H
       
   146             
       
   147 // End of File