diff gui/containergui_base.py @ 121:4826c8cbd7d8

Added setDragData method.
author KarstenBock@gmx.net
date Thu, 06 Oct 2011 15:56:42 +0200
parents 30dbbae653ad
children aea5a9229b4c
line wrap: on
line diff
--- a/gui/containergui_base.py	Wed Oct 05 12:59:22 2011 +0200
+++ b/gui/containergui_base.py	Thu Oct 06 15:56:42 2011 +0200
@@ -64,6 +64,15 @@
         pass    
     
 
+    def setDragData(self, drag_item, down_image, up_image, container):
+        """Set the dragging data"""
+        # set the mouse cursor to be the widget's image
+        self.controller.setMouseCursor(up_image.source, down_image.source)
+        data_drag.dragged_item = drag_item
+        data_drag.dragged_image = up_image.source
+        data_drag.dragging = True
+        data_drag.source_container = container
+        
     def createMenuItems(self, item, actions):
         """Creates context menu items for all classes based on ContainerGUI"""
         menu_actions = []