VTK  9.1.0
QQmlVTKPlugin.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: QQmlVTKPlugin.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15#ifndef QQmlVTKPlugin_h
16#define QQmlVTKPlugin_h
17
18// Qt includes
19#include <QQmlExtensionPlugin>
20
60class QQmlVTKPlugin : public QQmlExtensionPlugin
61{
62 Q_OBJECT
63 typedef QQmlExtensionPlugin Superclass;
64
65 Q_PLUGIN_METADATA(IID "org.kitware.VTK")
66
67public:
71 QQmlVTKPlugin() = default;
72
76 virtual ~QQmlVTKPlugin() = default;
77
81 void registerTypes(const char* uri);
82
88 void initializeEngine(QQmlEngine* engine, const char* uri);
89
90protected Q_SLOTS:
96 void cleanup();
97
98private:
99 Q_DISABLE_COPY(QQmlVTKPlugin);
100};
101
102#endif // QQmlVTKPlugin_h
Plugin class to expose a VTK C++ module to QML applications.
Definition: QQmlVTKPlugin.h:61
void registerTypes(const char *uri)
Register QML types provided by VTK.
virtual ~QQmlVTKPlugin()=default
Destructor.
QQmlVTKPlugin()=default
Constructor.
void cleanup()
Destroy any singleton instances that were created during initializeEngine.
void initializeEngine(QQmlEngine *engine, const char *uri)
Initialize the extension using the QQmlEngine.