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