CopperSpice API
1.9.2
|
Provides an interface for exposure related camera settings. More...
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< QString > | dynamicPropertyNames () const |
virtual bool | event (QEvent *event) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
template<typename T > | |
T | findChild (const QString &childName=QString ()) const |
template<class T > | |
QList< T > | findChildren (const QRegularExpression ®Exp, 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 QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const |
QObject * | parent () const |
template<class T = QVariant> | |
T | 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) |
QThread * | thread () 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 QMetaObject & | staticMetaObject () |
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) |
Related Functions inherited from QObject | |
T | qobject_cast (QObject *object) |
QObjectList | |
The QCameraExposure class provides an interface for exposure related camera settings.
Typedef for QFlags<FlashMode> which contains an OR combination of FlashMode values.
Refer to QCameraExposure::FlashMode for the enum 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. |
double QCameraExposure::aperture | ( | ) | const |
Returns the value of the property.
|
signal |
Signal emitted when aperture changes to value.
|
signal |
Signal emitted when aperture range has changed.
double QCameraExposure::exposureCompensation | ( | ) | const |
Returns the value of the property.
|
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.
|
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.
|
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.
|
slot |
Turn on auto aperture.
|
slot |
Turn on auto sensitivity.
|
slot |
Turn on auto shutter speed.
|
slot |
Sets the value of the property to value.
|
slot |
Sets the value of the property to mode.
|
slot |
Sets the value of the property to mode.
|
slot |
Sets the manual camera aperture value.
|
slot |
Sets the manual sensitivity to iso.
|
slot |
Set the manual shutter speed to seconds.
|
slot |
Sets the value of the property to mode.
void QCameraExposure::setSpotMeteringPoint | ( | const QPointF & | point | ) |
Allows setting the spot metering point to point.
double QCameraExposure::shutterSpeed | ( | ) | const |
Returns the current shutter speed in seconds.
|
signal |
Signals a camera's shutter speed has changed.
|
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.
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.
|
Lens aperture is specified as an F number, the ratio of the focal length to effective aperture diameter.
Properties | Class Methods |
---|---|
read | aperture |
notify | apertureChanged |
|
Exposure compensation in EV units. Exposure compensation property allows to adjust the automatically calculated exposure.
Properties | Class Methods |
---|---|
read | exposureCompensation |
write | setExposureCompensation |
notify | exposureCompensationChanged |
|
This property holds the exposure mode being used.
Properties | Class Methods |
---|---|
read | exposureMode |
write | setExposureMode |
|
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.
Properties | Class Methods |
---|---|
read | flashMode |
write | setFlashMode |
|
Indicates if the flash is charged and ready to use.
Properties | Class Methods |
---|---|
read | isFlashReady |
notify | flashReady |
|
This property holds the sensor ISO sensitivity.
Properties | Class Methods |
---|---|
read | isoSensitivity |
notify | isoSensitivityChanged |
|
This property holds the metering mode being used.
Properties | Class Methods |
---|---|
read | meteringMode |
write | setMeteringMode |
|
This property holds the camera's shutter speed in seconds.
Properties | Class Methods |
---|---|
read | shutterSpeed |
notify | shutterSpeedChanged |