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
qqmlclassicpreviewhandler.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 QQMLCLASSICPREVIEWHANDLER_H
6#define QQMLCLASSICPREVIEWHANDLER_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 <QtCore/qpointer.h>
22#include <QtQml/qqmlcomponent.h>
23
24QT_BEGIN_NAMESPACE
25
26class QQuickItem;
27
29{
31public:
32 explicit QQmlClassicPreviewHandler(QObject *parent = nullptr);
34
35 void removeEngine(QQmlEngine *engine) final;
36 void connectToService(QQmlPreviewServiceImpl *service) final;
37
38 void load(const QUrl &url) final;
39
40private:
41 void dropCU(const QUrl &url);
42 void rerun();
43 void clear();
44
45 void zoom(qreal newFactor);
46
47 void beforeSynchronizing();
48 void afterSynchronizing();
49 void beforeRendering();
50 void frameSwapped();
51
52 void tryCreateObject();
53 void showObject(QObject *object);
54
55 bool eventFilter(QObject *obj, QEvent *event) final;
56
57 QScopedPointer<QQuickItem> m_dummyItem;
58 QList<QPointer<QObject>> m_createdObjects;
59 QScopedPointer<QQmlComponent> m_component;
60
61 qreal m_zoomFactor = 1.0;
62 bool m_supportsMultipleWindows;
63 QQmlPreviewPosition m_lastPosition;
64};
65
66QT_END_NAMESPACE
67
68#endif // QQMLCLASSICPREVIEWHANDLER_H
void load(const QUrl &url) final
void removeEngine(QQmlEngine *engine) final
void connectToService(QQmlPreviewServiceImpl *service) final
bool eventFilter(QObject *obj, QEvent *event) final
Filters events if this object has been installed as an event filter for the watched object.
void setCurrentRootItem(QQuickItem *item)
void setCurrentWindow(QQuickWindow *window)
virtual void removeEngine(QQmlEngine *engine)
QQuickWindow * currentWindow() const
virtual void connectToService(QQmlPreviewServiceImpl *service)
Combined button and popup list for selecting options.
static Qt::WindowFlags fixFlags(Qt::WindowFlags flags)
static void closeAllWindows()