mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added some docstrings
This commit is contained in:
parent
de498491ab
commit
123d2b851c
2 changed files with 26 additions and 0 deletions
|
|
@ -360,6 +360,20 @@ class TasksWidget(QtWidgets.QWidget):
|
|||
self._tasks_model.refresh()
|
||||
|
||||
def get_selected_task_info(self):
|
||||
"""Get selected task info.
|
||||
|
||||
Example output::
|
||||
|
||||
{
|
||||
"task_id": "5e7e3e3e3e3e3e3e3e3e3e3e",
|
||||
"task_name": "modeling",
|
||||
"task_type": "Modeling"
|
||||
}
|
||||
|
||||
Returns:
|
||||
dict[str, Union[str, None]]: Task info.
|
||||
|
||||
"""
|
||||
_, task_id, task_name, task_type = self._get_selected_item_ids()
|
||||
return {
|
||||
"task_id": task_id,
|
||||
|
|
|
|||
|
|
@ -82,6 +82,18 @@ class CreateSelectionModel(object):
|
|||
|
||||
|
||||
class CreateHierarchyController:
|
||||
"""Controller for hierarchy widgets.
|
||||
|
||||
Helper for handling hierarchy widgets in create tab. It handles selection
|
||||
of folder and task to properly propagate it to other widgets.
|
||||
|
||||
At the same time handles expected selection so can pre-select folder and
|
||||
task based on current context.
|
||||
|
||||
Args:
|
||||
controller (PublisherController): Publisher controller.
|
||||
|
||||
"""
|
||||
def __init__(self, controller):
|
||||
self._event_system = QueuedEventSystem()
|
||||
self._controller = controller
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue