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/qfiledevice.h>
28#include <QtCore/qtimer.h>
29
30QT_BEGIN_NAMESPACE
31
32class QQmlPreviewClientPrivate;
34{
35 Q_OBJECT
36 Q_DECLARE_PRIVATE(QQmlPreviewClient)
37public:
53
54 struct Settings {
56 };
57
69
70 QQmlPreviewClient(QQmlDebugConnection *parent);
71 void messageReceived(const QByteArray &message) override;
72
73 void sendDirectory(const QString &path, const QStringList &entries,
74 QFileDevice::Permissions permissions);
75 void sendFile(const QString &path, const QByteArray &contents,
76 QFileDevice::Permissions permissions);
77 void sendError(const QString &path);
78 void sendConfiguration(const Settings &settings);
79
80 void triggerLoad(const QUrl &url);
81 void triggerRerun();
82 void triggerZoom(float factor);
83 void triggerAnimationSpeed(float factor);
84
85 void replayEvents();
86 void replayEvent(const QQmlProfilerEventType &type, QQmlProfilerEvent &&event);
87
88 bool saveEvents(const QString &fileName);
89 bool replayEventsFromFile(const QString &fileName);
90 bool hasRecordedEvents() const;
92
94 void request(const QString &path);
95 void error(const QString &message);
96 void fps(const QQmlPreviewClient::FpsInfo &info);
97 void confirmation(const QQmlPreviewClient::Settings &settings);
98 void hotReloadFailure(const QString &reason);
99
100private:
101 void configureEventReplay();
102};
103
104QT_END_NAMESPACE
105
106#endif // QQMLPREVIEWCLIENT_P_H
QQuickEventReplayClient replayClient
void sendDirectory(const QString &path, const QStringList &entries, QFileDevice::Permissions permissions)
void messageReceived(const QByteArray &message) override
void triggerZoom(float factor)
void confirmation(const QQmlPreviewClient::Settings &settings)
void replayEvent(const QQmlProfilerEventType &type, QQmlProfilerEvent &&event)
bool replayEventsFromFile(const QString &fileName)
QQmlPreviewClient(QQmlDebugConnection *parent)
bool hasRecordedEvents() const
void triggerAnimationSpeed(float factor)
bool saveEvents(const QString &fileName)
void fps(const QQmlPreviewClient::FpsInfo &info)
void sendError(const QString &path)
void error(const QString &message)
void sendConfiguration(const Settings &settings)
void triggerLoad(const QUrl &url)
void sendFile(const QString &path, const QByteArray &contents, QFileDevice::Permissions permissions)
void hotReloadFailure(const QString &reason)
Combined button and popup list for selecting options.