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
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// Qt-Security score:significant reason:default
4
5#ifndef QSGCONTEXTPLUGIN_H
6#define QSGCONTEXTPLUGIN_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
19#include <private/qtquickglobal_p.h>
20#include <QtQuick/qquickimageprovider.h>
21#include <QtCore/qplugin.h>
22#include <QtCore/qfactoryinterface.h>
23
24QT_BEGIN_NAMESPACE
25
26class QSGContext;
27
28class QSGRenderLoop;
29
30struct Q_QUICK_EXPORT QSGContextFactoryInterface : public QFactoryInterface
31{
32 enum Flag {
33 SupportsShaderEffectNode = 0x01
34 };
35 Q_DECLARE_FLAGS(Flags, Flag)
36
37 virtual QSGContext *create(const QString &key) const = 0;
38 virtual Flags flags(const QString &key) const = 0;
39
40 virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image) = 0;
41 virtual QSGRenderLoop *createWindowManager() = 0;
42};
43
44Q_DECLARE_OPERATORS_FOR_FLAGS(QSGContextFactoryInterface::Flags)
45
46#define QSGContextFactoryInterface_iid
47 "org.qt-project.Qt.QSGContextFactoryInterface"
48Q_DECLARE_INTERFACE(QSGContextFactoryInterface, QSGContextFactoryInterface_iid)
49
50class Q_QUICK_EXPORT QSGContextPlugin : public QObject, public QSGContextFactoryInterface
51{
52 Q_OBJECT
53 Q_INTERFACES(QSGContextFactoryInterface:QFactoryInterface)
54public:
55 explicit QSGContextPlugin(QObject *parent = nullptr);
56 virtual ~QSGContextPlugin();
57
58 QStringList keys() const override = 0;
59
60 QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) override { return nullptr; }
61 QSGRenderLoop *createWindowManager() override { return nullptr; }
62};
63
64QT_END_NAMESPACE
65
66#endif // QSGCONTEXTPLUGIN_H
Combined button and popup list for selecting options.
#define QSGContextFactoryInterface_iid
QSGContextFactoryInterface * factory
QList< QSGContextFactoryInterface * > builtIns