VTK  9.3.0
QQmlVTKPlugin.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef QQmlVTKPlugin_h
4#define QQmlVTKPlugin_h
5
6#include "vtkABINamespace.h"
7#include "vtkDeprecation.h"
8
9// Qt includes
10#include <QQmlExtensionPlugin>
11
51VTK_ABI_NAMESPACE_BEGIN
52class VTK_DEPRECATED_IN_9_3_0("Use QQuickVTKItem instead") QQmlVTKPlugin
53 : public QQmlExtensionPlugin
54{
55 Q_OBJECT
56 typedef QQmlExtensionPlugin Superclass;
57
58 Q_PLUGIN_METADATA(IID "org.kitware.VTK")
59
60public:
64 QQmlVTKPlugin() = default;
65
69 ~QQmlVTKPlugin() override = default;
70
74 void registerTypes(const char* uri) override;
75
81 void initializeEngine(QQmlEngine* engine, const char* uri) override;
82
83protected Q_SLOTS:
89 void cleanup();
90
91private:
92 Q_DISABLE_COPY(QQmlVTKPlugin);
93};
94
95VTK_ABI_NAMESPACE_END
96#endif // QQmlVTKPlugin_h
Plugin class to expose a VTK C++ module to QML applications.
void registerTypes(const char *uri) override
Register QML types provided by VTK.
~QQmlVTKPlugin() override=default
Destructor.
QQmlVTKPlugin()=default
Constructor.
void cleanup()
Destroy any singleton instances that were created during initializeEngine.
void initializeEngine(QQmlEngine *engine, const char *uri) override
Initialize the extension using the QQmlEngine.
#define VTK_DEPRECATED_IN_9_3_0(reason)