KDeclarative

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

KDE's Doxygen guidelines are available online.