![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qcamera_p.h>
Public Attributes | |
| QMediaCaptureSession * | captureSession = nullptr |
| QPlatformCamera * | control = nullptr |
| QCameraDevice | cameraDevice |
| QCameraFormat | cameraFormat |
| Public Attributes inherited from QObjectPrivate | |
| ExtraData * | extraData |
| QAtomicPointer< QThreadData > | threadData |
| QAtomicPointer< ConnectionData > | connections |
| union { | |
| QObject * currentChildBeingDeleted | |
| QAbstractDeclarativeData * declarativeData | |
| }; | |
| QAtomicPointer< QtSharedPointer::ExternalRefCountData > | sharedRefcount |
| Public Attributes inherited from QObjectData | |
| QObject * | q_ptr |
| QObject * | parent |
| QObjectList | children |
| uint | isWidget: 1 |
| uint | blockSig: 1 |
| uint | wasDeleted: 1 |
| uint | isDeletingChildren: 1 |
| uint | sendChildEvents: 1 |
| uint | receiveChildEvents: 1 |
| uint | isWindow: 1 |
| uint | deleteLaterCalled: 1 |
| uint | isQuickItem: 1 |
| uint | willBeWidget: 1 |
| uint | wasWidget: 1 |
| uint | receiveParentEvents: 1 |
| uint | unused: 20 |
| QAtomicInt | postedEvents |
| QDynamicMetaObjectData * | metaObject |
| QBindingStorage | bindingStorage |
Additional Inherited Members | |
| Public Types inherited from QObjectPrivate | |
| typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
| using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
| Static Public Member Functions inherited from QObjectPrivate | |
| static bool | removeConnection (Connection *c) |
| static QObjectPrivate * | get (QObject *o) |
| static const QObjectPrivate * | get (const QObject *o) |
| template<typename Func1, typename Func2> | |
| static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
| template<typename Func1, typename Func2> | |
| static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
| static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
| static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
| static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Definition at line 27 of file qcamera_p.h.
| void QCameraPrivate::init | ( | const QCameraDevice & | device | ) |
\qmltype Camera \nativetype QCamera \inqmlmodule QtMultimedia
An interface for camera settings related to focus and zoom.
The Camera element can be used within a \l CaptureSession for video recording and image taking.
You can use \l MediaDevices to list available cameras and choose which one to use.
\qml MediaDevices { id: mediaDevices } CaptureSession { camera: Camera { cameraDevice: mediaDevices.defaultVideoInput } } \endqml
On hardware that supports it, \l Camera lets you adjust the focus and zoom. The \l minimumZoomFactor and \l maximumZoomFactor properties provide the range of supported zoom factors. The \l zoomFactor property allows changing the zoom factor.
\qml Camera { zoomFactor: maximumZoomFactor // zoom in as much as possible } \endqml
After capturing the raw data for a camera frame, the camera hardware and software performs various image processing tasks to produce the final image. This includes compensating for ambient light color, reducing noise, as well as making some other adjustments to the image.
You can control many of these processing steps through the Camera properties. For example, you can set the white balance (or color temperature) used for processing images:
\qml Camera { whiteBalanceMode: Camera.WhiteBalanceManual colorTemperature: 5600 } \endqml
For more information on image processing of camera frames, see \l {camera_image_processing}{Camera Image Processing}.
Most platforms require that the end-user grants permissions before a camera can be activated. It is therefore strongly recommended that application developers utilize the \l CameraPermission component when working with cameras. The following is a short example that requests permissions from the end-user when the application starts, and then activates the camera if permissions are granted.
\qml CameraPermission { id: cameraPermission }
Camera { active: cameraPermission.status === Qt.PermissionStatus.Granted }
Component.onCompleted: cameraPermission.request() \endqml
See the \l{Camera Overview}{camera overview} for more information.
Definition at line 148 of file qcamera.cpp.
References control.
| QCameraDevice QCameraPrivate::cameraDevice |
Definition at line 36 of file qcamera_p.h.
| QCameraFormat QCameraPrivate::cameraFormat |
Definition at line 37 of file qcamera_p.h.
| QMediaCaptureSession* QCameraPrivate::captureSession = nullptr |
Definition at line 33 of file qcamera_p.h.
| QPlatformCamera* QCameraPrivate::control = nullptr |
Definition at line 34 of file qcamera_p.h.
Referenced by init().