blob: f8dbd2ca1dd19f7d77a1df498c58beef7dc1af44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QGRAPHICSFRAMECAPTURE_P_P_H
#define QGRAPHICSFRAMECAPTURE_P_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qnamespace.h>
#include <QtCore/qstring.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(lcGraphicsFrameCapture)
class QRhi;
struct QRhiNativeHandles;
class QGraphicsFrameCapturePrivate
{
public:
QGraphicsFrameCapturePrivate() ;
virtual ~QGraphicsFrameCapturePrivate() = default;
virtual void setRhi(QRhi *rhi) = 0;
virtual void startCaptureFrame() = 0;
virtual void endCaptureFrame() = 0;
QString capturePath() const { return m_capturePath; };
virtual void setCapturePath(const QString &path) { m_capturePath = path; }
QString capturePrefix() const { return m_capturePrefix; }
virtual void setCapturePrefix(const QString &prefix) { m_capturePrefix = prefix; }
virtual QString capturedFileName() const
{
return !m_capturedFilesNames.isEmpty() ? m_capturedFilesNames.last() : QString();
}
virtual QStringList capturedFilesNames() const { return m_capturedFilesNames; }
virtual bool initialized() const = 0;
virtual bool isCapturing() const = 0;
virtual void openCapture() = 0;
protected:
QRhi *m_rhi = nullptr;
QRhiNativeHandles *m_rhiHandles = nullptr;
void *m_nativeHandle = nullptr;
QString m_capturePath;
QString m_capturePrefix;
QStringList m_capturedFilesNames;
};
QT_END_NAMESPACE
#endif // QGRAPHICSFRAMECAPTURE_P_P_H
|