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
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.validator.mass.queue.widget.tree.model.Actions(value)
Bases:
enum.Enum
An enumeration.
- SHOW_VALIDATION = 'show_validation'
- class omni.flux.validator.mass.queue.widget.tree.model.Enum(value)
Bases:
object
Generic enumeration.
Derive from this class to define new enumerations.
- name
The name of the Enum member.
- value
The value of the Enum member.
- class omni.flux.validator.mass.queue.widget.tree.model.Item(data: _ManagerCore)
Bases:
omni.ui._ui.AbstractItem
Item of the model
- __init__(self: omni.ui._ui.AbstractItem) None
- build_actions_ui()
Ui that will expose controllers
- build_validation_widget_ui(use_global_style: bool = False)
- can_item_have_children(item: omni.flux.validator.mass.queue.widget.tree.model.Item) bool
Define if the item can have children or not
- Parameters
item – the item itself
- Returns
If the item can has a children or not
- property creation_date
- property display_name
- property display_name_tooltip
- property finish_result
- property is_finished
- mass_build_queue_action_ui(default_actions: List[Callable[[], Any]], callback: Callable[[str], Any]) Any
Default exposed action for Mass validation. The UI will be built into the delegate of the mass queue.
- on_mass_queue_action_pressed(action_name: str, **kwargs)
Called when the user click with the left mouse button
- on_mouse_hovered(hovered)
Called when the user click with the left mouse button
- progress_changed(result: bool = True)
- property schema_uuid
- set_progress(progress: float)
- subscribe_mass_queue_action_pressed(callback: Callable[[omni.flux.validator.mass.queue.widget.tree.model.Item, str, Optional[Any]], Any])
Return the object that will automatically unsubscribe when destroyed.
- subscribe_run_finished(callback: Callable[[bool, Optional[str]], Any])
- subscribe_run_progress(callback: Callable[[float], Any])
- update_schema(schema: _ValidationSchema)
- property validation_widget
- class omni.flux.validator.mass.queue.widget.tree.model.Model
Bases:
omni.ui._ui.AbstractItemModel
Basic list model
- __init__(self: omni.ui._ui.AbstractItemModel) None
Constructs AbstractItemModel.
- kwargs : dict
See below
### Keyword Arguments:
- add_items(items: List[omni.flux.validator.mass.queue.widget.tree.model.Item])
Set the items to show
- add_schema_in_update_item_queue(schema: _ValidationSchema)
Add a schema into a queue. Use the dictionary to track what was the last schema added in the queue.
- Parameters
schema – the updated schema to use for the update
- async deferred_destroy()
- destroy()
- get_item_children(item: Optional[omni.flux.validator.mass.queue.widget.tree.model.Item])
Returns all the children when the widget 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(item: omni.flux.validator.mass.queue.widget.tree.model.Item)
The number of columns
- pause_update_item_queue(value: bool)
Pause the update of the item(s).
- remove_items(items: List[omni.flux.validator.mass.queue.widget.tree.model.Item])
Set the items to show
- subscribe_progress(callback: Callable[[float, bool], Any])
Return the object that will automatically unsubscribe when destroyed.
- update_item()
Update an item from a given schema that has the same UUID.
- class omni.flux.validator.mass.queue.widget.tree.model.datetime(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])
Bases:
datetime.date
The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints.
- astimezone()
tz -> convert to local time in new timezone tz
- combine()
date, time -> datetime with same date and time fields
- ctime()
Return ctime() style string.
- date()
Return date object with same year, month and day.
- dst()
Return self.tzinfo.dst(self).
- fold
- fromisoformat()
string -> datetime from datetime.isoformat() output
- fromtimestamp()
timestamp[, tz] -> tz’s local time from POSIX timestamp.
- hour
- isoformat()
[sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. sep is used to separate the year from the time, and defaults to ‘T’. The optional argument timespec specifies the number of additional terms of the time to include. Valid options are ‘auto’, ‘hours’, ‘minutes’, ‘seconds’, ‘milliseconds’ and ‘microseconds’.
- max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)
- microsecond
- min = datetime.datetime(1, 1, 1, 0, 0)
- minute
- now()
Returns new datetime object representing current time local to tz.
- tz
Timezone object.
If no tz is specified, uses local timezone.
- replace()
Return datetime with new specified fields.
- resolution = datetime.timedelta(microseconds=1)
- second
- strptime()
string, format -> new datetime parsed from a string (like time.strptime()).
- time()
Return time object with same time but with tzinfo=None.
- timestamp()
Return POSIX timestamp as float.
- timetuple()
Return time tuple, compatible with time.localtime().
- timetz()
Return time object with same time and tzinfo.
- tzinfo
- tzname()
Return self.tzinfo.tzname(self).
- utcfromtimestamp()
Construct a naive UTC datetime from a POSIX timestamp.
- utcnow()
Return a new datetime representing UTC day and time.
- utcoffset()
Return self.tzinfo.utcoffset(self).
- utctimetuple()
Return UTC time tuple, compatible with time.localtime().