IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

CameraFlash QML Type

An interface for flash related camera settings.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

CameraFlash QML Type

  • Import Statement: import QtMultimedia 5.12

  • Group: CameraFlash is part of multimedia_qml, camera_qml

Detailed Description

This type allows you to operate the camera flash hardware and control the flash mode used. Not all cameras have flash hardware (and in some cases it is shared with the torch hardware).

It should not be constructed separately, instead the flash property of a Camera should be used.

 
Sélectionnez
Camera {
    id: camera

    exposure.exposureCompensation: -1.0
    flash.mode: Camera.FlashRedEyeReduction
}

Property Documentation

 

mode : enumeration

This property holds the camera flash mode.

The mode can be one of the following:

Value

Description

Camera.FlashOff

Flash is Off.

Camera.FlashOn

Flash is On.

Camera.FlashAuto

Automatic flash.

Camera.FlashRedEyeReduction

Red eye reduction flash.

Camera.FlashFill

Use flash to fillin shadows.

Camera.FlashTorch

Constant light source. If supported, torch can be enabled without loading the camera.

Camera.FlashVideoLight

Constant light source, useful for video capture. The light is turned on only while the camera is active.

Camera.FlashSlowSyncFrontCurtain

Use the flash in conjunction with a slow shutter speed. This mode allows better exposure of distant objects and/or motion blur effect.

Camera.FlashSlowSyncRearCurtain

The similar mode to FlashSlowSyncFrontCurtain but flash is fired at the end of exposure.

Camera.FlashManual

Flash power is manually set.

[read-only] ready : bool

This property indicates whether the flash is charged.

[read-only, since 5.9] supportedModes : list<FlashMode>

This property holds the supported flash modes of the camera. If the list only contains Camera.FlashOff, no flash is supported.

 
Sélectionnez
Camera {
    id: camera
    flash {
        onSupportedModesChanged {
            if (flash.supportedModes.length == 1) {
                // no flash supported
            } else {
                // some flash is supported
            }
        }
    }
}

This property was introduced in Qt 5.9.

See Also

See also mode

Signal Documentation

 

flashModeChanged(int)

This signal is emitted when the flashMode property is changed. The corresponding handler is onFlashModeChanged.

The corresponding handler is onFlashModeChanged.

flashReady(bool)

This signal is emitted when QCameraExposure indicates that the flash is ready to use. The corresponding handler is onFlashReadyChanged.

The corresponding handler is onFlashReady.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+