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
qgraphicsframecapture.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 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
5#if (defined (Q_OS_WIN) || defined(Q_OS_LINUX)) && QT_CONFIG(library)
7#elif QT_CONFIG(metal)
9#else
11#endif
12
13#include <QtCore/qstandardpaths.h>
14#include <QtCore/qcoreapplication.h>
15
17
19 : m_capturePath(QStandardPaths::writableLocation(QStandardPaths::TempLocation) +
20 QStringLiteral("/") + QCoreApplication::applicationName() +
21 QStringLiteral("/captures")),
22 m_capturePrefix(QCoreApplication::applicationName())
23{
24
25}
26
28{
29#if (defined (Q_OS_WIN) || defined(Q_OS_LINUX)) && QT_CONFIG(library)
31#elif QT_CONFIG(metal)
33#endif
34}
35
40
42{
43 if (!d.isNull())
44 d->setRhi(rhi);
45}
46
52
58
60{
61 if (!d.isNull())
62 return d->capturePath();
63 return QString();
64}
65
71
73{
74 if (!d.isNull())
75 return d->capturePrefix();
76 return QString();
77}
78
80{
81 if (!d.isNull())
82 d->setCapturePrefix(prefix);
83}
84
86{
87 if (!d.isNull())
88 return d->capturedFileName();
89
90 return QString();
91}
92
94{
95 if (!d.isNull())
96 return d->capturedFilesNames();
97
98 return QStringList();
99}
100
102{
103 if (!d.isNull())
104 return d->initialized();
105
106 return false;
107}
108
110{
111 if (!d.isNull())
112 return d->isCapturing();
113
114 return false;
115}
116
118{
119 if (!d.isNull())
120 d->openCapture();
121}
122
\inmodule QtCore
virtual void setRhi(QRhi *rhi)=0
virtual void startCaptureFrame()=0
virtual void endCaptureFrame()=0
virtual QStringList capturedFilesNames() const
virtual void openCapture()=0
virtual void setCapturePrefix(const QString &prefix)
virtual QString capturedFileName() const
virtual bool isCapturing() const =0
virtual void setCapturePath(const QString &path)
virtual bool initialized() const =0
The QGraphicsFrameCaptureRenderDoc class provides a way to capture a record of draw calls for differe...
void setCapturePath(const QString &path)
void setCapturePrefix(const QString &prefix)
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:1804
bool isNull() const noexcept
Returns true if this object refers to \nullptr.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
\inmodule QtCore
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
QList< QString > QStringList
Constructs a string list that contains the given string, str.
GLsizei const GLchar *const * path
#define QStringLiteral(str)