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
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:
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:
69 QScopedPointer<QQmlPreviewFileEngineHandler> m_fileEngine;
70 QScopedPointer<QQmlPreviewFileLoader> m_loader;
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:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
void forwardRequest(const QString &file)
void engineAboutToBeRemoved(QJSEngine *engine) override
QQmlPreviewServiceImpl(QObject *parent=nullptr)
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:63
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLuint GLsizei const GLchar * message
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
QFile file
[0]
QUrl url("example.com")
[constructor-url-reference]
QJSEngine engine
[0]