CopperSpice API  1.9.1
QCameraExposure Class Reference

Provides an interface for exposure related camera settings. More...

Inheritance diagram for QCameraExposure:
QObject

Public Typedefs

using FlashModes = QFlags< FlashMode >
 

Public Types

enum  ExposureMode
 
enum  FlashMode
 
enum  MeteringMode
 

Public Signals

void apertureChanged (double value)
 
void apertureRangeChanged ()
 
void exposureCompensationChanged (double value)
 
void flashReady (bool ready)
 
void isoSensitivityChanged (int value)
 
void shutterSpeedChanged (double speed)
 
void shutterSpeedRangeChanged ()
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

void setAutoAperture ()
 
void setAutoIsoSensitivity ()
 
void setAutoShutterSpeed ()
 
void setExposureCompensation (double value)
 
void setExposureMode (ExposureMode mode)
 
void setFlashMode (FlashModes mode)
 
void setManualAperture (double aperture)
 
void setManualIsoSensitivity (int iso)
 
void setManualShutterSpeed (double seconds)
 
void setMeteringMode (MeteringMode mode)
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

double aperture () const
 
double exposureCompensation () const
 
ExposureMode exposureMode () const
 
FlashModes flashMode () const
 
bool isAvailable () const
 
bool isExposureModeSupported (ExposureMode mode) const
 
bool isFlashModeSupported (FlashModes mode) const
 
bool isFlashReady () const
 
bool isMeteringModeSupported (MeteringMode mode) const
 
int isoSensitivity () const
 
MeteringMode meteringMode () const
 
double requestedAperture () const
 
int requestedIsoSensitivity () const
 
double requestedShutterSpeed () const
 
void setSpotMeteringPoint (const QPointF &point)
 
double shutterSpeed () const
 
QPointF spotMeteringPoint () const
 
QList< double > supportedApertures (bool *continuous=nullptr) const
 
QList< int > supportedIsoSensitivities (bool *continuous=nullptr) const
 
QList< double > supportedShutterSpeeds (bool *continuous=nullptr) const
 
- 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 &childName=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
 

Properties

 aperture
 
 exposureCompensation
 
 exposureMode
 
 flashMode
 
 flashReady
 
 isoSensitivity
 
 meteringMode
 
 shutterSpeed
 
- Properties inherited from QObject
 objectName
 

Friends

class QCamera
 

Additional Inherited Members

- 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)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
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 >())
 
- 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)
 

Detailed Description

The QCameraExposure class provides an interface for exposure related camera settings.

Member Typedef Documentation

Member Enumeration Documentation

Enum values for the different camera exposure modes.

Constant Value Description
QCameraExposure::ExposureAuto 0 Automatic mode.
QCameraExposure::ExposureManual 1 Manual mode.
QCameraExposure::ExposurePortrait 2 Portrait exposure mode.
QCameraExposure::ExposureNight 3 Night mode.
QCameraExposure::ExposureBacklight 4 Backlight exposure mode.
QCameraExposure::ExposureSpotlight 5 Spotlight exposure mode.
QCameraExposure::ExposureSports 6 Spots exposure mode.
QCameraExposure::ExposureSnow 7 Snow exposure mode.
QCameraExposure::ExposureBeach 8 Beach exposure mode.
QCameraExposure::ExposureLargeAperture 9 Use larger aperture with small depth of field.
QCameraExposure::ExposureSmallAperture 10 Use smaller aperture.
QCameraExposure::ExposureAction 11 Action mode
QCameraExposure::ExposureLandscape 12 Landscape mode
QCameraExposure::ExposureNightPortrait 13 Night portrait mode
QCameraExposure::ExposureTheatre 14 Theatre mode
QCameraExposure::ExposureSunset 15 Sunset mode
QCameraExposure::ExposureSteadyPhoto 16 Steady photo mode
QCameraExposure::ExposureFireworks 17 Fireworks mode
QCameraExposure::ExposureParty 18 Party mode
QCameraExposure::ExposureCandlelight 19 Candlelight mode
QCameraExposure::ExposureBarcode 20 Barcode mode
QCameraExposure::ExposureModeVendor 1000 The base value for device specific exposure modes.

Enum values for the different flash modes.

Constant Value Description
QCameraExposure::FlashAuto 0x1 Automatic flash.
QCameraExposure::FlashOff 0x2 Flash is Off.
QCameraExposure::FlashOn 0x4 Flash is On.
QCameraExposure::FlashRedEyeReduction 0x8 Red eye reduction flash.
QCameraExposure::FlashFill 0x10 Use flash to fill in shadows.
QCameraExposure::FlashTorch 0x20 Constant light source. If supported, torch can be enabled without loading the camera.
QCameraExposure::FlashVideoLight 0x40 Constant light source, useful for video capture. The light is turned on only while camera is active.
QCameraExposure::FlashSlowSyncFrontCurtain 0x80 Use the flash in conjunction with a slow shutter speed. This mode allows better exposure of distant objects and/or motion blur effect.
QCameraExposure::FlashSlowSyncRearCurtain 0x100 The similar mode to FlashSlowSyncFrontCurtain but flash is fired at the end of exposure.
QCameraExposure::FlashManual 0x200 Flash power is manually set.

Enum values for the different metering modes.

Constant Value Description
QCameraExposure::MeteringMatrix 1 Matrix metering mode.
QCameraExposure::MeteringAverage 2 Center weighted average metering mode.
QCameraExposure::MeteringSpot 3 Spot metering mode.

Method Documentation

double QCameraExposure::aperture ( ) const

Returns the value of the property.

void QCameraExposure::apertureChanged ( double  value)
signal

Signal emitted when aperture changes to value.

void QCameraExposure::apertureRangeChanged ( )
signal

Signal emitted when aperture range has changed.

double QCameraExposure::exposureCompensation ( ) const

Returns the value of the property.

void QCameraExposure::exposureCompensationChanged ( double  value)
signal

Signal emitted when the exposure compensation changes to value.

ExposureMode QCameraExposure::exposureMode ( ) const

Returns the value of the property.

FlashModes QCameraExposure::flashMode ( ) const

Returns the value of the property.

void QCameraExposure::flashReady ( bool  ready)
signal

Signal the flash ready status has changed.

bool QCameraExposure::isAvailable ( ) const

Returns true if exposure settings are supported by this camera.

bool QCameraExposure::isExposureModeSupported ( ExposureMode  mode) const

Returns true if the exposure mode is supported.

bool QCameraExposure::isFlashModeSupported ( FlashModes  mode) const

Returns true if the flash mode is supported.

bool QCameraExposure::isFlashReady ( ) const

Returns true if flash is charged.

bool QCameraExposure::isMeteringModeSupported ( MeteringMode  mode) const

Returns true if the metering mode is supported.

int QCameraExposure::isoSensitivity ( ) const

Returns the value of the property.

void QCameraExposure::isoSensitivityChanged ( int  value)
signal

Signal emitted when sensitivity changes to value.

MeteringMode QCameraExposure::meteringMode ( ) const

Returns the value of the property.

double QCameraExposure::requestedAperture ( ) const

Returns the requested manual aperture or -1.0 if automatic aperture is turned on.

int QCameraExposure::requestedIsoSensitivity ( ) const

Returns the requested ISO sensitivity or -1 if automatic ISO is turned on.

double QCameraExposure::requestedShutterSpeed ( ) const

Returns the requested manual shutter speed in seconds or -1.0 if automatic shutter speed is turned on.

void QCameraExposure::setAutoAperture ( )
slot

Turn on auto aperture.

void QCameraExposure::setAutoIsoSensitivity ( )
slot

Turn on auto sensitivity.

void QCameraExposure::setAutoShutterSpeed ( )
slot

Turn on auto shutter speed.

void QCameraExposure::setExposureCompensation ( double  value)
slot

Sets the value of the property to value.

void QCameraExposure::setExposureMode ( ExposureMode  mode)
slot

Sets the value of the property to mode.

void QCameraExposure::setFlashMode ( FlashModes  mode)
slot

Sets the value of the property to mode.

void QCameraExposure::setManualAperture ( double  aperture)
slot

Sets the manual camera aperture value.

void QCameraExposure::setManualIsoSensitivity ( int  iso)
slot

Sets the manual sensitivity to iso.

void QCameraExposure::setManualShutterSpeed ( double  seconds)
slot

Set the manual shutter speed to seconds.

void QCameraExposure::setMeteringMode ( MeteringMode  mode)
slot

Sets the value of the property to mode.

void QCameraExposure::setSpotMeteringPoint ( const QPointF point)

Allows setting the spot metering point to point.

See also
spotMeteringPoint()
double QCameraExposure::shutterSpeed ( ) const

Returns the current shutter speed in seconds.

void QCameraExposure::shutterSpeedChanged ( double  speed)
signal

Signals a camera's shutter speed has changed.

void QCameraExposure::shutterSpeedRangeChanged ( )
signal

Signal emitted when the shutter speed range has changed.

QPointF QCameraExposure::spotMeteringPoint ( ) const

When supported, the spot metering point is the (normalized) position of the point of the image where exposure metering will be performed. This is typically used to indicate an "interesting" area of the image that should be exposed properly.

The coordinates are relative frame coordinates: QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center, which is typically the default spot metering point.

The spot metering point is only used with spot metering mode.

See also
setSpotMeteringPoint()
QList< double > QCameraExposure::supportedApertures ( bool *  continuous = nullptr) const

Returns the list of aperture values camera supports. The apertures list can change depending on the focal length, in such a case the apertureRangeChanged() signal is emitted. If the camera supports arbitrary aperture values within the supported range, continuous is set to true, otherwise continuous is set to false.

QList< int > QCameraExposure::supportedIsoSensitivities ( bool *  continuous = nullptr) const

Returns the list of ISO sensitivities camera supports. If the camera supports arbitrary ISO sensitivities within the supported range, continuous is set to true, otherwise continuous is set to false.

QList< double > QCameraExposure::supportedShutterSpeeds ( bool *  continuous = nullptr) const

Returns the list of shutter speed values in seconds camera supports. If the camera supports arbitrary shutter speed values within the supported range, continuous is set to true, otherwise continuous is set to false.

Property Documentation

QCameraExposure::aperture

Lens aperture is specified as an F number, the ratio of the focal length to effective aperture diameter.

See also
supportedApertures(), setAutoAperture(), setManualAperture(), requestedAperture()
PropertiesClass Methods
read aperture
notify apertureChanged
QCameraExposure::exposureCompensation

Exposure compensation in EV units. Exposure compensation property allows to adjust the automatically calculated exposure.

PropertiesClass Methods
read exposureCompensation
write setExposureCompensation
notify exposureCompensationChanged
QCameraExposure::exposureMode

This property holds the exposure mode being used.

PropertiesClass Methods
read exposureMode
write setExposureMode
QCameraExposure::flashMode

This property holds the flash mode being used.

Usually the single QCameraExposure::FlashMode flag is used, but some non conflicting flags combination are also allowed, like QCameraExposure::FlashManual | QCameraExposure::FlashSlowSyncRearCurtain.

PropertiesClass Methods
read flashMode
write setFlashMode
QCameraExposure::flashReady

Indicates if the flash is charged and ready to use.

PropertiesClass Methods
read isFlashReady
notify flashReady
QCameraExposure::isoSensitivity

This property holds the sensor ISO sensitivity.

PropertiesClass Methods
read isoSensitivity
notify isoSensitivityChanged
QCameraExposure::meteringMode

This property holds the metering mode being used.

PropertiesClass Methods
read meteringMode
write setMeteringMode
QCameraExposure::shutterSpeed

This property holds the camera's shutter speed in seconds.

PropertiesClass Methods
read shutterSpeed
notify shutterSpeedChanged