stub for drag and drop and paste mechanism
This commit is contained in:
parent
672d5e9016
commit
04f11788ea
@ -35,6 +35,7 @@ void DragAndDropPlugin::registerTypes(const char *uri)
|
||||
|
||||
qmlRegisterType<DeclarativeDropArea>(uri, 2, 0, "DropArea");
|
||||
qmlRegisterType<DeclarativeDragArea>(uri, 2, 0, "DragArea");
|
||||
qmlRegisterType<QMimeData>();
|
||||
qmlRegisterUncreatableType<DeclarativeMimeData>(uri, 2, 0, "MimeData", "MimeData cannot be created from QML.");
|
||||
qmlRegisterUncreatableType<DeclarativeDragDropEvent>(uri, 2, 0, "DragDropEvent", "DragDropEvent cannot be created from QML.");
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <QQmlExpression>
|
||||
#include <QQmlProperty>
|
||||
#include <QMimeData>
|
||||
|
||||
#include <KActionCollection>
|
||||
#include <KAuthorized>
|
||||
@ -44,6 +45,7 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent)
|
||||
m_wallpaperInterface(0)
|
||||
{
|
||||
setAcceptedMouseButtons(Qt::AllButtons);
|
||||
setFlag(QQuickItem::ItemAcceptsDrops);
|
||||
|
||||
qmlRegisterType<ContainmentInterface>();
|
||||
|
||||
@ -150,6 +152,11 @@ QVariantList ContainmentInterface::availableScreenRegion(int id) const
|
||||
return regVal;
|
||||
}
|
||||
|
||||
void ContainmentInterface::processMimeData(QMimeData *data, int x, int y)
|
||||
{
|
||||
qWarning() << "Arrived mimeData" << data->urls() << data->formats() << "at" << x << ", " << y;
|
||||
}
|
||||
|
||||
void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
|
||||
{
|
||||
if (!applet) {
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
Q_INVOKABLE void lockWidgets(bool locked);
|
||||
Q_INVOKABLE QRectF screenGeometry(int id) const;
|
||||
Q_INVOKABLE QVariantList availableScreenRegion(int id) const;
|
||||
Q_INVOKABLE void processMimeData(QMimeData *data, int x, int y);
|
||||
|
||||
protected:
|
||||
void init();
|
||||
|
Loading…
Reference in New Issue
Block a user