CopperSpice API  1.7.2
QCameraFeedbackControl Class Referenceabstract

Allows controlling feedback during camera operation. More...

Inheritance diagram for QCameraFeedbackControl:
QMediaControl QObject

Public Types

enum  EventType
 

Public Methods

 ~QCameraFeedbackControl ()
 
virtual bool isEventFeedbackEnabled (EventType) const = 0
 
virtual bool isEventFeedbackLocked (EventType) const = 0
 
virtual void resetEventFeedback (EventType) = 0
 
virtual bool setEventFeedbackEnabled (EventType, bool) = 0
 
virtual bool setEventFeedbackSound (EventType, const QString &filePath) = 0
 
- Public Methods inherited from QMediaControl
 ~QMediaControl ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

 QCameraFeedbackControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QMediaControl
 QMediaControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Related Functions

These are not member functions

#define QCameraFeedbackControl_iid   "com.copperspice.CS.cameraFeedBackControl/1.0"
 

Additional Inherited Members

- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The QCameraFeedbackControl class allows controlling feedback, such as sounds, during camera operation.

When using a camera there are several events times when feedback to the user is provided. For example, when an image is taken or when recording is started. User feedback can enabled or disabled or modify a sound which can be played. In some cases it may be undesirable to play a sound effect. For example, when initiating video recording.

The interface name of QCameraFeedbackControl is "com.copperspice.CS.cameraFeedBackControl/1.0" as defined in QCameraFeedbackControl_iid.

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.

See also
QCamera

Member Enumeration Documentation

This enum describes 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

Constructor & Destructor Documentation

QCameraFeedbackControl::~QCameraFeedbackControl ( )

Destroys the camera feedback control object.

QCameraFeedbackControl::QCameraFeedbackControl ( QObject parent = nullptr)
explicitprotected

Constructs a camera feedback control object with parent.

Method Documentation

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

Returns true if the feedback for event is enabled.

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.

void QCameraFeedbackControl::resetEventFeedback ( EventType  event)
pure virtual

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

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. The may occur when the feedback type is locked.

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 method 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 method will return true but the feedback will use the original setting.

Friends And Related Function Documentation

#define QCameraFeedbackControl_iid   "com.copperspice.CS.cameraFeedBackControl/1.0"
related

Defines the interface name of the QCameraFeedbackControl class to "com.copperspice.CS.cameraFeedBackControl/1.0".