┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-08-23 20:55:41 +0200
committerPeter Penz <[email protected]>2011-08-23 20:58:22 +0200
commit5ba4aeba3e82f843fb4c5b54daaaf9ae5d8cedac (patch)
treefe0296bb5b842621e1c0ed3004276404bed740db /src/kitemviews/kitemlistcontroller.h
parent6a228cdbd94ae8cb8215d53187328c54cbc050bd (diff)
Rough draft for getting back drag and drop support
Includes a lot of TODOs but is a base for getting back full drag and drop support quite soon.
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.h')
-rw-r--r--src/kitemviews/kitemlistcontroller.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h
index 90850bae1..b56087ce1 100644
--- a/src/kitemviews/kitemlistcontroller.h
+++ b/src/kitemviews/kitemlistcontroller.h
@@ -26,6 +26,8 @@
#include <libdolphin_export.h>
#include <QObject>
+#include <QPixmap>
+#include <QPointF>
#include <QSet>
class KItemModelBase;
@@ -39,6 +41,7 @@ class QGraphicsSceneWheelEvent;
class QHideEvent;
class QInputMethodEvent;
class QKeyEvent;
+class QMimeData;
class QShowEvent;
class QTransform;
@@ -130,11 +133,32 @@ private slots:
void slotRubberBandChanged();
private:
+ /**
+ * @return Pixmap that is used for a drag operation based on the
+ * items given by \a indexes.
+ * TODO: Will be moved to KItemListView later
+ */
+ QPixmap createDragPixmap(const QSet<int>& indexes) const;
+
+ /**
+ * @return MIME-data for the items given by \a indexes.
+ * TODO: Will be moved to KItemListView or KItemModelBase/KFileItemModel later.
+ */
+ QMimeData* createMimeData(const QSet<int>& indexes) const;
+
+ /**
+ * Creates a QDrag object to start a drag-operation.
+ */
+ void startDragging();
+
+private:
+ bool m_dragging;
SelectionBehavior m_selectionBehavior;
KItemModelBase* m_model;
KItemListView* m_view;
KItemListSelectionManager* m_selectionManager;
int m_pressedIndex;
+ QPointF m_pressedMousePos;
/**
* When starting a rubberband selection during a Shift- or Control-key has been