Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwasmimagecapture_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWASMIMAGECAPTURE_H
5#define QWASMIMAGECAPTURE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QObject>
19#include <private/qplatformimagecapture_p.h>
20#include <QtCore/qloggingcategory.h>
21
23
24Q_DECLARE_LOGGING_CATEGORY(qWasmImageCapture)
25
27
29{
31public:
32 explicit QWasmImageCapture(QImageCapture *parent = nullptr);
34
35 bool isReadyForCapture() const override;
36
37 int capture(const QString &fileName) override;
38 int captureToBuffer() override;
39
40 QImageEncoderSettings imageSettings() const override;
42
43 void setReadyForCapture(bool isReady);
44
46
47private:
48 QImage takePicture();
49
50 // weak
51 QWasmMediaCaptureSession *m_captureSession = nullptr;
52 QImageEncoderSettings m_settings;
53 bool m_isReadyForCapture = false;
54 int m_lastId = 0;
55};
56
58#endif // QWASMIMAGECAPTURE_H
\inmodule QtMultimedia
\inmodule QtGui
Definition qimage.h:37
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
int capture(const QString &fileName) override
void setReadyForCapture(bool isReady)
bool isReadyForCapture() const override
QWasmImageCapture(QImageCapture *parent=nullptr)
void setImageSettings(const QImageEncoderSettings &settings) override
void setCaptureSession(QPlatformMediaCaptureSession *session)
QImageEncoderSettings imageSettings() const override
int captureToBuffer() override
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
#define Q_OBJECT
QSettings settings("MySoft", "Star Runner")
[0]