CopperSpice API  1.7.2
QCameraImageCaptureControl Class Referenceabstract

Provides a control interface for image capture services. More...

Inheritance diagram for QCameraImageCaptureControl:
QMediaControl QObject

Public Signals

void error (int id, int error, const QString &errorString)
 
void imageAvailable (int id, const QVideoFrame &buffer)
 
void imageCaptured (int id, const QImage &preview)
 
void imageExposed (int id)
 
void imageMetadataAvailable (int id, const QString &key, const QVariant &value)
 
void imageSaved (int id, const QString &fileName)
 
void readyForCaptureChanged (bool un_named_arg1)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

 ~QCameraImageCaptureControl ()
 
virtual void cancelCapture () = 0
 
virtual int capture (const QString &fileName) = 0
 
virtual QCameraImageCapture::DriveMode driveMode () const = 0
 
virtual bool isReadyForCapture () const = 0
 
virtual void setDriveMode (QCameraImageCapture::DriveMode mode) = 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

 QCameraImageCaptureControl (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)
 

Additional Inherited Members

- 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 QCameraImageCaptureControl class provides a control interface for image capture services.

The interface name of QCameraImageCaptureControl is "com.copperspice.CS.cameraImageCaptureControl/1.0" as defined in QCameraImageCaptureControl_iid.

See also
QMediaService::requestControl()

Constructor & Destructor Documentation

QCameraImageCaptureControl::~QCameraImageCaptureControl ( )

Destroys this image capture object.

QCameraImageCaptureControl::QCameraImageCaptureControl ( QObject parent = nullptr)
explicitprotected

Constructs a new QCameraImageCaptureControl object with the given parent.

Method Documentation

void QCameraImageCaptureControl::cancelCapture ( )
pure virtual

Cancel pending capture requests.

int QCameraImageCaptureControl::capture ( const QString fileName)
pure virtual

Initiates the capture of an image to fileName. The fileName can be relative or empty, in this case the service should use the system specific place and file naming scheme.

The Camera service should save all the capture parameters like exposure settings or image processing parameters, so changes to camera parameters after capture() is called do not affect previous capture requests.

Returns the capture request id number, which is used later with imageExposed(), imageCaptured() and imageSaved() signals.

QCameraImageCapture::DriveMode QCameraImageCaptureControl::driveMode ( ) const
pure virtual

Returns the current camera drive mode.

See also
setDriveMode()
void QCameraImageCaptureControl::error ( int  id,
int  error,
const QString errorString 
)
signal

Signals the capture request id failed with the given error code and message errorString.

See also
QCameraImageCapture::Error
void QCameraImageCaptureControl::imageAvailable ( int  requestId,
const QVideoFrame buffer 
)
signal

This signal indicates a captured buffer with a corresponding requestId is available.

void QCameraImageCaptureControl::imageCaptured ( int  requestId,
const QImage preview 
)
signal

This signal indicates that an image with a given requestId has been captured and a preview is available.

void QCameraImageCaptureControl::imageExposed ( int  requestId)
signal

Signals that an image with the requestId has just been exposed. This signal can be used for the shutter sound or other indications.

void QCameraImageCaptureControl::imageMetadataAvailable ( int  id,
const QString key,
const QVariant value 
)
signal

Signals that metadata for an image with request id is available. Signal also contains the key and value of the metadata.

This signal should be emitted between imageExposed and imageSaved signals.

void QCameraImageCaptureControl::imageSaved ( int  requestId,
const QString fileName 
)
signal

Signals that a captured image with a requestId has been saved to fileName.

bool QCameraImageCaptureControl::isReadyForCapture ( ) const
pure virtual

Identifies if a capture control is ready to perform a capture immediately (all the resources necessary for image capture are allocated, hardware initialized, flash is charged, etc).

Returns true if the camera is ready for capture; and false if it is not.

It is permissible to call capture() while the camera status is QCamera::ActiveStatus regardless of isReadyForCapture property value. If camera is not ready to capture image immediately, the capture request is queued with all the related camera settings to be executed as soon as possible.

void QCameraImageCaptureControl::readyForCaptureChanged ( bool  ready)
signal

This signal indicates the ready state has changed.

void QCameraImageCaptureControl::setDriveMode ( QCameraImageCapture::DriveMode  mode)
pure virtual

Sets the current camera drive mode.

See also
driveMode()