File indexing completed on 2024-09-15 03:27:41
0001 /* 0002 * box2dplugin.h 0003 * Copyright (c) 2010 Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> 0004 * 0005 * This file is part of the Box2D QML plugin. 0006 * 0007 * This software is provided 'as-is', without any express or implied warranty. 0008 * In no event will the authors be held liable for any damages arising from 0009 * the use of this software. 0010 * 0011 * Permission is granted to anyone to use this software for any purpose, 0012 * including commercial applications, and to alter it and redistribute it 0013 * freely, subject to the following restrictions: 0014 * 0015 * 1. The origin of this software must not be misrepresented; you must not 0016 * claim that you wrote the original software. If you use this software in 0017 * a product, an acknowledgment in the product documentation would be 0018 * appreciated but is not required. 0019 * 0020 * 2. Altered source versions must be plainly marked as such, and must not be 0021 * misrepresented as being the original software. 0022 * 0023 * 3. This notice may not be removed or altered from any source distribution. 0024 */ 0025 0026 #ifndef BOX2DPLUGIN_H 0027 #define BOX2DPLUGIN_H 0028 0029 #include <QQmlExtensionPlugin> 0030 0031 /** 0032 * A plugin that exposes Box2D to QML in the form of declarative items. 0033 */ 0034 class Q_DECL_EXPORT Box2DPlugin : public QQmlExtensionPlugin 0035 { 0036 Q_OBJECT 0037 #if !defined(STATIC_PLUGIN_BOX2D) 0038 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 0039 #endif 0040 0041 public: 0042 explicit Box2DPlugin(QObject *parent = 0); 0043 0044 void registerTypes(const char *uri); 0045 }; 0046 0047 #endif // BOX2DPLUGIN_H