This module define classes to manage drag and drop in a universal way: approach is the same for all widgets. It provides 2 main classes:

DragHandler: knows how to transform python object to QMimeData and be able to create a drag action DropHandler: knows how to convert a QMimeData to a python object compatible with widget DropSelector*: Widgets used if more than one drop type are available. Allow user to choose which drop type to use.

class openalea.oalab.drag_and_drop.DragHandler(widget, **kwds)[source]

Bases: object

add_drag_format(mimetype_out, **kwds)[source]
mime_types()[source]
class openalea.oalab.drag_and_drop.DropHandler(widget, **kwds)[source]

Bases: object

Adapt widget to support OpenAleaLab drag and drop.

add_drop_callback(mimetype_out, callback, **kwds)[source]
can_insert_from_mime_data(source)[source]
drag_enter_event(event)[source]
drag_leave_event(event)[source]
drag_move_event(event)[source]
drop_event(event)[source]
insert_from_mime_data(source)[source]
class openalea.oalab.drag_and_drop.DropSelectorMenu(lst, labels=None, tooltip=None)[source]

Bases: PySide.QtGui.QMenu

mimetype()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2adeea05fc68>
class openalea.oalab.drag_and_drop.DropSelectorWidget(lst, labels=None)[source]

Bases: PySide.QtGui.QWidget

mimetype()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2adeea05f1b8>
openalea.oalab.drag_and_drop.encode_to_qmimedata(data, mimetype)[source]

Previous topic

<no title>

Next topic

<no title>

This Page