Flow Production Tracking Widgets
Widgets to display Flow Production Tracking specific data using a Qt view and delegate, in customizable way.
- class shotgun_widget.ShotgunWidget(parent=None)[source]
Bases:
QWidget
Shotgun widget base class.
Construction
- Parameters:
parent – The parent widget
- set_thumbnail(thumbnail)[source]
Set the widget thumbnail. If the widget has been configured to display a thumbnail but no image has been supplied, a default picture will be displayed instead.
- Parameters:
thumbnail – The thumbnail as a QtGui.QIcon
- set_selected(selected)[source]
Adjust the style sheet to indicate selection or not
- Parameters:
selected – True if selected, false if not
- set_actions(actions)[source]
Adds a list of QActions to the actions menu for this widget.
- Parameters:
actions – List of QActions to add
- class shotgun_widget.ShotgunListWidget(parent=None)[source]
Bases:
ShotgunWidget
This Shotgun Widget is typically used in a list view mode.
Class constructor
- Parameters:
parent – The parent widget
- set_formatting(top_left=None, top_right=None, body=None, thumbnail=True)[source]
Set the rendering of the widget items.
- Parameters:
top_left – Content to display in the top left area of the item
top_right – Content to display in the top right area of the item
body – Content to display in the main area of the item
thumbnail – If True, the widget will display a thumbnail. If False, no thumbnail will be displayed.
- set_text(sg_data)[source]
Fill the widget items by replacing the tokens with the right values.
- Parameters:
sg_data – Dictionary of Shotgun data we want to use to replace the tokens with.
- replace_extra_key(key_name, key_value)[source]
Replace a non-Shotgun token by its value.
- Parameters:
key_name – Name of the token to replace. It must be declared using <> character (eg <NODE>)
key_value – Replacement value to use
- class shotgun_widget.ShotgunFolderWidget(parent=None)[source]
Bases:
ShotgunWidget
This Shotgun Widget is typically used in an icon view mode.
Class constructor
- Parameters:
parent – The parent widget
- set_formatting(header=None, body=None, thumbnail=True)[source]
Set the rendering of the widget items.
- Parameters:
header – Content to display in the header area of the item
body – Content to display in the main area of the item
thumbnail – If True, the widget will display a thumbnail. If False, no thumbnail will be displayed.
- set_text(sg_data)[source]
Fill the widget items by replacing the tokens with the right values.
- Parameters:
sg_data – Dictionary of Shotgun data we want to use to replace the tokens with.
- replace_extra_key(key_name, key_value)[source]
Replace a non-Shotgun token by its value.
- Parameters:
key_name – Name of the token to replace. It must be declared using <> character (eg <NODE>)
key_value – Replacement value to use