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
qqmlinplacepreviewhandler.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 QQMLINPLACEPREVIEWHANDLER_H
6#define QQMLINPLACEPREVIEWHANDLER_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
20
21#include <private/qqmlpreviewdiff_p.h>
22
23#include <QtQml/qqmlcomponent.h>
24
25#include <memory>
26#include <vector>
27
28QT_BEGIN_NAMESPACE
29
30class QQmlInPlacePreviewHandler : public QQmlPreviewHandler
31{
32 Q_OBJECT
33public:
34 explicit QQmlInPlacePreviewHandler(QObject *parent = nullptr);
35 ~QQmlInPlacePreviewHandler() override;
36
37 void connectToService(QQmlPreviewServiceImpl *service) final;
38 void load(const QUrl &url) final;
39
40Q_SIGNALS:
41 void hotReloadFailure(const QString &reason);
42
43private:
44 QList<QUrl> m_droppedUrls;
45};
46
47QT_END_NAMESPACE
48
49#endif // QQMLINPLACEPREVIEWHANDLER_H
void setCurrentRootItem(QQuickItem *item)
void setCurrentWindow(QQuickWindow *window)
virtual void connectToService(QQmlPreviewServiceImpl *service)
Combined button and popup list for selecting options.
static void updateResolvedTypeReferences(QV4::ExecutionEngine *v4, const QList< QQmlRefPointer< QV4::CompiledData::CompilationUnit > > &droppedUnits)
static void updateInplace(QQmlComponent *component, std::shared_ptr< InplaceUpdate > inplaceUpdate)
void findCurrentRootObject(QQmlEngine *engine, const QUrl &url, QQmlPreviewHandler *receiver)
QQuickWindow * findCurrentWindow()
void updateEngine(std::shared_ptr< InplaceUpdate > inplaceUpdate, const QList< QUrl > &urls)
std::unique_ptr< QQmlComponent > component
QQmlRefPointer< QV4::ExecutableCompilationUnit > oldUnit
std::vector< ComponentUpdate > pendingComponentUpdates
QList< QQmlRefPointer< QV4::CompiledData::CompilationUnit > > droppedUnits
InplaceUpdate(QQmlInPlacePreviewHandler *handler, QQmlEngine *engine)
void emitError(const QString &message)
void emitReloadFailure(const QString &message)
std::vector< ComponentUpdate > processedComponentUpdates