From e9d29bcf30ccbd7c76ba37ce9efcfac1649fc46e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 18 May 2012 23:21:49 +0200 Subject: Enable basic drag and drop support for the Places Panel The dropping has not been implemented yet, however in the context of this step the creating of the drag-pixmap is now forwarded to the item-widgets. This allows creating some optimized dragging-pixmaps e.g. for the details-view, where only the name and icon should be provided as drag-pixmap. --- src/kitemviews/kitemlistwidget.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/kitemviews/kitemlistwidget.h') diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index fdb07d62e..55181faa8 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -175,6 +175,12 @@ public: */ virtual QRectF expansionToggleRect() const; + /** + * @return Pixmap that is used when dragging an item. Per default the current state of the + * widget is returned as pixmap. + */ + virtual QPixmap createDragPixmap(const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + signals: void roleEditingCanceled(int index, const QByteArray& role, const QVariant& value); void roleEditingFinished(int index, const QByteArray& role, const QVariant& value); -- cgit v1.3