Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget
opalone._internal.widgets.Widget
class opalone._internal.widgets.Widget(widget_id, panel_id)
Panel
bgColorunset

Bases: BlockBase

A widget is a component of a panel that is used to control values in the simulation and display values from it.

A widget has a given number of Parameters.

A widget also has input and output Signals. However, contrary to Blocks, widgets have no Ports because they cannot link to one another within the same panel like regular blocks in a model.

Parameters:
  • widget_id (str) – the ID of the widget.

  • panel_id (str) – the ID of the panel that owns this widget.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.delete
opalone._internal.widgets.Widget.delete
delete()
Panel
bgColorunset

Delete the current resource, which is done by suppressing its ID.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.to_json
opalone._internal.widgets.Widget.to_json
to_json(fields, values)
Panel
bgColorunset

Convert this resource to a serialized JSON representation.

Parameters:
  • fields (tuple[str] | list[str]) – Fields to include.

  • values (tuple[object] | list[object]) – The value of each field

Returns:

The serialized JSON representation.

Return type:

str

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.angle
opalone._internal.widgets.Widget.angle
property angle: float
Panel
bgColorunset

The angle of the block.

The value is between 0 and 360 degrees.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.comment_state
opalone._internal.widgets.Widget.comment_state
property comment_state: str
Panel
bgColorunset

The comment state of the block.

The default value is NONE.

If COMMENT_OUT, the block is not considered by the simulation.

If COMMENT_THROUGH, the block is considered as a link between its input ports and output ports.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.datapoints
opalone._internal.widgets.Widget.datapoints
property datapoints: dict[str, Datapoint]
Panel
bgColorunset

The datapoints of the block, in the form of a mapping name = datapoint. Datapoint names are unique within a given block.

Datapoints are a concatenation of parameters and signals, and could include other elements in the future.

This property is read-only, it cannot be modified. However, each datapoint might have alterable properties.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.description
opalone._internal.widgets.Widget.description
property description: str
Panel
bgColorunset

The description of the block.

This property is read-only, it cannot be modified.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.dimensions
opalone._internal.widgets.Widget.dimensions
property dimensions: str
Panel
bgColorunset

Dimensions (width and height) of the block.

The format of the location is x y where x and y are integer values (no decimal).

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.flip_state
opalone._internal.widgets.Widget.flip_state
property flip_state: str
Panel
bgColorunset

The flip state of the block.

The default value is NONE.

If HORIZONTAL, the block is flipped horizontally (the flip axis is vertical).

If VERTICAL, the block is flipped vertically (the flip axis is horizontal).

If BOTH, both axes are used.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.id
opalone._internal.widgets.Widget.id
property id: str
Panel
bgColorunset

The ID of the resource.

This property is read-only, it cannot be modified.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.is_label_visible
opalone._internal.widgets.Widget.is_label_visible
property is_label_visible: bool
Panel
bgColorunset

Indicates if this block’s label is visible (True) or not (False).

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.is_locked
opalone._internal.widgets.Widget.is_locked
property is_locked: bool
Panel
bgColorunset

Indicates if this block can be moved in the diagram and if it can be resized. (True) or not (False).

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.location
opalone._internal.widgets.Widget.location
property location: str
Panel
bgColorunset

The location of the block within a diagram.

The format of the location is (x,y) where x and y are integer values (no decimal).

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.name
opalone._internal.widgets.Widget.name
property name: str
Panel
bgColorunset

The name of the block. Block names must be unique within a Subsystem. A widget name must be unique within a Panel.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.parameters
opalone._internal.widgets.Widget.parameters
property parameters: dict[any, Datapoint]
Panel
bgColorunset

The parameters of the widget, in the form of a mapping name = parameter. Parameter names are unique within a given widget.

This property is read-only, it cannot be modified. However, each parameter might have alterable properties.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.ref_id
opalone._internal.widgets.Widget.ref_id
property ref_id: str
Panel
bgColorunset

The reference ID of the block.

This ID is only useful to lookup the block’s library data.

This property is read-only, it cannot be modified.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.signals
opalone._internal.widgets.Widget.signals
property signals
Panel
bgColorunset

The signals of the widget, in the form of a mapping name = signal. Signal names are unique within a given widget.

This property is read-only, it cannot be modified. However, each signal might have alterable properties.

Panel
bgColorunset
Anchor
opalone._internal.widgets.Widget.type
opalone._internal.widgets.Widget.type
property type: BlockType
Panel
bgColorunset

The type of the block.

This property is read-only, it cannot be modified.