KDeclarative
DeclarativeMimeData.cpp
13 This is a wrapper class around QMimeData, with a few extensions to provide better support for in-qml drag & drops.
28 - In DragArea, we want to clone our "working copy" of the DeclarativeMimeData instance, as Qt will automatically
30 - In the drop events, the QMimeData is const, and we have troubles passing const to QML. So we clone it to
33 This method will try to cast the QMimeData to DeclarativeMimeData, and will clone our extensions to QMimeData as well
45 // If the object we are copying actually is a DeclarativeMimeData, copy our extended properties as well
46 const DeclarativeMimeData *declarativeMimeData = qobject_cast<const DeclarativeMimeData *>(copy);
56 TODO: We should use QDeclarativeListProperty<QUrls> to return the whole list instead of only the first element.
133 Setting source to any existing qml item will enable the receiver of the drag and drop operation to know in which item
136 In the case of inter-application drag and drop operations, the source will not be available, and will be 0.
137 Be sure to test it in your QML code, before using it, or it will generate errors in the console.
Definition DeclarativeMimeData.h:18
QJsonArray urls
A list of URLs contained within the MIME data object.
Definition DeclarativeMimeData.h:40
QColor color
A color if the data stored in the object represents a color (MIME type application/x-color); otherwis...
Definition DeclarativeMimeData.h:45
QQuickItem * source
The graphical item on the scene that started the drag event.
Definition DeclarativeMimeData.h:50
void append(const QJsonValue &value)
qsizetype size() const const
void append(QList< T > &&value)
void reserve(qsizetype size)
QByteArray
QVariant colorData() const const
QByteArray data(const QString &mimeType) const const
bool hasColor() const const
void setColorData(const QVariant &color)
void setData(const QString &mimeType, const QByteArray &data)
void setUrls(const QList< QUrl > &urls)
QList< QUrl > urls() const const
Q_EMITQ_EMIT
T qobject_cast(QObject *object)
QString toString(FormattingOptions options) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.