Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmlpreviewservice.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
4#ifndef QQMLPREVIEWSERVICE_H
5#define QQMLPREVIEWSERVICE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qqmlpreviewhandler.h"
20#include <private/qqmldebugserviceinterfaces_p.h>
21
23
27{
29
30public:
31 enum Command {
40 Fps
41 };
42
43 static const QString s_key;
44
47
48 void messageReceived(const QByteArray &message) override;
51 void stateChanged(State state) override;
52
53 void forwardRequest(const QString &file);
54 void forwardError(const QString &error);
55 void forwardFps(const QQmlPreviewHandler::FpsInfo &frames);
56
58
60 void error(const QString &file);
61 void file(const QString &file, const QByteArray &contents);
62 void directory(const QString &file, const QStringList &entries);
63 void load(const QUrl &url);
64 void rerun();
65 void clearCache();
66 void zoom(qreal factor);
67
68private:
71 QQmlPreviewHandler m_handler;
72 QUrl m_currentUrl;
73};
74
76
77#endif // QQMLPREVIEWSERVICE_H
\inmodule QtCore
Definition qbytearray.h:57
The QJSEngine class provides an environment for evaluating JavaScript code.
Definition qjsengine.h:26
\inmodule QtCore
Definition qobject.h:90
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:311
void forwardRequest(const QString &file)
void engineAboutToBeRemoved(QJSEngine *engine) override
void file(const QString &file, const QByteArray &contents)
void directory(const QString &file, const QStringList &entries)
void engineAboutToBeAdded(QJSEngine *engine) override
void forwardFps(const QQmlPreviewHandler::FpsInfo &frames)
void zoom(qreal factor)
static const QString s_key
void load(const QUrl &url)
void stateChanged(State state) override
void error(const QString &file)
void forwardError(const QString &error)
void messageReceived(const QByteArray &message) override
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
\inmodule QtCore
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
GLuint GLsizei const GLchar * message
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:92
QUrl url("example.com")
[constructor-url-reference]
QJSEngine engine
[0]