File indexing completed on 2024-04-28 05:42:30
0001 /* 0002 * Copyright 2017 by Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 * 0004 * This program is free software; you can redistribute it and/or modify 0005 * it under the terms of the GNU Library General Public License as 0006 * published by the Free Software Foundation; either version 2, or 0007 * (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details 0013 * 0014 * You should have received a copy of the GNU Library General Public 0015 * License along with this program; if not, write to the 0016 * Free Software Foundation, Inc., 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #include <QQmlExtensionPlugin> 0021 #include <qqml.h> 0022 #include "objectdebug.h" 0023 0024 QML_DECLARE_TYPEINFO(ObjectDebug, QML_HAS_ATTACHED_PROPERTIES) 0025 0026 class KirigamiPlugin : public QQmlExtensionPlugin 0027 { 0028 Q_OBJECT 0029 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 0030 0031 public: 0032 void registerTypes(const char *uri) override 0033 { 0034 Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.ObjectTracking")); 0035 0036 qmlRegisterUncreatableType<ObjectDebug>(uri, 1, 0, "ObjectDebug", QStringLiteral("Cannot create objects of type ObjectDebug, use it as an attached poperty")); 0037 } 0038 }; 0039 0040 0041 #include "objecttrackingplugin.moc"