QCameraFocus Class Reference
The QCameraFocus class provides interface for focus and zoom related camera settings. More...
#include <QCameraFocus>
This class is under development and is subject to change.
Public Types
enum | FocusMode { ManualFocus, AutoFocus, ContinuousFocus, InfinityFocus, HyperfocalFocus, MacroFocus } |
flags | FocusModes |
enum | FocusPointMode { FocusPointAuto, FocusPointCenter, FocusPointFaceDetection, FocusPointCustom } |
Properties
Public Functions
Signals
Detailed Description
The QCameraFocus class provides interface for focus and zoom related camera settings.
The Camera API of Qt Mobility is still in Technology Preview. It has not undergone the same level of review and testing as the rest of the APIs.
The API exposed by the classes in this component are not stable, and will undergo modification or removal prior to the final release of Qt Mobility.
Member Type Documentation
enum QCameraFocus::FocusMode
flags QCameraFocus::FocusModes
|
Constant | Value | Description |
QCameraFocus::ManualFocus | 0x1 | Manual or fixed focus mode. |
QCameraFocus::AutoFocus | 0x8 | One-shot auto focus mode. |
QCameraFocus::ContinuousFocus | 0x10 | Continuous auto focus mode. |
QCameraFocus::InfinityFocus | 0x04 | Focus strictly to infinity. |
QCameraFocus::HyperfocalFocus | 0x02 | Focus to hyperfocal distance, with with the maximum depth of field achieved. All objects at distances from half of this distance out to infinity will be acceptably sharp. |
QCameraFocus::MacroFocus | 0x20 | One shot auto focus to objects close to camera. |
The FocusModes type is a typedef for QFlags<FocusMode>. It stores an OR combination of FocusMode values.
enum QCameraFocus::FocusPointMode
|
Constant | Value | Description |
QCameraFocus::FocusPointAuto | 0 | Automaticaly select one or multiple focus points. |
QCameraFocus::FocusPointCenter | 1 | Focus to the frame center. |
QCameraFocus::FocusPointFaceDetection | 2 | Focus on faces in the frame. |
QCameraFocus::FocusPointCustom | 3 | Focus to the custom point, defined by QCameraFocus::customFocusPoint property. |
Property Documentation
customFocusPoint : QPointF
Position of custom focus point, in relative frame coordinates: QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center.
Custom focus point is used only in FocusPointCustom focus mode.
Access functions:
QPointF | customFocusPoint () const |
void | setCustomFocusPoint ( const QPointF & point ) |
The camera focus point selection mode.
Access functions:
FocusPointMode | focusPointMode () const |
void | setFocusPointMode ( FocusPointMode mode ) |
focusZones : const QCameraFocusZoneList
Returns the list of active focus zones.
If QCamera::FocusPointAuto or QCamera::FocusPointFaceDetection focus mode is selected this method returns the list of zones the camera is actually focused on.
The coordinates system is the same as for custom focus points: QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center.
Access functions:
QCameraFocusZoneList | focusZones () const |
Notifier signal:
Member Function Documentation
qreal QCameraFocus::digitalZoom () const
Returns the current digital zoom value.
See also QCameraFocus::opticalZoom().
void QCameraFocus::digitalZoomChanged ( qreal value ) [signal]
Signal emitted when digital zoom value changes to new value.
FocusMode QCameraFocus::focusMode () const
Returns the focus mode being used.
See also setFocusMode().
void QCameraFocus::focusZonesChanged () [signal]
Signal is emited when the set of zones, camera focused on is changed.
Usually the zones list is changed when the camera is focused.
bool QCameraFocus::isAvailable () const
Returns true if focus related settings are supported by this camera.
bool QCameraFocus::isFocusModeSupported ( FocusMode mode ) const
Returns true if the focus mode is supported by camera.
bool QCameraFocus::isFocusPointModeSupported ( FocusPointMode mode ) const
Returns true if focus point mode is supported.
qreal QCameraFocus::maximumDigitalZoom () const
Returns the maximum digital zoom
qreal QCameraFocus::maximumOpticalZoom () const
Returns the maximum optical zoom
qreal QCameraFocus::opticalZoom () const
Returns the current optical zoom value.
See also QCameraFocus::digitalZoom().
void QCameraFocus::opticalZoomChanged ( qreal value ) [signal]
Signal emitted when optical zoom value changes to new value.
void QCameraFocus::setFocusMode ( FocusMode mode )
Set the focus mode to mode
See also focusMode().
void QCameraFocus::zoomTo ( qreal optical, qreal digital )
Set the camera optical and digital zoom values.