Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlpreviewclient_p.h
Go to the documentation of this file.
1
// Copyright (C) 2018 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
// Qt-Security score:significant
4
5
6
#
ifndef
QQMLPREVIEWCLIENT_P_H
7
#
define
QQMLPREVIEWCLIENT_P_H
8
9
//
10
// W A R N I N G
11
// -------------
12
//
13
// This file is not part of the Qt API. It exists purely as an
14
// implementation detail. This header file may change from version to
15
// version without notice, or even be removed.
16
//
17
// We mean it.
18
//
19
20
#
include
<
private
/
qqmldebugclient_p
.
h
>
21
#
include
<
private
/
qqmldebugconnection_p
.
h
>
22
23
#
include
<
private
/
qqmlprofilerqtdwriter_p
.
h
>
24
#
include
<
private
/
qqmlprofilerclient_p
.
h
>
25
#
include
<
private
/
qquickeventreplayclient_p
.
h
>
26
27
#
include
<
QtCore
/
QTimer
>
28
29
QT_BEGIN_NAMESPACE
30
31
class
QQmlPreviewClientPrivate;
32
class
QQmlPreviewClient
:
public
QQmlDebugClient
33
{
34
Q_OBJECT
35
Q_DECLARE_PRIVATE(
QQmlPreviewClient
)
36
public
:
37
enum
Command
{
38
File
,
39
Load
,
40
Request
,
41
Error
,
42
Rerun
,
43
Directory
,
44
ClearCache
,
45
Zoom
,
46
Fps
,
47
AnimationSpeed
,
48
Configuration
,
49
Confirmation
,
50
HotReloadFailure
,
51
};
52
53
struct
Settings
{
54
bool
enableInPlaceUpdates
=
false
;
55
};
56
57
struct
FpsInfo
{
58
quint16
numSyncs
= 0;
59
quint16
minSync
=
std
::
numeric_limits
<
quint16
>::
max
();
60
quint16
maxSync
= 0;
61
quint16
totalSync
= 0;
62
63
quint16
numRenders
= 0;
64
quint16
minRender
=
std
::
numeric_limits
<
quint16
>::
max
();
65
quint16
maxRender
= 0;
66
quint16
totalRender
= 0;
67
};
68
69
QQmlPreviewClient
(QQmlDebugConnection *parent);
70
void
messageReceived
(
const
QByteArray &message)
override
;
71
72
void
sendDirectory
(
const
QString &path,
const
QStringList &entries);
73
void
sendFile
(
const
QString &path,
const
QByteArray &contents);
74
void
sendError
(
const
QString &path);
75
void
sendConfiguration
(
const
Settings
&settings);
76
77
void
triggerLoad
(
const
QUrl &url);
78
void
triggerRerun
();
79
void
triggerZoom
(
float
factor);
80
void
triggerAnimationSpeed
(
float
factor);
81
82
void
replayEvents
();
83
void
replayEvent
(
const
QQmlProfilerEventType &type, QQmlProfilerEvent &&event);
84
85
bool
saveEvents
(
const
QString &fileName);
86
bool
replayEventsFromFile
(
const
QString &fileName);
87
bool
hasRecordedEvents
()
const
;
88
void
clearRecordedEvents
();
89
90
Q_SIGNALS
:
91
void
request
(
const
QString
&
path
);
92
void
error
(
const
QString &message);
93
void
fps
(
const
QQmlPreviewClient
::
FpsInfo
&info);
94
void
confirmation
(
const
QQmlPreviewClient
::
Settings
&settings);
95
void
hotReloadFailure
(
const
QString &reason);
96
97
private
:
98
void
configureEventReplay();
99
};
100
101
QT_END_NAMESPACE
102
103
#
endif
// QQMLPREVIEWCLIENT_P_H
QQmlDebugClientPrivate
Definition
qqmldebugclient_p_p.h:27
QQmlPreviewClientPrivate
Definition
qqmlpreviewclient_p_p.h:25
QQmlPreviewClientPrivate::m_numExpectedEvents
qsizetype m_numExpectedEvents
Definition
qqmlpreviewclient_p_p.h:40
QQmlPreviewClientPrivate::replayClient
QQuickEventReplayClient replayClient
Definition
qqmlpreviewclient_p_p.h:37
QQmlPreviewClientPrivate::replayTimer
QTimer replayTimer
Definition
qqmlpreviewclient_p_p.h:38
QQmlPreviewClientPrivate::recordClient
QQmlProfilerClient recordClient
Definition
qqmlpreviewclient_p_p.h:36
QQmlPreviewClient
Definition
qqmlpreviewclient_p.h:33
QQmlPreviewClient::messageReceived
void messageReceived(const QByteArray &message) override
Definition
qqmlpreviewclient.cpp:28
QQmlPreviewClient::triggerZoom
void triggerZoom(float factor)
Definition
qqmlpreviewclient.cpp:115
QQmlPreviewClient::confirmation
void confirmation(const QQmlPreviewClient::Settings &settings)
QQmlPreviewClient::replayEvent
void replayEvent(const QQmlProfilerEventType &type, QQmlProfilerEvent &&event)
Definition
qqmlpreviewclient.cpp:176
QQmlPreviewClient::replayEventsFromFile
bool replayEventsFromFile(const QString &fileName)
Definition
qqmlpreviewclient.cpp:189
QQmlPreviewClient::QQmlPreviewClient
QQmlPreviewClient(QQmlDebugConnection *parent)
Definition
qqmlpreviewclient.cpp:17
QQmlPreviewClient::hasRecordedEvents
bool hasRecordedEvents() const
Definition
qqmlpreviewclient.cpp:214
QQmlPreviewClient::triggerAnimationSpeed
void triggerAnimationSpeed(float factor)
Definition
qqmlpreviewclient.cpp:122
QQmlPreviewClient::saveEvents
bool saveEvents(const QString &fileName)
Definition
qqmlpreviewclient.cpp:183
QQmlPreviewClient::fps
void fps(const QQmlPreviewClient::FpsInfo &info)
QQmlPreviewClient::sendFile
void sendFile(const QString &path, const QByteArray &contents)
Definition
qqmlpreviewclient.cpp:80
QQmlPreviewClient::sendError
void sendError(const QString &path)
Definition
qqmlpreviewclient.cpp:87
QQmlPreviewClient::clearRecordedEvents
void clearRecordedEvents()
Definition
qqmlpreviewclient.cpp:220
QQmlPreviewClient::error
void error(const QString &message)
QQmlPreviewClient::sendDirectory
void sendDirectory(const QString &path, const QStringList &entries)
Definition
qqmlpreviewclient.cpp:73
QQmlPreviewClient::sendConfiguration
void sendConfiguration(const Settings &settings)
Definition
qqmlpreviewclient.cpp:94
QQmlPreviewClient::triggerLoad
void triggerLoad(const QUrl &url)
Definition
qqmlpreviewclient.cpp:101
QQmlPreviewClient::replayEvents
void replayEvents()
Definition
qqmlpreviewclient.cpp:147
QQmlPreviewClient::hotReloadFailure
void hotReloadFailure(const QString &reason)
QQmlPreviewClient::triggerRerun
void triggerRerun()
Definition
qqmlpreviewclient.cpp:108
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QQmlPreviewClient::FpsInfo
Definition
qqmlpreviewclient_p.h:57
QQmlPreviewClient::FpsInfo::numSyncs
quint16 numSyncs
Definition
qqmlpreviewclient_p.h:58
QQmlPreviewClient::FpsInfo::minSync
quint16 minSync
Definition
qqmlpreviewclient_p.h:59
QQmlPreviewClient::FpsInfo::maxSync
quint16 maxSync
Definition
qqmlpreviewclient_p.h:60
QQmlPreviewClient::FpsInfo::minRender
quint16 minRender
Definition
qqmlpreviewclient_p.h:64
QQmlPreviewClient::FpsInfo::totalSync
quint16 totalSync
Definition
qqmlpreviewclient_p.h:61
QQmlPreviewClient::FpsInfo::maxRender
quint16 maxRender
Definition
qqmlpreviewclient_p.h:65
QQmlPreviewClient::FpsInfo::numRenders
quint16 numRenders
Definition
qqmlpreviewclient_p.h:63
QQmlPreviewClient::FpsInfo::totalRender
quint16 totalRender
Definition
qqmlpreviewclient_p.h:66
QQmlPreviewClient::Settings
Definition
qqmlpreviewclient_p.h:53
QQmlPreviewClient::Settings::enableInPlaceUpdates
bool enableInPlaceUpdates
Definition
qqmlpreviewclient_p.h:54
qtdeclarative
src
qmldebug
qqmlpreviewclient_p.h
Generated on
for Qt by
1.18.0