GlueItemWidget

class glue.utils.qt.GlueItemWidget(parent=None)[source]

Bases: object

A mixin for QtGui.QListWidget/GlueTreeWidget subclasses, that provides drag+drop funtionality.

Attributes Summary

SUPPORTED_MIME_TYPE
data

Methods Summary

drop_data(item)
get_data(item) Convenience method to fetch the data associated with a QxxWidgetItem.
mimeData(selected_items) Return a list of MIME data associated with the each selected item.
mimeTypes() Return the list of MIME Types supported for this object.
set_data(item, data) Convenience method to set data associated with a QxxWidgetItem.

Attributes Documentation

SUPPORTED_MIME_TYPE = None
data

Methods Documentation

drop_data(item)[source]
get_data(item)[source]

Convenience method to fetch the data associated with a QxxWidgetItem.

mimeData(selected_items)[source]

Return a list of MIME data associated with the each selected item.

Parameters:

selected_items : list

A list of QtGui.QListWidgetItems or QtGui.QTreeWidgetItems instances

Returns:

result : list

A list of MIME objects

mimeTypes()[source]

Return the list of MIME Types supported for this object.

set_data(item, data)[source]

Convenience method to set data associated with a QxxWidgetItem.