camerauis/cameraapp/generic/inc/CamNaviProgressBarControl.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24: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 CAMNAVIPROGRESSBARCONTROL_H
       
    31 #define CAMNAVIPROGRESSBARCONTROL_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 "CamNaviProgressBarModel.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 CCamNaviProgressBarControl : public CCoeControl, 
       
    51                                    public MCamObserver
       
    52   {
       
    53   public: // Constructors and destructor
       
    54     /**
       
    55     * Static factory construction function
       
    56     * @since 2.8
       
    57     * @param aModel Reference to the progress bar model
       
    58     * @return pointer to constructed instance of CCamNaviProgressBarControl
       
    59     */
       
    60     static CCamNaviProgressBarControl* NewL( CCamNaviProgressBarModel& aModel );
       
    61 
       
    62     /**
       
    63     * Destructor.
       
    64     */
       
    65     ~CCamNaviProgressBarControl();
       
    66 
       
    67   public: // New functions
       
    68                
       
    69     /**
       
    70     * Draw Navi-Counter
       
    71     * @since 3.0
       
    72     * @param aGc Handle to graphics context
       
    73     */
       
    74     void DrawProgressBar( CBitmapContext& aGc ) const;
       
    75 
       
    76     /**
       
    77     * Sets whether this control is active. If not, it cannot affect the model, or use it to render.
       
    78     * @param aActive Whether to set it active or not
       
    79     */
       
    80     void SetActiveL( TBool aActive );
       
    81 
       
    82   public: // From MCamObserver
       
    83     
       
    84     /**
       
    85     * From MCamObserver  
       
    86     * @param aEvent Observed object's event code
       
    87     */
       
    88     void HandleObservedEvent(TCamObserverEvent aEvent);
       
    89     
       
    90   protected:
       
    91 
       
    92     /**
       
    93     * C++ constructor.
       
    94     * @since 2.8
       
    95     * @param aModel Reference to the progress bar model
       
    96     */
       
    97     CCamNaviProgressBarControl( CCamNaviProgressBarModel& aModel );
       
    98     
       
    99     /**
       
   100     * Symbian OS 2nd phase constructor.
       
   101     * @since 2.8
       
   102     */
       
   103     void ConstructL();
       
   104 
       
   105   private: // Functions from base classes
       
   106     
       
   107     /**
       
   108     * From CCoeControl
       
   109     * @since 2.8
       
   110     * Set the size and position of its component controls.
       
   111     */
       
   112     void SizeChanged();
       
   113     
       
   114     /**
       
   115     * From CCoeControl Draw the view
       
   116     * @since 2.8
       
   117     * @param aRect area where to draw
       
   118     */
       
   119     void Draw( const TRect& aRect ) const;
       
   120     
       
   121   protected: //data
       
   122 
       
   123         CCamNaviProgressBarModel& iModel;
       
   124 
       
   125   private: //data
       
   126 
       
   127       TBool iActive;    
       
   128     
       
   129   };
       
   130 
       
   131 #endif // CAMNAVIPROGRESSBARCONTROL_H
       
   132 
       
   133 // End of File