lightspeed.trex.home.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

  • 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.home.widget.HomePageWidget(context_name: str = '')#

Bases: object

destroy()#
set_recent_items(items: list[tuple[str, str, dict]])#

Set the list of recent projects in the recent projects tree

set_resume_enabled(enabled: bool)#

Enable or disable the resume button. Will also update the tooltip if the button is disabled

Parameters:

enabled – Whether the resume button should be enabled or disabled

subscribe_load_project_clicked(
callback: Callable[[str], Any],
) EventSubscription#

Subscribe to the event triggered when a project should be opened.

The callback will receive the project path.

subscribe_new_project_clicked(
callback: Callable[[], Any],
) EventSubscription#

Subscribe to the event triggered when the new project button is clicked

subscribe_open_project_clicked(
callback: Callable[[], Any],
) EventSubscription#

Subscribe to the event triggered when the open project button is clicked

subscribe_remove_from_recent_clicked(
callback: Callable[[list[str]], Any],
) EventSubscription#

Subscribe to the event triggered when projects should be removed from the recent projects list.

The callback will receive a list of project paths to remove.

subscribe_resume_clicked(
callback: Callable[[], Any],
) EventSubscription#

Subscribe to the event triggered when the resume button is clicked