camerauis/cameraxui/cxengine/inc/cxezoomcontrolsymbian.h
changeset 19 d9aefe59d544
child 45 24fd82631616
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
       
     1 /*
       
     2 * Copyright (c) 2009 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 #ifndef CXEZOOMCONTROLSYMBIAN_H
       
    18 #define CXEZOOMCONTROLSYMBIAN_H
       
    19 
       
    20 #include "cxezoomcontrol.h"
       
    21 #include "cxecameradevice.h" // CxeCameraDevice
       
    22 #include "cxestatemachine.h"
       
    23 #include "cxecameradevicecontrol.h"
       
    24 
       
    25 class CxeCameraDeviceControl;
       
    26 class CxeSettings;
       
    27 class CxeFeatureManager;
       
    28 
       
    29 class CxeZoomControlSymbian : public CxeZoomControl, public CxeStateMachine
       
    30 {
       
    31 Q_OBJECT
       
    32 
       
    33 public: // constructors
       
    34 
       
    35     CxeZoomControlSymbian(CxeCameraDevice &cameraDevice,
       
    36                           CxeCameraDeviceControl &cameraDeviceControl,
       
    37                           CxeSettings &settings,
       
    38                           CxeFeatureManager &featureManager);
       
    39 
       
    40     virtual ~CxeZoomControlSymbian();
       
    41 
       
    42 public:
       
    43     // from CxeZoomControl
       
    44     CxeZoomControl::State state() const;
       
    45     int min() const;
       
    46     int max() const;
       
    47     void zoomTo(int value);
       
    48 
       
    49 protected:
       
    50     // from CxeStateMachine
       
    51     void handleStateChanged(int newStateId, CxeError::Id error);
       
    52 
       
    53 protected slots:
       
    54 
       
    55     // Slot to react to still capture signal:
       
    56     // prepares the zoom control for still.
       
    57     void prepareZoomForStill(int ecamStillResolutionIndex);
       
    58     
       
    59     // Slot to react to video capture signal:
       
    60     // prepares the zoom control for video.
       
    61     void prepareZoomForVideo();
       
    62 
       
    63     // Slot to prepare for camera delete signal.
       
    64     void reset();
       
    65 
       
    66     // slot for setting value change
       
    67     void handleSettingValueChanged(const QString& settingId,QVariant newValue);
       
    68 
       
    69 private:
       
    70     // private member functions
       
    71     void init();
       
    72     void initializeStates();
       
    73     void finalizeZoomPreparation(int error);
       
    74 
       
    75 private:
       
    76     // private data
       
    77 
       
    78     CxeCameraDevice &mCameraDevice;
       
    79     CxeCameraDeviceControl &mCameraDeviceControl;
       
    80     CxeSettings &mSettings;
       
    81 
       
    82     // Zoom levels
       
    83     int mCurrentZoomLevel;
       
    84     int mMinZoomLevel;
       
    85     int mMaxZoomLevel;
       
    86 
       
    87     // The RArray is used to map the integers between "min" and "max" to adaptation understandable values.
       
    88     RArray<TInt> mDigitalZoomValues;
       
    89     TValueInfo mDigitalZoomValueInfo;
       
    90 
       
    91     // values ready from feature manager.
       
    92     QList<int> mStillMaxZoomLimits;
       
    93     QList<int> mVideoMaxZoomLimits;
       
    94 };
       
    95 
       
    96 #endif // CXEZOOMCONTROLSYMBIAN_H