File indexing completed on 2024-05-19 15:09:22

0001 /*
0002     SPDX-FileCopyrightText: 2011 Marco Martin <mart@kde.org>
0003 
0004     SPDX-License-Identifier: MIT
0005 */
0006 
0007 #include "draganddropplugin.h"
0008 
0009 #include "DeclarativeDragArea.h"
0010 #include "DeclarativeDragDropEvent.h"
0011 #include "DeclarativeDropArea.h"
0012 #include "DeclarativeMimeData.h"
0013 #include "MimeDataWrapper.h"
0014 
0015 void DragAndDropPlugin::registerTypes(const char *uri)
0016 {
0017     Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.draganddrop"));
0018 
0019     qmlRegisterType<DeclarativeDropArea>(uri, 2, 0, "DropArea");
0020     qmlRegisterType<DeclarativeDragArea>(uri, 2, 0, "DragArea");
0021     qmlRegisterAnonymousType<QMimeData>(uri, 1);
0022     qmlRegisterUncreatableType<DeclarativeMimeData>(uri, 2, 0, "MimeData", QStringLiteral("MimeData cannot be created from QML."));
0023     qmlRegisterUncreatableType<DeclarativeDragDropEvent>(uri, 2, 0, "DragDropEvent", QStringLiteral("DragDropEvent cannot be created from QML."));
0024     qmlRegisterUncreatableType<MimeDataWrapper>(uri, 2, 0, "MimeDataWrapper", QStringLiteral("DragDropEvent cannot be created from QML."));
0025 }
0026 
0027 #include "moc_draganddropplugin.cpp"