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:
QT4Widgets.SortableTreeWidget.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:
-
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
orNone
) – 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
¶
-
setProcessing
(isProcessing)¶
-