camerauis/cameraapp/generic/inc/CamNaviCounterControl.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 0 1ddebce53859
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
       
     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:  Control for displaying remaining images in navi pane.
       
    15 *
       
    16 *  Copyright © 2007 Nokia.  All rights reserved.
       
    17 *  This material, including documentation and any related computer
       
    18 *  programs, is protected by copyright controlled by Nokia.  All
       
    19 *  rights are reserved.  Copying, including reproducing, storing,
       
    20 *  adapting or translating, any or all of this material requires the
       
    21 *  prior written consent of Nokia.  This material also contains
       
    22 *  confidential information which may not be disclosed to others
       
    23 *  without the prior written consent of Nokia.
       
    24 
       
    25 *
       
    26 *
       
    27 */
       
    28 
       
    29 
       
    30 #ifndef CAMNAVICOUNTERCONTROL_H
       
    31 #define CAMNAVICOUNTERCONTROL_H
       
    32 
       
    33 // INCLUDES
       
    34 #include <coecntrl.h>
       
    35 #include <AknUtils.h>
       
    36 #include "CamAppController.h"
       
    37 #include "CamSettings.hrh"
       
    38 #include "CamResourceLoader.h"
       
    39 #include "CamNaviCounterModel.h"
       
    40 #include "CamObserver.h"
       
    41 
       
    42 // FORWARD DECLARATIONS
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 * Control for displaying recording time info in navi pane.
       
    48 * @since 2.8
       
    49 */
       
    50 class CCamNaviCounterControl : public CCoeControl, 
       
    51                                public MCamObserver
       
    52     {
       
    53     public: // Constructors and destructor
       
    54 		/**
       
    55 		* Static factory construction function
       
    56         * @since 2.8
       
    57 		* @param aModel Counter model reference
       
    58 		* @return pointer to constructed instance of CCamNaviCounterControl
       
    59 		*/
       
    60 		static CCamNaviCounterControl* NewL( CCamNaviCounterModel& aModel );
       
    61 
       
    62         /**
       
    63         * Destructor.
       
    64         */
       
    65         ~CCamNaviCounterControl();
       
    66 
       
    67     public: // New functions
       
    68                
       
    69         /**
       
    70         * Force update of navi-pane (i.e after dismissal of MMC removed error note)
       
    71         * @since 2.8
       
    72         */
       
    73         void ForceNaviPaneUpdate();
       
    74 
       
    75 		/**
       
    76 		* Draw Navi-Counter
       
    77 		* @since 3.0
       
    78 		* @param aGc Handle to graphics context
       
    79 		*/
       
    80 		void DrawNaviCtr( CBitmapContext& aGc ) const;
       
    81 
       
    82         /**
       
    83         * Sets whether this control is active. If not, it cannot affect the model, or use it to render.
       
    84         * @param aActive Whether to set it active or not
       
    85         */
       
    86         void SetActiveL( TBool aActive );
       
    87         
       
    88     public: // From MCamObserver
       
    89     
       
    90         /**
       
    91         * From MCamObserver  
       
    92         * @param aEvent Observed object's event code
       
    93         */
       
    94         void HandleObservedEvent(TCamObserverEvent aEvent);
       
    95 
       
    96 	protected:
       
    97 		/**
       
    98         * C++ constructor.
       
    99         * @since 2.8
       
   100         * @param aModel Counter model reference
       
   101         */
       
   102         CCamNaviCounterControl( CCamNaviCounterModel& aModel );
       
   103         
       
   104         /**
       
   105         * Symbian OS 2nd phase constructor.
       
   106         * @since 2.8
       
   107         */
       
   108         void ConstructL();
       
   109 
       
   110     private: // Functions from base classes
       
   111 
       
   112         /**
       
   113         * From CCoeControl
       
   114         * @since 2.8
       
   115         * Set the size and position of its component controls.
       
   116         */
       
   117         void SizeChanged();
       
   118 
       
   119         /**
       
   120         * From CCoeControl Draw the view
       
   121         * @since 2.8
       
   122         * @param aRect area where to draw
       
   123         */
       
   124         void Draw( const TRect& aRect ) const;
       
   125         
       
   126     protected: //data
       
   127         CCamNaviCounterModel& iModel;
       
   128 
       
   129     private: //data
       
   130         TBool iActive;    
       
   131     
       
   132     };
       
   133 
       
   134 #endif // CAMNAVICOUNTERCONTROL_H
       
   135 
       
   136 // End of File