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