mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
added new methods for category widget that can change full path (lead to different category)
This commit is contained in:
parent
c647649de0
commit
a5082df463
1 changed files with 31 additions and 0 deletions
|
|
@ -269,6 +269,37 @@ class SettingsCategoryWidget(QtWidgets.QWidget):
|
|||
# Scroll to widget
|
||||
self.scroll_widget.ensureWidgetVisible(widget)
|
||||
|
||||
def go_to_fullpath(self, full_path):
|
||||
"""Full path of settings entity which can lead to different category.
|
||||
|
||||
Args:
|
||||
full_path (str): Full path to settings entity. It is expected that
|
||||
path starts with category name ("system_setting" etc.).
|
||||
"""
|
||||
if not full_path:
|
||||
return
|
||||
items = full_path.split("/")
|
||||
category = items[0]
|
||||
path = ""
|
||||
if len(items) > 1:
|
||||
path = "/".join(items[1:])
|
||||
self.full_path_requested.emit(category, path)
|
||||
|
||||
def contain_category_key(self, category):
|
||||
"""Parent widget ask if category of full path lead to this widget.
|
||||
|
||||
Args:
|
||||
category (str): The category name.
|
||||
|
||||
Returns:
|
||||
bool: Passed category lead to this widget.
|
||||
"""
|
||||
return False
|
||||
|
||||
def set_category_path(self, category, path):
|
||||
"""Change path of widget based on category full path."""
|
||||
pass
|
||||
|
||||
def set_path(self, path):
|
||||
self.breadcrumbs_widget.set_path(path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue