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:
43
44 static const QString s_key;
45
46 QQmlPreviewServiceImpl(QObject *parent = nullptr);
47 virtual ~QQmlPreviewServiceImpl();
48
49 void messageReceived(const QByteArray &message) override;
50 void engineAboutToBeAdded(QJSEngine *engine) override;
51 void engineAboutToBeRemoved(QJSEngine *engine) override;
52 void stateChanged(State state) override;
53
54 void forwardRequest(const QString &file);
55 void forwardError(const QString &error);
56 void forwardFps(const QQmlPreviewHandler::FpsInfo &frames);
57
58 QQuickItem *currentRootItem();
59
61 void error(const QString &file);
62 void file(const QString &file, const QByteArray &contents);
63 void directory(const QString &file, const QStringList &entries);
64 void load(const QUrl &url);
65 void drop(const QUrl &url);
66 void rerun();
67 void clearCache();
68 void zoom(qreal factor);
69
70private:
71 QScopedPointer<QQmlPreviewFileEngineHandler> m_fileEngine;
72 QScopedPointer<QQmlPreviewFileLoader> m_loader;
73 QQmlPreviewHandler m_handler;
74 QUrl m_currentUrl;
75};
76
77QT_END_NAMESPACE
78
79#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
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
static QString translationIdString(const QQmlTranslation::QsTrData &data)