Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
New Developer
arjunhemrajani
Posts: 20
Registered: ‎07-14-2012
My Carrier: Vodafonee

how to use camerasettings api

applySettings(CameraSettings *camera);

 

I cant get it can anyone help please!

How do i pass the object and what should the object contain and where should i invoke this function in the qml or cpp

Please use plain text.
Regular Contributor
Megha_9_dec
Posts: 56
Registered: ‎08-21-2012
My Carrier: RIM

Re: how to use camerasettings api

Hi Arjun,

 

There're two ways: using QML 

 

Camera {
id: camera1
preferredWidth: 1280
preferredHeight: 768
}

// A CameraSettings object to store the flash mode.
attachedObjects: [
CameraSettings {
id: cam_settings
}
]

 

 

Using Cpp: 


Camera *camera = root->findChild<Camera*>("myCamera");
camera->open(CameraUnit::Rear);
CameraSettings* cameraSettings = new CameraSettings();
cameraSettings->setCameraMode(CameraMode::smileytongue:hoto);
 cameraSettings->setFlashMode(CameraFlashMode::Light);
cameraSettings->setCaptureResolution(QSize(768, 1280));
camera->applySettings(cameraSettings);

 

 

Please use plain text.