lightspeed.progress_popup.window

  • 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.progress_popup.window.CustomProgressModel

Bases: omni.ui._ui.AbstractValueModel

get_value_as_float(self: omni.ui._ui.AbstractValueModel) float

Return the float representation of the value.

get_value_as_string(self: omni.ui._ui.AbstractValueModel) str

Return the string representation of the value.

set_value(value)

Reimplemented set

class lightspeed.progress_popup.window.ProgressPopup(title, cancel_button_text='Cancel', cancel_button_fn=None, status_text='', modal=True)

Bases: object

Creates a modal window with a status label and a progress bar inside. :param title: Title of this window. :type title: str :param cancel_button_text: It will have a cancel button by default. This is the title of it. :type cancel_button_text: str :param cancel_button_fn: The callback after cancel button is clicked. :type cancel_button_fn: function :param status_text: The status text. :type status_text: str :param min_value: The min value of the progress bar. It’s 0 by default. :param max_value: The max value of the progress bar. It’s 100 by default. :param dark_style: If it’s to use dark style or light style. It’s dark stye by default.

destroy()
get_progress()
get_status_text()
hide()
is_visible()
property progress
set_cancel_fn(on_cancel_button_clicked)
set_progress(progress)
set_status_text(status_text)
show()
property status_text