Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
29QT_BEGIN_NAMESPACE
30
31class QQmlPreviewClientPrivate;
33{
34 Q_OBJECT
35 Q_DECLARE_PRIVATE(QQmlPreviewClient)
36public:
52
53 struct Settings {
55 };
56
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 loadUrl(const QUrl &url);
83 void replayEventsForUrl(const QUrl &url);
84
86 void request(const QString &path);
87 void error(const QString &message);
88 void fps(const FpsInfo &info);
89 void confirmation(const Settings &settings);
90 void hotReloadFailure(const QString &reason);
91
92private:
93 void configureEventReplay();
94
95 void setNumExpectedEvents(qsizetype);
96 qsizetype numExpectedEvents() const;
97
98 QTimer &replayTimer() const;
99 QQmlProfilerClient &recordClient() const;
100 QQuickEventReplayClient &replayClient() const;
101 QQmlProfilerQtdWriter &eventReceiver() const;
102};
103
104QT_END_NAMESPACE
105
106#endif // QQMLPREVIEWCLIENT_P_H
std::unique_ptr< PreviewRecordingData > m_recordingData
void messageReceived(const QByteArray &message) override
void triggerZoom(float factor)
void replayEventsForUrl(const QUrl &url)
QQmlPreviewClient(QQmlDebugConnection *parent)
void triggerAnimationSpeed(float factor)
void sendFile(const QString &path, const QByteArray &contents)
void fps(const FpsInfo &info)
void confirmation(const Settings &settings)
void sendError(const QString &path)
void error(const QString &message)
void sendDirectory(const QString &path, const QStringList &entries)
void sendConfiguration(const Settings &settings)
void triggerLoad(const QUrl &url)
void loadUrl(const QUrl &url)
void hotReloadFailure(const QString &reason)
Combined button and popup list for selecting options.