Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgcontextplugin_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#ifndef QSGCONTEXTPLUGIN_H
5#define QSGCONTEXTPLUGIN_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtquickglobal_p.h>
19#include <QtQuick/qquickimageprovider.h>
20#include <QtCore/qplugin.h>
21#include <QtCore/qfactoryinterface.h>
22
24
25class QSGContext;
26
27class QSGRenderLoop;
28
29struct Q_QUICK_EXPORT QSGContextFactoryInterface : public QFactoryInterface
30{
31 enum Flag {
32 SupportsShaderEffectNode = 0x01
33 };
35
36 virtual QSGContext *create(const QString &key) const = 0;
37 virtual Flags flags(const QString &key) const = 0;
38
39 virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image) = 0;
40 virtual QSGRenderLoop *createWindowManager() = 0;
41};
42
44
45#define QSGContextFactoryInterface_iid \
46 "org.qt-project.Qt.QSGContextFactoryInterface"
48
49class Q_QUICK_EXPORT QSGContextPlugin : public QObject, public QSGContextFactoryInterface
50{
53public:
54 explicit QSGContextPlugin(QObject *parent = nullptr);
55 virtual ~QSGContextPlugin();
56
57 QStringList keys() const override = 0;
58
59 QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) override { return nullptr; }
60 QSGRenderLoop *createWindowManager() override { return nullptr; }
61};
62
64
65#endif // QSGCONTEXTPLUGIN_H
\inmodule QtGui
Definition qimage.h:37
\inmodule QtCore
Definition qobject.h:103
The QQuickTextureFactory class provides an interface for loading custom textures from QML....
QSGRenderLoop * createWindowManager() override
QStringList keys() const override=0
QQuickTextureFactory * createTextureFactoryFromImage(const QImage &) override
The QSGContext holds the scene graph entry points for one QML engine.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
Definition image.cpp:4
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
Flags
#define Q_DECLARE_INTERFACE(IFace, IId)
Definition qobject.h:460
GLuint64 key
GLbitfield flags
#define QSGContextFactoryInterface_iid
#define Q_OBJECT
#define Q_INTERFACES(x)
view create()