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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QCameraFocusZone Class

The QCameraFocusZone class provides information on zones used for autofocusing a camera. More...

 #include <QCameraFocusZone>

Public Types

enum FocusZoneStatus { Invalid, Unused, Selected, Focused }

Public Functions

QCameraFocusZone(const QCameraFocusZone & other)
~QCameraFocusZone()
QRectF area() const
bool isValid() const
FocusZoneStatus status() const
bool operator!=(const QCameraFocusZone & other) const
QCameraFocusZone & operator=(const QCameraFocusZone & other)
bool operator==(const QCameraFocusZone & other) const

Detailed Description

The QCameraFocusZone class provides information on zones used for autofocusing a camera.

For cameras that support autofocusing, in order for a camera to autofocus on part of a sensor frame, it considers different zones within the frame. Which zones to use, and where the zones are located vary between different cameras.

This class exposes what zones are used by a particular camera, and a list of the zones can be retrieved by a QCameraFocus instance.

You can use this information to present visual feedback - for example, drawing rectangles around areas of the camera frame that are in focus, or changing the color of a zone as it comes into focus.

 focus->setFocusPointMode(QCameraFocus::FocusPointAuto);
 QList<QCameraFocusZone> zones = focus->focusZones();
 foreach (QCameraFocusZone zone, zones) {
     if (zone.status() == QCameraFocusZone::Focused) {
         // Draw a green box at zone.area()
     } else if (zone.status() == QCameraFocusZone::Selected) {
         // This area is selected for autofocusing, but is not in focus
         // Draw a yellow box at zone.area()
     }
 }

See also QCameraFocus.

Member Type Documentation

enum QCameraFocusZone::FocusZoneStatus

ConstantValueDescription
QCameraFocusZone::Invalid0This zone is not valid
QCameraFocusZone::Unused1This zone may be used for autofocusing, but is not currently.
QCameraFocusZone::Selected2This zone is currently being used for autofocusing, but is not in focus.
QCameraFocusZone::Focused3This zone is being used for autofocusing and is currently in focus.

Member Function Documentation

QCameraFocusZone::QCameraFocusZone(const QCameraFocusZone & other)

Creates a new QCameraFocusZone as a copy of other.

QCameraFocusZone::~QCameraFocusZone()

Destroys this QCameraFocusZone.

QRectF QCameraFocusZone::area() const

Returns the area of the camera frame that this focus zone encompasses.

Coordinates are in frame relative coordinates - QPointF(0,0) is the top left of the frame, and QPointF(1,1) is the bottom right.

bool QCameraFocusZone::isValid() const

Returns true if this focus zone has a valid area and status.

FocusZoneStatus QCameraFocusZone::status() const

Returns the current status of this focus zone.

bool QCameraFocusZone::operator!=(const QCameraFocusZone & other) const

Returns true if this focus zone is not the same as other.

QCameraFocusZone & QCameraFocusZone::operator=(const QCameraFocusZone & other)

Assigns other to this QCameraFocusZone.

bool QCameraFocusZone::operator==(const QCameraFocusZone & other) const

Returns true if this focus zone is the same as other.

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 5.0-snapshot
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