Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QML Camera Element

The Camera element allows you to add camera viewfinder to a scene. More...

Inherits Item

Camera instantiates the C++ class QDeclarativeCamera

  • List of all members, including inherited members
  • Properties

    Signals

    Detailed Description

    This element is part of the QtMultimediaKit 1.1 module.

     import Qt 4.7
     import QtMultimediaKit 1.1
    
     Camera {
         focus : visible // to receive focus and capture key events when visible
    
         flashMode: Camera.FlashRedEyeReduction
         whiteBalanceMode: Camera.WhiteBalanceFlash
         exposureCompensation: -1.0
    
         onImageCaptured : {
             photoPreview.source = preview  // Show the preview in an Image element
         }
    
     }

    You can use the Camera element to capture images from a camera, and manipulate the capture and processing settings that get applied to the image.

    Note: On Symbian, your process requires the UserEnvironment capability to use this element.

    Property Documentation

    read-onlyaperture : real

    The lens aperture as an F number (the ratio of the focal length to effective aperture diameter).

    This documentation was introduced in Qt Mobility Mobility 1.1.


    cameraState : enumeration

    The current state of the camera object.

    ValueDescription
    UnloadedStateThe initial camera state, with camera not loaded, the camera capabilities except of supported capture modes are unknown. While the supported settings are unknown in this state, it's allowed to set the camera capture settings like codec, resolution, or frame rate.
    LoadedStateThe camera is loaded and ready to be configured.

    In the Idle state it's allowed to query camera capabilities, set capture resolution, codecs, etc.

    The viewfinder is not active in the loaded state.

    ActiveStateIn the active state as soon as camera is started the viewfinder displays video frames and the camera is ready for capture.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    captureResolution : size

    The resolution to capture the image at. If empty, the system will pick a good size.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlycapturedImagePath : string

    The path to the captured image.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    digitalZoom : real

    The current digital zoom factor.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlyerrorString : string

    A description of the current error, if any.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    exposureCompensation : real

    Adjustment for the automatically calculated exposure. The value is in EV units.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    exposureMode : enumeration

    ValueDescription
    ExposureManualManual mode.
    ExposureAutoAutomatic mode.
    ExposureNightNight mode.
    ExposureBacklightBacklight exposure mode.
    ExposureSpotlightSpotlight exposure mode.
    ExposureSportsSpots exposure mode.
    ExposureSnowSnow exposure mode.
    ExposureBeachBeach exposure mode.
    ExposureLargeApertureUse larger aperture with small depth of field.
    ExposureSmallApertureUse smaller aperture.
    ExposurePortraitPortrait exposure mode.
    ExposureModeVendorThe base value for device specific exposure modes.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    flashMode : enumeration

    ValueDescription
    FlashOffFlash is Off.
    FlashOnFlash is On.
    FlashAutoAutomatic flash.
    FlashRedEyeReductionRed eye reduction flash.
    FlashFillUse flash to fillin shadows.
    FlashTorchConstant light source, useful for focusing and video capture.
    FlashSlowSyncFrontCurtainUse the flash in conjunction with a slow shutter speed. This mode allows better exposure of distant objects and/or motion blur effect.
    FlashSlowSyncRearCurtainThe similar mode to FlashSlowSyncFrontCurtain but flash is fired at the end of exposure.
    FlashManualFlash power is manually set.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    isoSensitivity : real

    The sensor's ISO sensitivity.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlylockStatus : enumeration

    The overall status for all the requested camera locks.

    ValueDescription
    UnlockedThe application is not interested in camera settings value. The camera may keep this parameter without changes, this is common with camera focus, or adjust exposure and white balance constantly to keep the viewfinder image nice.
    SearchingThe application has requested the camera focus, exposure or white balance lock with searchAndLock(). This state indicates the camera is focusing or calculating exposure and white balance.
    LockedThe camera focus, exposure or white balance is locked. The camera is ready to capture, application may check the exposure parameters.

    The locked state usually means the requested parameter stays the same, except in the cases when the parameter is requested to be constantly updated. For example in continuous focusing mode, the focus is considered locked as long and the object is in focus, even while the actual focusing distance may be constantly changing.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    manualWhiteBalance : int

    The color temperature used when in manual white balance mode (WhiteBalanceManual).

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also whiteBalanceMode.


    read-onlymaximumDigitalZoom : real

    The maximum digital zoom factor, or 1.0 if digital zoom is not supported.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlymaximumOpticalZoom : real

    The maximum optical zoom factor, or 1.0 if optical zoom is not supported.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    opticalZoom : real

    The current optical zoom factor.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlyshutterSpeed : real

    The camera's shutter speed, in seconds.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    whiteBalanceMode : enumeration

    ValueDescription
    WhiteBalanceManualManual white balance. In this mode the manual white balance property value is used.
    WhiteBalanceAutoAuto white balance mode.
    WhiteBalanceSunlightSunlight white balance mode.
    WhiteBalanceCloudyCloudy white balance mode.
    WhiteBalanceShadeShade white balance mode.
    WhiteBalanceTungstenTungsten white balance mode.
    WhiteBalanceFluorescentFluorescent white balance mode.
    WhiteBalanceIncandescentIncandescent white balance mode.
    WhiteBalanceFlashFlash white balance mode.
    WhiteBalanceSunsetSunset white balance mode.
    WhiteBalanceVendorVendor defined white balance mode.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also manualWhiteBalance.


    Signal Documentation

    Camera::apertureChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::cameraStateChanged ( Camera::State )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::captureResolutionChanged ( Item )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::digitalZoomChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::errorChanged ()

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::exposureCompensationChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::exposureModeChanged ( Camera::ExposureMode )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::flashModeChanged ( int mode )

    The flash mode is now mode.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also QDeclarativeCamera::FlashMode.


    Camera::imageCaptured ( string )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::imageSaved ( string )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::isoSensitivityChanged ( int )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::lockStatusChanged ()

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::manualWhiteBalanceChanged ( int )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::maximumDigitalZoomChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::maximumOpticalZoomChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::onCaptureFailed ( message )

    This handler is called when an error occurs during capture. A descriptive message is available in message.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::onError ( error, errorString )

    This handler is called when an error occurs. The enumeration value error is one of the values defined below, and a descriptive string value is available in errorString.

    ValueDescription
    NoErrorNo errors have occurred.
    CameraErrorAn error has occurred.
    InvalidRequestErrorSystem resource doesn't support requested functionality.
    ServiceMissingErrorNo camera service available.
    NotSupportedFeatureErrorThe feature is not supported.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::onImageCaptured ( preview )

    This handler is called when an image has been captured but not yet saved to the filesystem. The preview parameter can be used as the URL supplied to an Image element.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also onImageSaved.


    Camera::onImageSaved ( path )

    This handler is called after the image has been written to the filesystem. The path is a local file path, not a URL.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also onImageCaptured.


    Camera::opticalZoomChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::shutterSpeedChanged ( real )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::stateChanged ( Camera::State )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Camera::whiteBalanceModeChanged ( Camera::WhiteBalanceMode )

    This documentation was introduced in Qt Mobility Mobility 1.1.


    Publicité

    Best Of

    Actualités les plus lues

    Semaine
    Mois
    Année

    Le Qt Developer Network au hasard

    Logo

    Utiliser QML et QtWebKit avec PySide

    Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

    Communauté

    Ressources

    Liens utiles

    Contact

    • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

    Qt dans le magazine

    Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.2
    Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
    Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
     
     
     
     
    Partenaires

    Hébergement Web