lightspeed.trex.capture_tree.model#

  • 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

  • https://www.apache.org/licenses/LICENSE-2.0

  • 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 lightspeed.trex.capture_tree.model.CaptureTreeDelegate(preview_on_hover: bool = True)#

Delegate of the action lister

build_branch(
model,
item,
column_id,
level,
expanded,
)#

Create a branch model that opens or closes subtree

build_header(column_id)#

Build the header

build_widget(
model,
item,
column_id,
level,
expanded,
)#

Create a model per item

class lightspeed.trex.capture_tree.model.CaptureTreeItem(path, image)#

Item of the model

class lightspeed.trex.capture_tree.model.CaptureTreeModel(context_name, show_progress: bool = True)#

List model of actions

get_item_children(item)#

Returns all the children when the model asks it.

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.

get_item_value_model_count(_)#

The number of columns

get_progress_data(
item_path: str,
) tuple[int | None, int | None]#

Get progress data from cache by path

refresh(paths: list[tuple[str, str]])#

Refresh the list

subscribe_progress_updated(func)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_stage_opened_or_closed(func)#

Subscribe to stage opened/closed events. Return the object that will automatically unsubscribe when destroyed.

subscribe_sublayers_changed(func)#

Subscribe to sublayers changed events. Return the object that will automatically unsubscribe when destroyed.