KDeclarative

draganddropplugin.cpp
1 /*
2  SPDX-FileCopyrightText: 2011 Marco Martin <[email protected]>
3 
4  SPDX-License-Identifier: MIT
5 */
6 
7 #include "draganddropplugin.h"
8 
9 
10 #include "DeclarativeDragArea.h"
11 #include "DeclarativeDragDropEvent.h"
12 #include "DeclarativeDropArea.h"
13 #include "DeclarativeMimeData.h"
14 #include "MimeDataWrapper.h"
15 
16 void DragAndDropPlugin::registerTypes(const char *uri)
17 {
18  Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.draganddrop"));
19 
20  qmlRegisterType<DeclarativeDropArea>(uri, 2, 0, "DropArea");
21  qmlRegisterType<DeclarativeDragArea>(uri, 2, 0, "DragArea");
22  qmlRegisterAnonymousType<QMimeData>(uri, 1);
23  qmlRegisterUncreatableType<DeclarativeMimeData>(uri, 2, 0, "MimeData", QStringLiteral("MimeData cannot be created from QML."));
24  qmlRegisterUncreatableType<DeclarativeDragDropEvent>(uri, 2, 0, "DragDropEvent", QStringLiteral("DragDropEvent cannot be created from QML."));
25  qmlRegisterUncreatableType<MimeDataWrapper>(uri, 2, 0, "MimeDataWrapper", QStringLiteral("DragDropEvent cannot be created from QML."));
26 }
QString fromLatin1(const char *str, int size)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:44:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.