v_sim.UiElementCombobox

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.CellEditable Gtk.CellEditable GObject.GInterface->Gtk.CellEditable Gtk.CellLayout Gtk.CellLayout GObject.GInterface->Gtk.CellLayout GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.ComboBox Gtk.ComboBox Gtk.Bin->Gtk.ComboBox Gtk.Buildable->Gtk.Widget Gtk.CellEditable->Gtk.ComboBox Gtk.CellLayout->Gtk.ComboBox v_sim.UiElementCombobox v_sim.UiElementCombobox Gtk.ComboBox->v_sim.UiElementCombobox Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.ComboBox (40), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.CellLayout (9)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (hasAllSelector, hasNoneSelector, format)

getSelection ()

setElement (element)

setModel (nodes)

setSelection (name)

setUnphysicalStatus (status)

Virtual Methods

Inherited:

Gtk.ComboBox (2), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.CellLayout (9)

Properties

Inherited:

Gtk.ComboBox (16), Gtk.Container (3), Gtk.Widget (39), Gtk.CellEditable (1)

Name

Type

Flags

Short Description

element

v_sim.Element

r/w

currently selected element

nodes

v_sim.NodeArray

r/w

storing nodes used as filter model

Style Properties

Inherited:

Gtk.ComboBox (4), Gtk.Widget (17)

Signals

Inherited:

Gtk.ComboBox (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2)

Name

Short Description

element-selected

This signal is emitted when a new element is selected.

Fields

Inherited:

Gtk.ComboBox (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2)

Class Details

class v_sim.UiElementCombobox(**kwargs)
Bases:

Gtk.ComboBox

Abstract:

No

Structure:

v_sim.UiElementComboboxClass

An opaque structure defining a v_sim.UiElementCombobox widget.

New in version 3.6.

classmethod new(hasAllSelector, hasNoneSelector, format)
Parameters:
  • hasAllSelector (bool) – a boolean.

  • hasNoneSelector (bool) – a boolean.

  • format (str or None) – a string (can be None).

Returns:

a newly created widget.

Return type:

Gtk.Widget

Creates a Gtk.ComboBox with a list of available v_sim.Element. This list can contain in addition a “all” value if hasAllSelector is True, or a “None” value if hasNoneSelector is True. The format parameter is used to specify the text for each row of the Gtk.ComboBox. If formt is None, just the name of the element is printed.

New in version 3.6.

getSelection()
Returns:

a newly created list of v_sim.Element. It should be freed later with g_list_free().

Return type:

[v_sim.Element]

Provide a list of selected elements.

New in version 3.6.

setElement(element)
Parameters:

element (v_sim.Element) – a v_sim.Element object.

Returns:

True if the given element exists.

Return type:

bool

Select a v_sim.Element.

New in version 3.8.

setModel(nodes)
Parameters:

nodes (v_sim.NodeArray) – a v_sim.NodeArray object.

Returns:

True if model is actually changed.

Return type:

bool

Binds nodes to self, so the list is always displaying the v_sim.Element used by nodes.

New in version 3.8.

setSelection(name)
Parameters:

name (str) – a string.

Returns:

True if the given element exists.

Return type:

bool

Select a v_sim.Element by providing its name.

New in version 3.6.

setUnphysicalStatus(status)
Parameters:

status (bool) – a boolean

If status is True, the combobox will also show elements that are tagged unphysical, see v_sim.Element.getPhysical().

New in version 3.7.

Signal Details

v_sim.UiElementCombobox.signals.element_selected(ui_element_combobox, element)
Signal Name:

element-selected

Flags:

RUN_FIRST, ACTION

Parameters:

This signal is emitted when a new element is selected.

New in version 3.6.

Property Details

v_sim.UiElementCombobox.props.element
Name:

element

Type:

v_sim.Element

Default Value:

None

Flags:

READABLE, WRITABLE

currently selected element

v_sim.UiElementCombobox.props.nodes
Name:

nodes

Type:

v_sim.NodeArray

Default Value:

None

Flags:

READABLE, WRITABLE

storing nodes used as filter model