equal
deleted
inserted
replaced
25 #include "cxeautofocuscontrol.h" |
25 #include "cxeautofocuscontrol.h" |
26 #include "cxestatemachine.h" |
26 #include "cxestatemachine.h" |
27 |
27 |
28 //forward declarations |
28 //forward declarations |
29 class CxeCameraDevice; |
29 class CxeCameraDevice; |
|
30 class CxeSettings; |
30 |
31 |
31 |
32 |
32 |
33 |
33 /** |
34 /** |
34 * CxeAutoFocusControl is responsible for handling Autofocus events from the camera adaptation. |
35 * CxeAutoFocusControl is responsible for handling Autofocus events from the camera adaptation. |
39 public CxeStateMachine |
40 public CxeStateMachine |
40 { |
41 { |
41 Q_OBJECT |
42 Q_OBJECT |
42 public: |
43 public: |
43 |
44 |
44 CxeAutoFocusControlSymbian( CxeCameraDevice &cameraDevice ); |
45 CxeAutoFocusControlSymbian( CxeCameraDevice &cameraDevice, CxeSettings &settings ); |
45 virtual ~CxeAutoFocusControlSymbian(); |
46 virtual ~CxeAutoFocusControlSymbian(); |
46 |
47 |
47 CxeError::Id start(bool soundEnabled = true); |
48 CxeError::Id start(bool soundEnabled = true); |
48 void cancel(); |
49 void cancel(); |
49 void setMode( CxeAutoFocusControl::Mode newMode ); |
50 void setMode( CxeAutoFocusControl::Mode newMode ); |
79 // notification for when camera is released |
80 // notification for when camera is released |
80 void prepareForRelease(); |
81 void prepareForRelease(); |
81 |
82 |
82 // Handle ECam events |
83 // Handle ECam events |
83 void handleCameraEvent( int eventUid, int error ); |
84 void handleCameraEvent( int eventUid, int error ); |
84 void handleSceneChanged(CxeScene& scene); |
85 void handleSceneChanged(CxeScene &scene); |
|
86 void handleSettingValueChanged(const QString &settingId, QVariant newValue); |
85 |
87 |
86 private: |
88 private: |
87 |
89 |
88 // handles to-do things if the event is AF event |
90 // handles to-do things if the event is AF event |
89 void handleAfEvent(int eventUid, int error); |
91 void handleAfEvent(int eventUid, int error); |
91 protected: |
93 protected: |
92 CxeCameraDevice &mCameraDevice; |
94 CxeCameraDevice &mCameraDevice; |
93 CCamera::CCameraAdvancedSettings *mAdvancedSettings; // not owned |
95 CCamera::CCameraAdvancedSettings *mAdvancedSettings; // not owned |
94 CxeAutoFocusControl::Mode mAfMode; |
96 CxeAutoFocusControl::Mode mAfMode; |
95 CCamera::CCameraAdvancedSettings::TFocusRange mAFRange; |
97 CCamera::CCameraAdvancedSettings::TFocusRange mAFRange; |
|
98 CxeSettings &mSettings; |
96 bool mCancelled; |
99 bool mCancelled; |
97 bool mSoundEnabled; |
100 bool mSoundEnabled; |
|
101 bool mFaceTrackingOverride; //need for temporary override of the AF mode if FT is enabled by user |
|
102 CxeAutoFocusControl::Mode mPreviousAFMode; //for restoring previous AF mode in case of FT override |
98 }; |
103 }; |
99 |
104 |
100 #endif // CXEAUTOFOCUSCONTROLSYMBIAN_H |
105 #endif // CXEAUTOFOCUSCONTROLSYMBIAN_H |