CameraSettings

Since: BlackBerry 10.0.0

#include <bb/cascades/multimedia/CameraSettings>

Used to query and apply camera behavioral settings.

This class is a container class that holds the properties used to control the behavior of the camera. Camera settings must be passed as parameters to the Camera::applySettings() function. The changed signals implemented by this class are emitted when their corresponding property values have changed. These signals only report that a change has taken place, and do not indicate that camera settings were applied successfully.


Overview

QML properties

cameraMode: bb::cascades::multimedia::CameraMode::Type
cameraRollPath: QString
captureResolution: QSize
flashMode: bb::cascades::multimedia::CameraFlashMode::Type
focusMode: bb::cascades::multimedia::CameraFocusMode::Type
focusRegion: QRect
int: unsigned
sceneMode: bb::cascades::multimedia::CameraSceneMode::Type
shootingMode: bb::cascades::multimedia::CameraShootingMode::Type
visible: bool

Public Functions Index

CameraSettings (QObject *parent=0)
virtual ~CameraSettings ()
bb::cascades::multimedia::CameraMode::TypecameraMode () const
QStringcameraRollPath () const
QSizecaptureResolution () const
bb::cascades::multimedia::CameraFlashMode::TypeflashMode () const
bb::cascades::multimedia::CameraFocusMode::TypefocusMode () const
QRectfocusRegion () const
bb::cascades::multimedia::CameraSceneMode::TypesceneMode () const
voidsetCameraMode (bb::cascades::multimedia::CameraMode::Type mode)
voidsetCameraRollPath (const QString &path)
voidsetCaptureResolution (const QSize &resolution)
voidsetFlashMode (bb::cascades::multimedia::CameraFlashMode::Type mode)
voidsetFocusMode (bb::cascades::multimedia::CameraFocusMode::Type mode)
voidsetFocusRegion (const QRect &focusRegion)
voidsetSceneMode (bb::cascades::multimedia::CameraSceneMode::Type mode)
voidsetShootingMode (bb::cascades::multimedia::CameraShootingMode::Type mode)
voidsetVisible (bool visible)
voidsetZoomLevel (unsigned int level)
bb::cascades::multimedia::CameraShootingMode::TypeshootingMode () const
boolvisible () const
unsigned intzoomLevel () const

Signals Index

voidcameraModeChanged (bb::cascades::multimedia::CameraMode::Type mode)
voidcameraRollPathChanged (const QString &path)
voidcaptureResolutionChanged (const QSize &resolution)
voidflashModeChanged (bb::cascades::multimedia::CameraFlashMode::Type mode)
voidfocusModeChanged (bb::cascades::multimedia::CameraFocusMode::Type mode)
voidfocusRegionChanged (const QRect &focusRegion)
voidsceneModeChanged (bb::cascades::multimedia::CameraSceneMode::Type mode)
voidshootingModeChanged (bb::cascades::multimedia::CameraShootingMode::Type mode)
voidvisibleChanged (bool visible)
voidzoomLevelChanged (unsigned int level)

Properties

bb::cascades::multimedia::CameraMode::Type cameraMode

A camera mode selector value.

Since:

BlackBerry 10.0.0

QString cameraRollPath

The cameraRollPath property can be used to set the directory on the device where files are saved.

Typical publicly accessible locations designated for use by the camera are: .../accounts/1000/shared/camera .../accounts/1000/removable/sdcard/camera .../accounts/1000-enterprise/shared/camera .../accounts/1000-corp/shared/camera

NOTE: In releases prior to 10.2.1, setting the roll path to a private folder such as your application sandbox would fail.

Since:

BlackBerry 10.0.0

QSize captureResolution

A capture resolution setting.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraFlashMode::Type flashMode

A flash mode selector value.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraFocusMode::Type focusMode

A focus mode selector value.

Since:

BlackBerry 10.0.0

QRect focusRegion

A focus region setting.

Since:

BlackBerry 10.0.0

unsigned int

A zoom level setting.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraSceneMode::Type sceneMode

A scene mode selector value.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraShootingMode::Type shootingMode

A shooting mode selector value.

Since:

BlackBerry 10.0.0

bool visible

A visibility setting.

Since:

BlackBerry 10.0.0

Public Functions

CameraSettings (

Creates a new CameraSettings instance.

Parameters
parent

If not 0, the supplied parent will be responsible for deleting this instance.

Since:

BlackBerry 10.0.0

virtual~CameraSettings ()

Destructor.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraMode::Type cameraMode ()

Gets the current camera mode.

Return:

The camera mode.

Since:

BlackBerry 10.0.0

QString cameraRollPath ()

Gets the location where media is saved.

Return:

The location where media is saved.

Since:

BlackBerry 10.0.0

QSize captureResolution ()

Gets the current capture resolution.

Return:

A QSize object that contains the capture resolution.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraFlashMode::Type flashMode ()

Gets the current flash mode.

Return:

The flash mode.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraFocusMode::Type focusMode ()

Gets the current focus mode.

Return:

The focus mode.

Since:

BlackBerry 10.0.0

QRect focusRegion ()

Gets the focus coordinates that are set.

Return:

The coordinates of the focus region.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraSceneMode::Type sceneMode ()

Gets the current scene mode.

Return:

The scene mode.

Since:

BlackBerry 10.0.0

void setCameraMode (

Sets the camera mode and updates the settings to the default values for that mode.

Parameters
mode

The camera mode to set.

Since:

BlackBerry 10.0.0

void setCameraRollPath (

Sets the location where the media will be saved.

Parameters
path

The location where the media will be saved.

Since:

BlackBerry 10.0.0

void setCaptureResolution (

Sets the capture resolution.

For more information about supported resolutions, see Camera::supportedCaptureResolutions().

Parameters
resolution

The capture resolution to set.

Since:

BlackBerry 10.0.0

void setFlashMode (

Sets the flash mode.

Parameters
mode

The flash mode to set.

Since:

BlackBerry 10.0.0

void setFocusMode (

Sets the focus mode.

Parameters
mode

The focus mode to set.

Since:

BlackBerry 10.0.0

void setFocusRegion (
  • const QRect &focusRegion)

Specifies coordinates to use for a focus target.

Parameters
focusRegion

The position for focus. The x-coordinate is the offset from screen left to the leftmost edge of the focus region and the y-coordinate is the offset from screen top to the topmost edge of the focus region. The width and height represent the size of the focus region.

The focusMode property must be set to a value other than Off for this region to take effect when applied to the camera. Once applied, the autofocus algorithm will give priority to focusing on objects within the region.
Since:

BlackBerry 10.0.0

void setSceneMode (

Sets the scene mode.

Parameters
mode

The scene mode to set.

Since:

BlackBerry 10.0.0

void setShootingMode (

Sets the shooting mode.

Parameters
mode

The shooting mode to set.

Since:

BlackBerry 10.0.0

void setVisible (
  • boolvisible)

Sets whether the camera control is visible.

Parameters
visible

True to make the camera control visible, false otherwise.

Since:

BlackBerry 10.0.0

void setZoomLevel (
  • unsigned intlevel)

Sets the zoom level.

Smooth zoom is employed if it is supported.

Parameters
level

The zoom level to set.

Since:

BlackBerry 10.0.0

bb::cascades::multimedia::CameraShootingMode::Type shootingMode ()

Gets the current shooting mode.

Return:

The shooting mode.

Since:

BlackBerry 10.0.0

bool visible ()

Indicates whether the camera control is visible.

Return:

true if the camera control is visible, false otherwise.

Since:

BlackBerry 10.0.0

unsigned int zoomLevel ()

Gets current zoom level.

Return:

The zoom level.

Since:

BlackBerry 10.0.0

Signals

void cameraModeChanged (

Emitted when the camera mode setting has been changed.

Parameters
mode

The new camera mode.

Since:

BlackBerry 10.0.0

void cameraRollPathChanged (

Emitted when the camera roll path has been changed.

Parameters
path

The new camera roll path.

Since:

BlackBerry 10.0.0

void captureResolutionChanged (

Emitted when the capture resolution has been changed.

Parameters
resolution

The new capture resolution.

Since:

BlackBerry 10.0.0

void flashModeChanged (

Emitted when the flash mode setting has been changed.

Parameters
mode

The new flash mode.

Since:

BlackBerry 10.0.0

void focusModeChanged (

Emitted when the focus mode setting has been changed.

Parameters
mode

The new focus mode.

Since:

BlackBerry 10.0.0

void focusRegionChanged (
  • const QRect &focusRegion)

Emitted when the focus region has been changed.

Parameters
focusRegion

The new focus region.

Since:

BlackBerry 10.0.0

void sceneModeChanged (

Emitted when the scene mode setting has been changed.

Parameters
mode

The new scene mode.

Since:

BlackBerry 10.0.0

void shootingModeChanged (

Emitted when the shooting mode setting has been changed.

Parameters
mode

The new shooting mode.

Since:

BlackBerry 10.0.0

void visibleChanged (
  • boolvisible)

Emitted when the visibility changes.

Parameters
visible

The new visible value.

Since:

BlackBerry 10.0.0

void zoomLevelChanged (
  • unsigned intlevel)

Emitted when the zoom level has been changed.

Parameters
level

The new zoom level.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus