camerauis/cameraxui/cxengine/inc/cxezoomcontroldesktop.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 53 61bc0f252b2b
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CXEZOOMCONTROLDESKTOP_H
       
    19 #define CXEZOOMCONTROLDESKTOP_H
       
    20 
       
    21 #include "cxezoomcontrol.h"
       
    22 #include "cxestatemachine.h"
       
    23 #include "cxecameradevicecontrol.h"
       
    24 
       
    25 class CxeCameraDeviceControl;
       
    26 class CxeSettings;
       
    27 class CxeFeatureManager;
       
    28 
       
    29 class CxeZoomControlDesktop : public CxeZoomControl
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public: // constructors
       
    34 
       
    35     CxeZoomControlDesktop(CxeCameraDeviceControl &cameraDeviceControl);
       
    36 
       
    37     virtual ~CxeZoomControlDesktop();
       
    38 
       
    39 public:
       
    40     // from CxeZoomControl
       
    41     CxeZoomControl::State state() const;
       
    42     int min() const;
       
    43     int max() const;
       
    44     void zoomTo(int value);
       
    45 
       
    46 protected slots:
       
    47 
       
    48     // Slot to react to still capture signal:
       
    49     // prepares the zoom control for still.
       
    50     void prepareZoomForStill(int ecamStillResolutionIndex);
       
    51     
       
    52     // Slot to react to video capture signal:
       
    53     // prepares the zoom control for video.
       
    54     void prepareZoomForVideo();
       
    55 
       
    56     // Slot to prepare for camera delete signal.
       
    57     void reset();
       
    58 
       
    59 private:
       
    60     // private member functions
       
    61     void init();
       
    62     void finalizeZoomPreparation(int error);
       
    63 
       
    64 private:
       
    65     // private data
       
    66 
       
    67     CxeCameraDeviceControl &mCameraDeviceControl;
       
    68 
       
    69     // Zoom levels
       
    70     int mCurrentZoomLevel;
       
    71     int mMinZoomLevel;
       
    72     int mMaxZoomLevel;
       
    73 
       
    74     // values ready from feature manager.
       
    75     QList<int> mStillMaxZoomLimits;
       
    76     QList<int> mVideoMaxZoomLimits;
       
    77 
       
    78     CxeZoomControl::State mState;
       
    79 };
       
    80 
       
    81 #endif // CXEZOOMCONTROLDESKTOP_H