Sortable Tree Widgets

Sortable tree widgets are tree widgets that provide additional functionality on top of what the underlying QtWidgets.QTreeWidget class provides, notably for dragging, dropping, and sorting of tree widget items.

The classes listed here are all derived from QT4Widgets.SortableTreeWidget.

UI4.Widgets.AttributeHistoryTreeWidget

class UI4.Widgets.AttributeHistoryTreeWidget

Bases: SortableTreeWidget

Class implementing a tree widget that wraps AttributeHistory commands, and displays attribute history results.

Code example:

attributeHistoryTreeWidget = UI4.Widgets.AttributeHistoryTreeWidget()
attributeHistoryTreeWidget.initializeHistory('/root/world/cam/camera', 'geometry.fov',
                                             NodegraphAPI.GetNode('AttributeSet'))
attributeHistoryTreeWidget.resize(400, 100)
attributeHistoryTreeWidget.show()
attributeHistoryTreeWidget.getNodeHistory()

Example Screenshot:

Screenshot of an AttributeHistoryTreeWidget widget

AttributeValueColumnTitle = 'Attribute Value'
classmethod GetAttributeDataToDisplay(attribute)
Return type:

str

Parameters:

attribute (FnAttribute.DataAttribute) – The attribute whose data you wish to display.

Returns:

A string representing the data in the given attribute. If more than MaxNumValuesToDisplay values are present, then only this number of values are returned, followed by ‘…’.

classmethod GetDisplayTextAndIconType(historyEntry)

Converts a history entry as returned by the AttributeHistory module into text to display, and a corresponding icon.

Return type:

tuple of (str, int)

Parameters:

historyEntry (str) – The history entry for which to return display text and an icon type.

Returns:

A tuple containing the text to display for the given history entry, and the icon type to use for the given history item.

classmethod GetPixmap(iconType)
Return type:

QtGui.QPixmap

Parameters:

iconType (int) – The type of icon - a key into __IconFiles.

Returns:

The pixmap corresponding to the given icon type.

GrayIcon = 0
GreenIcon = 1
HistoryEntryColumnTitle = 'History Entry'
MaxNumValuesToDisplay = 16
MaxStringCharsToDisplay = 256
NothingFoundDummyItemText = 'No Results Found'
ProcessingDummyItemText = 'Processing...'
TimerDelay = 100
__init__(parent=None)

Initializes an instance of the class.

Parameters:

parent (QtWidgets.QWidget or None) – The parent widget to own the new instance. Passed verbatim to the base class initializer.

deleteHistory()
getAttributeCreationNode(completeCallback=None, updateCallback=None)
getAttributeInheritance(completeCallback=None, updateCallback=None)
getAttributeSetNode(completeCallback=None, updateCallback=None)
getNodeHistory(completeCallback=None, updateCallback=None)
initializeHistory(locationPath, attributeName, startNode=None, startOp=None, startPort=None, startGraphState=None, delegateNodes=True)
released

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

setProcessing(isProcessing)