QCamera Class ReferenceThe QCamera class provides interface for system camera devices. More... #include <QCamera> This class is under development and is subject to change. Inherits QMediaObject. Public Types
Properties
Public Functions
Public Slots
Signals
Static Public Members
Additional Inherited Members
Detailed DescriptionThe QCamera class provides interface for system camera devices. QCamera can be used with QVideoWidget for viewfinder display and QMediaRecorder for video recording. camera = new QCamera; viewFinder = new QVideoWidget(camera); viewFinder->show(); recorder = QMediaRecorder(camera); camera->start(); The Camera API of Qt Mobility is still in ALPHA. It has not undergone the same level of review and testing as the rest of the APIs. The API exposed by the classes in this component are not stable, and will undergo modification or removal prior to the final release of Qt Mobility. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QCamera::NoError | 0 | No errors have occurred. |
QCamera::CameraError | 1 | An error has occurred. |
QCamera::NotReadyToCaptureError | 2 | System resource not available. |
QCamera::InvalidRequestError | 3 | System resource doesn't support functionality. |
QCamera::ServiceMissingError | 4 | No service available. |
QCamera::NotSupportedFeatureError | 5 | The feature is not supported. |
Constant | Value | Description |
---|---|---|
QCamera::ExposureManual | 0x1 | Manual mode. |
QCamera::ExposureAuto | 0x2 | Automatic mode. |
QCamera::ExposureNight | 0x4 | Night mode. |
QCamera::ExposureBacklight | 0x8 | Backlight exposure mode. |
QCamera::ExposureSpotlight | 0x10 | Spotlight exposure mode. |
QCamera::ExposureSports | 0x20 | Spots exposure mode. |
QCamera::ExposureSnow | 0x40 | Snow exposure mode. |
QCamera::ExposureBeach | 0x80 | Beach exposure mode. |
QCamera::ExposureLargeAperture | 0x100 | Use larger aperture with small depth of field. |
QCamera::ExposureSmallAperture | 0x200 | Use smaller aperture. |
QCamera::ExposurePortrait | 0x400 | Portrait exposure mode. |
The ExposureModes type is a typedef for QFlags<ExposureMode>. It stores an OR combination of ExposureMode values.
Constant | Value | Description |
---|---|---|
QCamera::CorrectExposure | 0 | The exposure is correct. |
QCamera::UnderExposure | 1 | The photo will be underexposed. |
QCamera::OverExposure | 2 | The photo will be overexposed. |
Constant | Value | Description |
---|---|---|
QCamera::FlashOff | 0x1 | Flash is Off. |
QCamera::FlashOn | 0x2 | Flash is On. |
QCamera::FlashAuto | 0x4 | Automatic flash. |
QCamera::FlashRedEyeReduction | 0x8 | Red eye reduction flash. |
QCamera::FlashFill | 0x10 | Use flash to fillin shadows. |
The FlashModes type is a typedef for QFlags<FlashMode>. It stores an OR combination of FlashMode values.
Constant | Value | Description |
---|---|---|
QCamera::ManualFocus | 0x1 | Manual focus mode. |
QCamera::AutoFocus | 0x8 | One-shot auto focus mode. |
QCamera::ContinuousFocus | 0x10 | Continuous auto focus mode. |
QCamera::InfinityFocus | 0x04 | Focus strictly to infinity. |
QCamera::HyperfocalFocus | 0x02 | Focus to hyperfocal distance, with with the maximum depth of field achieved. All objects at distances from half of this distance out to infinity will be acceptably sharp. |
The FocusModes type is a typedef for QFlags<FocusMode>. It stores an OR combination of FocusMode values.
Constant | Value | Description |
---|---|---|
QCamera::FocusDisabled | 0 | Manual focus mode used or auto focus is not available. |
QCamera::FocusRequested | 1 | Focus request is in progress. |
QCamera::FocusReached | 2 | Focus has been reached. |
QCamera::FocusLost | 3 | Focus has been lost. |
QCamera::FocusUnableToReach | 4 | Unable to achieve focus. |
Constant | Value | Description |
---|---|---|
QCamera::MeteringAverage | 0x1 | Center weighted average metering mode. |
QCamera::MeteringSpot | 0x2 | Spot metering mode. |
QCamera::MeteringMatrix | 0x4 | Matrix metering mode. |
The MeteringModes type is a typedef for QFlags<MeteringMode>. It stores an OR combination of MeteringMode values.
Constant | Value | Description |
---|---|---|
QCamera::ActiveState | 0 | The camera has been started and can produce data. |
QCamera::SuspendedState | 1 | The camera is temporary not available, usually as a result of higher priority client requested the camera device. |
QCamera::StoppedState | 2 | The camera has been stopped. |
Constant | Value | Description |
---|---|---|
QCamera::WhiteBalanceManual | 0x1 | Manual white balance. In this mode the white balance should be set with setManualWhiteBalance() |
QCamera::WhiteBalanceAuto | 0x2 | Auto white balance mode. |
QCamera::WhiteBalanceSunlight | 0x4 | Sunlight white balance mode. |
QCamera::WhiteBalanceCloudy | 0x8 | Cloudy white balance mode. |
QCamera::WhiteBalanceShade | 0x10 | Shade white balance mode. |
QCamera::WhiteBalanceTungsten | 0x20 | Tungsten white balance mode. |
QCamera::WhiteBalanceFluorescent | 0x40 | Fluorescent white balance mode. |
QCamera::WhiteBalanceIncandescent | 0x80 | Incandescent white balance mode. |
QCamera::WhiteBalanceFlash | 0x100 | Flash white balance mode. |
QCamera::WhiteBalanceSunset | 0x200 | Sunset white balance mode. |
The WhiteBalanceModes type is a typedef for QFlags<WhiteBalanceMode>. It stores an OR combination of WhiteBalanceMode values.
This property holds lens aperture is specified as an f-number, the ratio of the focal length to effective aperture diameter.
Access functions:
qreal | aperture () const |
void | setManualAperture ( qreal aperture ) |
Notifier signal:
void | apertureChanged ( qreal value ) |
This property holds the sensor ISO sensitivity. Lower sensitivity, the noise is lower, but more light is needed.
Access functions:
int | isoSensitivity () const |
void | setManualIsoSensitivity ( int iso ) |
Notifier signal:
void | isoSensitivityChanged ( int value ) |
Indicates the camera is ready to capture an image immediately.
Access functions:
bool | isReadyForCapture () const |
Notifier signal:
void | readyForCaptureChanged ( bool ready ) |
This property holds the effective length of time the shutter is open in seconds.
Access functions:
qreal | shutterSpeed () const |
void | setManualShutterSpeed ( qreal seconds ) |
Notifier signal:
void | shutterSpeedChanged ( qreal speed ) |
This property holds the current state of the camera object.
Access functions:
State | state () const |
Notifier signal:
void | stateChanged ( QCamera::State state ) |
Construct a QCamera from service provider and parent.
Construct a QCamera from device name device and parent.
Destroys the camera object.
Signal emitted when aperature changes to value.
Signal emitted when aperature range has changed.
Returns a list of camera device's available from the default service provider.
Capture the image and save it to file. This operation is asynchronous in majority of cases, followed by signal QCamera::imageCaptured() or error()
Returns the description of the device.
Returns the error state of the object.
Signal emitted when error state changes to value.
Returns a string describing a camera's error state.
Returns the exposure compensation.
See also setExposureCompensation().
Signal emitted when exposure locked.
Returns the exposure mode being used.
See also setExposureMode().
Returns the flash mode being used.
See also setFlashMode().
Signal emitted when flash status changed, flash is ready if ready true.
Signal emitted when focus is locked.
Returns the focus mode being used.
See also setFocusMode().
Returns the focus status
Signal emitted when focus status changed.
Signals that an image intendec to be saved to to fileName has been captured and a preview is available.
Signals that an captured image has been saved to fileName.
Return true if exposure locked.
Returns true if flash is charged.
Return true if focus locked.
Returns true if macro focusing is supported.
Signal emitted when sensitivity changes to value.
Lock the exposure.
Lock the focus.
Returns true if macro focusing enabled.
See also setMacroFocusingEnabled().
Returns the current color temperature if the manual white balance is active, otherwise the return value is undefined.
See also setManualWhiteBalance().
Returns the largest supported aperture.
See also minimumAperture() and aperture().
Returns the maximum digital zoom
Returns the largest supported ISO sensitivity.
Returns the maximum optical zoom
Returns the largest supported shutter speed.
See also shutterSpeed().
Returns the metering mode being used.
See also setMeteringMode().
Returns the smallest supported aperture as an F number, corresponding to wide open lens. For example if the camera lenses supports aperture range from F/1.4 to F/32, the minumum aperture value will be 1.4, the maximum - 32
Returns the smallest supported ISO sensitivity.
Returns the smallest supported shutter speed.
Signals that a camera's ready for capture state has changed.
Turn on auto aperture
Turn on auto sensitivity
Turn on auto shutter speed
Sets the exposure compensation to ev
See also exposureCompensation().
Set exposure mode to mode
See also exposureMode().
Set the flash mode to mode
See also flashMode().
Set the focus mode to mode
See also focusMode().
Set macro focusing to enabled.
See also macroFocusingEnabled().
Sets manual white balance to colorTemperature
See also manualWhiteBalance().
Sets the metering mode to mode.
See also meteringMode().
Sets the white balance to mode.
See also whiteBalanceMode().
Signals that a camera's shutter speed has changed.
Starts the camera.
This can involve powering up the camera device and can be asynchronyous.
State is changed to QCamera::ActiveState if camera is started succesfuly, otherwise error() signal is emited.
Signal emitted when state of the Camera object has changed.
Stops the camera.
Returns the list of apertures if camera supports only fixed set of aperture values, otherwise returns an empty list.
Return the exposure modes available.
Returns the flash modes available.
Returns the focus modes available.
Returns the list of ISO senitivities if camera supports only fixed set of ISO sensitivity values, otherwise returns an empty list.
Returns the metering modes available.
Returns the list of shutter speed values if camera supports only fixed set of shutter speed values, otherwise returns an empty list.
Returns the white balance modes available.
Unlock the exposure.
Unlock the focus.
Returns the white balance mode being used.
See also setWhiteBalanceMode().
Set the zoom to value.
Returns the current zoom.
Signal emitted when zoom value changes to new value.
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.0-tp | |
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 ! |
Copyright © 2000-2012 - www.developpez.com