mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
component item can coverup component widget changes
This commit is contained in:
parent
fe3d94c203
commit
b2b4c031c1
1 changed files with 16 additions and 2 deletions
|
|
@ -5,11 +5,25 @@ from . import ComponentWidget
|
|||
class ComponentItem(QtWidgets.QTreeWidgetItem):
|
||||
def __init__(self, parent, data):
|
||||
super().__init__(parent)
|
||||
self.parent_widget = parent
|
||||
self.in_data = data
|
||||
self._widget = ComponentWidget(self)
|
||||
self._widget.set_context(data)
|
||||
|
||||
def set_context(self):
|
||||
self._widget = ComponentWidget(self)
|
||||
self._widget.set_context(self.in_data)
|
||||
self.treeWidget().setItemWidget(self, 0, self._widget)
|
||||
|
||||
def is_thumbnail(self):
|
||||
return self._widget.thumbnail.checked
|
||||
|
||||
def change_thumbnail(self, hover=True):
|
||||
self._widget.thumbnail.change_checked(hover)
|
||||
|
||||
def is_preview(self):
|
||||
return self._widget.preview.checked
|
||||
|
||||
def change_preview(self, hover=True):
|
||||
self._widget.preview.change_checked(hover)
|
||||
|
||||
def double_clicked(*args):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue