Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QCameraControl Class

The QCameraControl class is an abstract base class for classes that control still cameras or video cameras. More...

 #include <QCameraControl>

Inherits: QMediaControl.

Public Types

enum PropertyChangeType { CaptureMode, ImageEncodingSettings, VideoEncodingSettings, Viewfinder }

Public Functions

~QCameraControl()
virtual bool canChangeProperty(PropertyChangeType changeType, QCamera::Status status) const = 0
virtual QCamera::CaptureModes captureMode() const = 0
virtual bool isCaptureModeSupported(QCamera::CaptureModes mode) const = 0
virtual void setCaptureMode(QCamera::CaptureModes mode) = 0
virtual void setState(QCamera::State state) = 0
virtual QCamera::State state() const = 0
virtual QCamera::Status status() const = 0
  • 31 public functions inherited from QObject

Signals

void captureModeChanged(QCamera::CaptureModes mode)
void error(int error, const QString & errorString)
void stateChanged(QCamera::State state)
void statusChanged(QCamera::Status status)

Protected Functions

QCameraControl(QObject * parent = 0)
  • 9 protected functions inherited from QObject

Macros

QCameraControl_iid

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QCameraControl class is an abstract base class for classes that control still cameras or video cameras.

This service is provided by a QMediaService object via QMediaService::control(). It is used by QCamera.

The interface name of QCameraControl is org.qt-project.qt.cameracontrol/5.0 as defined in QCameraControl_iid.

See also QMediaService::requestControl() and QCamera.

Member Type Documentation

enum QCameraControl::PropertyChangeType

ConstantValueDescription
QCameraControl::CaptureMode1Indicates the capture mode is changed.
QCameraControl::ImageEncodingSettings2Image encoder settings are changed, including resolution.
QCameraControl::VideoEncodingSettings3Video encoder settings are changed, including audio, video and container settings.
QCameraControl::Viewfinder4Viewfinder is changed.

Member Function Documentation

QCameraControl::QCameraControl(QObject * parent = 0) [protected]

Constructs a camera control object with parent.

QCameraControl::~QCameraControl()

Destruct the camera control object.

bool QCameraControl::canChangeProperty(PropertyChangeType changeType, QCamera::Status status) const [pure virtual]

Returns true if backend can effectively apply changing camera properties of changeType type while the camera state is QCamera::Active and camera status matches status parameter.

If backend doesn't support applying this change in the active state, it will be stopped before the settings are changed and restarted after. Otherwise the backend should apply the change in the current state, with the camera status indicating the progress, if necessary.

QCamera::CaptureModes QCameraControl::captureMode() const [pure virtual]

Returns the current capture mode.

See also setCaptureMode().

void QCameraControl::captureModeChanged(QCamera::CaptureModes mode) [signal]

Signal emitted when the camera capture mode changes.

void QCameraControl::error(int error, const QString & errorString) [signal]

Signal emitted when an error occurs with error code error and a description of the error errorString.

bool QCameraControl::isCaptureModeSupported(QCamera::CaptureModes mode) const [pure virtual]

Returns true if the capture mode is suported.

void QCameraControl::setCaptureMode(QCamera::CaptureModes mode) [pure virtual]

Sets the current capture mode.

The capture mode changes are synchronous and allowed in any camera state.

If the capture mode is changed while camera is active, it's recommended to change status to QCamera::LoadedStatus and start activating the camera in the next event loop with the status changed to QCamera::StartingStatus. This allows the capture settings to be applied before camera is started. Than change the status to QCamera::StartedStatus when the capture mode change is done.

See also captureMode().

void QCameraControl::setState(QCamera::State state) [pure virtual]

Sets the camera state.

State changes are synchronous and indicate user intention, while camera status is used as a feedback mechanism to inform application about backend status. Status changes are reported asynchronously with QCameraControl::statusChanged() signal.

See also state() and QCamera::State.

QCamera::State QCameraControl::state() const [pure virtual]

Returns the state of the camera service.

See also setState() and QCamera::state.

void QCameraControl::stateChanged(QCamera::State state) [signal]

Signal emitted when the camera state changes.

In most cases the state chage is caused by QCameraControl::setState(), but if critical error has occurred the state changes to QCamera::UnloadedState.

QCamera::Status QCameraControl::status() const [pure virtual]

Returns the status of the camera service.

See also QCamera::state.

void QCameraControl::statusChanged(QCamera::Status status) [signal]

Signal emitted when the camera status changes.

Macro Documentation

QCameraControl_iid

org.qt-project.qt.cameracontrol/5.0

Defines the interface name of the QCameraControl class.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web