mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
added few docstrings
This commit is contained in:
parent
a706fecda4
commit
c08bf6b4ad
1 changed files with 14 additions and 0 deletions
|
|
@ -32,11 +32,25 @@ class BaseWidget(QtWidgets.QWidget):
|
|||
self.category_widget.set_path(path)
|
||||
|
||||
def set_focus(self, scroll_to=False):
|
||||
"""Set focus of a widget.
|
||||
|
||||
Args:
|
||||
scroll_to(bool): Also scroll to widget in category widget.
|
||||
"""
|
||||
if scroll_to:
|
||||
self.scroll_to(self)
|
||||
self.setFocus()
|
||||
|
||||
def make_sure_is_visible(self, path, scroll_to):
|
||||
"""Make a widget of entity visible by it's path.
|
||||
|
||||
Args:
|
||||
path(str): Path to entity.
|
||||
scroll_to(bool): Should be scrolled to entity.
|
||||
|
||||
Returns:
|
||||
bool: Entity with path was found.
|
||||
"""
|
||||
raise NotImplementedError(
|
||||
"{} not implemented `make_sure_is_visible`".format(
|
||||
self.__class__.__name__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue