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// Qt-Security score:significant
4
5#ifndef QQMLPREVIEWSERVICE_H
6#define QQMLPREVIEWSERVICE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
21#include <private/qqmldebugserviceinterfaces_p.h>
22
24
28{
30
31public:
47
48 static const QString s_key;
49
50 QQmlPreviewServiceImpl(QObject *parent = nullptr);
51 virtual ~QQmlPreviewServiceImpl();
52
53 void messageReceived(const QByteArray &message) override;
54 void engineAboutToBeAdded(QJSEngine *engine) override;
55 void engineAboutToBeRemoved(QJSEngine *engine) override;
56 void stateChanged(State state) override;
57
58 void forwardRequest(const QString &file);
59 void forwardError(const QString &error);
60 void forwardFps(const QQmlPreviewHandler::FpsInfo &frames);
61 void forwardConfirmation(const QQmlPreviewHandler::Settings &settings);
62 void forwardHotReloadFailure(const QString &reason);
63
64 QQuickItem *currentRootItem();
65
67 void error(const QString &file);
68 void file(const QString &file, const QByteArray &contents);
69 void directory(const QString &file, const QStringList &entries);
70 void load(const QUrl &url);
71 void drop(const QUrl &url);
72 void rerun();
73 void clearCache();
74 void zoom(qreal factor);
75 void animationSpeed(qreal factor);
76 void settingsChanged(const QQmlPreviewHandler::Settings &settings);
77
78private:
79 QScopedPointer<QQmlPreviewFileEngineHandler> m_fileEngine;
80 QScopedPointer<QQmlPreviewFileLoader> m_loader;
81 QQmlPreviewHandler m_handler;
82 QUrl m_currentUrl;
83};
84
85QT_END_NAMESPACE
86
87#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 settingsChanged(const QQmlPreviewHandler::Settings &settings)
void animationSpeed(qreal factor)
void forwardConfirmation(const QQmlPreviewHandler::Settings &settings)
void engineAboutToBeRemoved(QJSEngine *engine) override
QQmlPreviewServiceImpl(QObject *parent=nullptr)
void file(const QString &file, const QByteArray &contents)
void forwardHotReloadFailure(const QString &reason)
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
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
static QString translationIdString(const QQmlTranslation::QsTrData &data)