omni.flux.tabbed.widget#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.setup_ui.SetupUI(
- rotation: Rotation | None = None,
- model: Model | None = None,
- delegate: Delegate | None = None,
- horizontal: bool = True,
- size_tab_label: Tuple[Length, Length] | None = None,
- disable_tab_toggle: bool = False,
- hidden_by_default: bool = False,
- width: Length | None = None,
Bases:
object
- add(datas: List[str])#
Add a tab
- Parameters:
datas – list of string name that will be the title of each tab
- destroy()#
- force_toggle(item: _Item, value: bool)#
Toggle or not a tab
- Parameters:
item – the tab to toggle or not
value – toggle or not
- get_frame(name: str) Frame | None #
Get the frame of a specific tab
- Parameters:
name – the name of the tab
- Returns:
The frame of the tab
- get_frames() Dict[str, Frame] #
Get all the frames of all tabs
- property model#
- remove(datas: List[str])#
Remove tabs
- Parameters:
datas – list of name of tab to remove
- property root_frame#
Get the root frame of this widget
- property selection#
Return the selected tab(s)
- subscribe_selection_changed(
- function: Callable[[_Item], Any],
Return the object that will automatically unsubscribe when destroyed. Called when the selection of the tree change
- subscribe_tab_toggled(
- function: Callable[[_Item, bool], Any],
Return the object that will automatically unsubscribe when destroyed. Called when the selection of the tree change
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.tab_tree.delegate.Delegate(
- rotation: Rotation | None = None,
- horizontal: bool = True,
Bases:
AbstractItemDelegate
Delegate of the tree
- build_branch(model, item, column_id, level, expanded)#
Create a branch widget that opens or closes subtree
- build_header(column_id)#
Build the header
- build_widget(model, item: _Item, column_id, level, expanded)#
Create a widget per item
- destroy()#
- get_toggled_values()#
Get the visibility of the gradients
- on_item_mouse_released(item: _Item)#
- set_toggled_value(items: List[_Item], value: bool)#
Set the gradient visible (toggle on/off)
- Parameters:
items – the item to toggle
value – toggle or not
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.tab_tree.model.Item(title)#
Bases:
AbstractItem
Item of the model
- can_item_have_children(
- item: Item,
Define if the item can have children or not
- Parameters:
item – the item itself
- Returns:
If the item can has a children or not
- on_mouse_released()#
- subscribe_mouse_released(
- function: Callable[[Item], Any],
Subscribe to the on_value_changed_callback event.
- Parameters:
function – the callback to execute when the event is triggered
- Returns:
An object that will automatically unsubscribe when destroyed.
- property title: str#
The title that will be showed on the tree
- class omni.flux.tabbed.widget.tab_tree.model.Model#
Bases:
AbstractItemModel
Basic list model
- add(datas: List[str])#
Set the items to show
- destroy()#
- get_item_value_model(item, column_id)#
Return value model. It’s the object that tracks the specific value. In our case we use ui.SimpleStringModel.
- remove(datas: List[str])#
Set the items to show
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.tab_tree.tree.Tree(
- model: _Model,
- delegate: _Delegate,
- horizontal: bool = True,
- root_frame_name: str = None,
- selection_changed_fn: Callable[[List[_Item]], Any] = None,
- size_tab_label: Tuple[Length, Length] = None,
Bases:
Widget
- destroy(self: omni.ui._ui.Widget) None #
Removes all the callbacks and circular references.
- property root_frame#
- property selection#
- set_toggled_value(items: List[_Item], value: bool)#
Set the gradient visible (toggle on/off)
- Parameters:
items – the item to toggle
value – toggle or not