QCameraFeedbackControl Class
The QCameraFeedbackControl class allows controlling feedback (sounds etc) during camera operation. More...
Header: | #include <QCameraFeedbackControl> |
qmake: | QT += multimedia |
Since: | Qt 5.0 |
Inherits: | QMediaControl |
Public Types
enum | EventType { ViewfinderStarted, ViewfinderStopped, ImageCaptured, ImageSaved, ..., AutoFocusFailed } |
Public Functions
virtual | ~QCameraFeedbackControl() |
virtual bool | isEventFeedbackEnabled(QCameraFeedbackControl::EventType) const = 0 |
virtual bool | isEventFeedbackLocked(QCameraFeedbackControl::EventType) const = 0 |
virtual void | resetEventFeedback(QCameraFeedbackControl::EventType) = 0 |
virtual bool | setEventFeedbackEnabled(QCameraFeedbackControl::EventType, bool) = 0 |
virtual bool | setEventFeedbackSound(QCameraFeedbackControl::EventType, const QString &filePath) = 0 |
- 31 public functions inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Protected Functions
QCameraFeedbackControl(QObject *parent = nullptr) |
- 9 protected functions inherited from QObject
Macros
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals 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.
Constant | Value | Description |
---|---|---|
QCameraFeedbackControl::ViewfinderStarted | 1 | The viewfinder stream was started (even if not visible) |
QCameraFeedbackControl::ViewfinderStopped | 2 | The viewfinder stream was stopped |
QCameraFeedbackControl::ImageCaptured | 3 | An image was captured but not yet fully processed |
QCameraFeedbackControl::ImageSaved | 4 | An image is fully available and saved somewhere. |
QCameraFeedbackControl::ImageError | 5 | An error occurred while capturing an image |
QCameraFeedbackControl::RecordingStarted | 6 | Video recording has started |
QCameraFeedbackControl::RecordingInProgress | 7 | Video recording is in progress |
QCameraFeedbackControl::RecordingStopped | 8 | Video recording has stopped |
QCameraFeedbackControl::AutoFocusInProgress | 9 | The camera is trying to automatically focus |
QCameraFeedbackControl::AutoFocusLocked | 10 | The camera has automatically focused successfully |
QCameraFeedbackControl::AutoFocusFailed | 11 | The camera was unable to focus automatically |
Member Function Documentation
[protected]
QCameraFeedbackControl::QCameraFeedbackControl(QObject *parent = nullptr)
Constructs a camera feedback control object with parent.
[virtual]
QCameraFeedbackControl::~QCameraFeedbackControl()
Destroys the camera feedback control object.
[pure virtual]
bool QCameraFeedbackControl::isEventFeedbackEnabled(QCameraFeedbackControl::EventType) const
[pure virtual]
bool QCameraFeedbackControl::isEventFeedbackLocked(QCameraFeedbackControl::EventType) const
[pure virtual]
void QCameraFeedbackControl::resetEventFeedback(QCameraFeedbackControl::EventType)
[pure virtual]
bool QCameraFeedbackControl::setEventFeedbackEnabled(QCameraFeedbackControl::EventType, bool)
See also isEventFeedbackEnabled().
[pure virtual]
bool QCameraFeedbackControl::setEventFeedbackSound(QCameraFeedbackControl::EventType, const QString &filePath)
Macro Documentation
QCameraFeedbackControl_iid
org.qt-project.qt.camerafeedbackcontrol/5.0
Defines the interface name of the QCameraFeedbackControl class.