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
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
20#include <private/qqmldebugserviceinterfaces_p.h>
21
23
27{
29
30public:
42
43 static const QString s_key;
44
45 QQmlPreviewServiceImpl(QObject *parent = nullptr);
46 virtual ~QQmlPreviewServiceImpl();
47
48 void messageReceived(const QByteArray &message) override;
49 void engineAboutToBeAdded(QJSEngine *engine) override;
50 void engineAboutToBeRemoved(QJSEngine *engine) 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
57 QQuickItem *currentRootItem();
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 drop(const QUrl &url);
65 void rerun();
66 void clearCache();
67 void zoom(qreal factor);
68
69private:
70 QScopedPointer<QQmlPreviewFileEngineHandler> m_fileEngine;
71 QScopedPointer<QQmlPreviewFileLoader> m_loader;
72 QQmlPreviewHandler m_handler;
73 QUrl m_currentUrl;
74};
75
76QT_END_NAMESPACE
77
78#endif // QQMLPREVIEWSERVICE_H
void messageReceived(const QByteArray &message) override
void foundTranslationBinding(const TranslationBindingInformation &translationBindingInformation) override
void engineAboutToBeAdded(QJSEngine *engine) override
void state(const QString &stateName)
void engineAboutToBeRemoved(QJSEngine *engine) override
QMultiMap< QObject *, TranslationBindingInformation > objectTranslationBindingMultiMap
QList< QPointer< QQuickItem > > translatableTextOccurrences
void forwardRequest(const QString &file)
void drop(const QUrl &url)
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 forwardError(const QString &error)
void messageReceived(const QByteArray &message) override
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
static QString translationIdString(const QQmlTranslation::QsTrData &data)