diff options
| author | Peter Penz <[email protected]> | 2012-05-26 13:40:48 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-26 13:41:30 +0200 |
| commit | 073f8cae13f2637c0bf2f5611295e103418d52ff (patch) | |
| tree | 08eadfa6f69f036a04945b2c6e512bfb8207e018 /src/panels/places/placespanel.cpp | |
| parent | f7622d323926017b9acc4d42f05abdc4bd5ca456 (diff) | |
Further preperations for drag & drop support in the places panel
Diffstat (limited to 'src/panels/places/placespanel.cpp')
| -rw-r--r-- | src/panels/places/placespanel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 968c9af45..deef42935 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -43,6 +43,7 @@ #include "placesitemlistwidget.h" #include "placesitemmodel.h" #include <views/draganddrophelper.h> +#include <QGraphicsSceneDragDropEvent> #include <QVBoxLayout> #include <QShowEvent> @@ -88,6 +89,7 @@ void PlacesPanel::showEvent(QShowEvent* event) connect(m_controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int))); connect(m_controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF))); connect(m_controller, SIGNAL(viewContextMenuRequested(QPointF)), this, SLOT(slotViewContextMenuRequested(QPointF))); + connect(m_controller, SIGNAL(itemDropEvent(int,QGraphicsSceneDragDropEvent*)), this, SLOT(slotItemDropEvent(int,QGraphicsSceneDragDropEvent*))); KItemListContainer* container = new KItemListContainer(m_controller, this); container->setEnabledFrame(false); @@ -252,6 +254,11 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos) selectClosestItem(); } +void PlacesPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event) +{ + m_model->dropMimeData(index, event->mimeData()); +} + void PlacesPanel::slotUrlsDropped(const KUrl& dest, QDropEvent* event, QWidget* parent) { Q_UNUSED(parent); |
