1 /* |
|
2 * Copyright (c) 2009-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 #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 private: |
|
67 // private member functions |
|
68 void init(); |
|
69 void initializeStates(); |
|
70 void finalizeZoomPreparation(int error); |
|
71 |
|
72 private: |
|
73 // private data |
|
74 |
|
75 CxeCameraDevice &mCameraDevice; |
|
76 CxeCameraDeviceControl &mCameraDeviceControl; |
|
77 CxeSettings &mSettings; |
|
78 |
|
79 // Zoom levels |
|
80 int mCurrentZoomLevel; |
|
81 int mMinZoomLevel; |
|
82 int mMaxZoomLevel; |
|
83 |
|
84 // The RArray is used to map the integers between "min" and "max" to adaptation understandable values. |
|
85 RArray<TInt> mDigitalZoomValues; |
|
86 TValueInfo mDigitalZoomValueInfo; |
|
87 |
|
88 // values ready from feature manager. |
|
89 QList<int> mStillMaxZoomLimits; |
|
90 QList<int> mVideoMaxZoomLimits; |
|
91 }; |
|
92 |
|
93 #endif // CXEZOOMCONTROLSYMBIAN_H |
|