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  · 

QCameraFeedbackControl Class

The QCameraFeedbackControl class allows controlling feedback (sounds etc) during camera operation More...

 #include <QCameraFeedbackControl>

Inherits: QMediaControl.

This class was introduced in Qt 5.0.

Public Types

enum EventType { ViewfinderStarted, ViewfinderStopped, ImageCaptured, ImageSaved, ..., AutoFocusFailed }

Public Functions

~QCameraFeedbackControl()
virtual bool isEventFeedbackEnabled(EventType event) const = 0
virtual bool isEventFeedbackLocked(EventType event) const = 0
virtual void resetEventFeedback(EventType event) = 0
virtual bool setEventFeedbackEnabled(EventType event, bool enabled) = 0
virtual bool setEventFeedbackSound(EventType event, const QString & filePath) = 0
  • 31 public functions inherited from QObject

Protected Functions

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

Macros

QCameraFeedbackControl_iid

Additional Inherited Members

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

Detailed Description

The QCameraFeedbackControl class allows controlling feedback (sounds etc) during camera operation

When using a camera, there are several times when some form of feedback to the user is given - for example, when an image is taken, or when recording is started. You can enable or disable some of this feedback, or adjust what sound might be played for these actions.

In some cases it may be undesirable to play a sound effect - for example, when initiating video recording the sound itself may be recorded.

Note: In some countries or regions, feedback sounds or other indications (e.g. a red light) are mandatory during camera operation. In these cases, you can check isEventFeedbackLocked to check if that type of feedback can be modified. Any attempts to change a locked feedback type will be ignored.

The interface name of QCameraFeedbackControl is org.qt-project.qt.camerafeedbackcontrol/5.0 as defined in QCameraFeedbackControl_iid.

See also QCamera.

Member Type Documentation

enum QCameraFeedbackControl::EventType

This enumeration describes certain events that occur during camera usage. You can associate some form of feedback to be given when the event occurs, or check whether feedback for this event is enabled or locked so that changes cannot be made.

ConstantValueDescription
QCameraFeedbackControl::ViewfinderStarted1The viewfinder stream was started (even if not visible)
QCameraFeedbackControl::ViewfinderStopped2The viewfinder stream was stopped
QCameraFeedbackControl::ImageCaptured3An image was captured but not yet fully processed
QCameraFeedbackControl::ImageSaved4An image is fully available and saved somewhere.
QCameraFeedbackControl::ImageError5An error occurred while capturing an image
QCameraFeedbackControl::RecordingStarted6Video recording has started
QCameraFeedbackControl::RecordingInProgress7Video recording is in progress
QCameraFeedbackControl::RecordingStopped8Video recording has stopped
QCameraFeedbackControl::AutoFocusInProgress9The camera is trying to automatically focus
QCameraFeedbackControl::AutoFocusLocked10The camera has automatically focused successfully
QCameraFeedbackControl::AutoFocusFailed11The camera was unable to focus automatically

Member Function Documentation

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

Constructs a camera feedback control object with parent.

QCameraFeedbackControl::~QCameraFeedbackControl()

Destroys the camera feedback control object.

bool QCameraFeedbackControl::isEventFeedbackEnabled(EventType event) const [pure virtual]

Returns true if the feedback for event is enabled.

This function was introduced in Qt 5.0.

bool QCameraFeedbackControl::isEventFeedbackLocked(EventType event) const [pure virtual]

Returns true if the feedback setting for event is locked. This may be true because of legal compliance issues, or because configurability of this event's feedback is not supported.

This function was introduced in Qt 5.0.

void QCameraFeedbackControl::resetEventFeedback(EventType event) [pure virtual]

Restores the feedback setting for this event to its default setting.

This function was introduced in Qt 5.0.

bool QCameraFeedbackControl::setEventFeedbackEnabled(EventType event, bool enabled) [pure virtual]

Turns on feedback for the specific event if enabled is true, otherwise disables the feedback. Returns true if the feedback could be modified, or false otherwise (e.g. this feedback type is locked).

This function was introduced in Qt 5.0.

See also isEventFeedbackEnabled().

bool QCameraFeedbackControl::setEventFeedbackSound(EventType event, const QString & filePath) [pure virtual]

When the given event occurs, the sound effect referenced by filePath will be played instead of the default sound.

If this feedback type is locked, or if the supplied path is inaccessible, this function will return false. In addition, some forms of feedback may be non-auditory (e.g. a red light, or a vibration), and false may be returned in this case.

The file referenced should be linear PCM (WAV format).

Note: In the case that a valid file path to an unsupported file is given, this function will return true but the feedback will use the original setting.

This function was introduced in Qt 5.0.

Macro Documentation

QCameraFeedbackControl_iid

org.qt-project.qt.camerafeedbackcontrol/5.0

Defines the interface name of the QCameraFeedbackControl 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