v_sim.UiSelection

g GObject.GInterface GObject.GInterface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.TreeDragDest Gtk.TreeDragDest GObject.GInterface->Gtk.TreeDragDest Gtk.TreeDragSource Gtk.TreeDragSource GObject.GInterface->Gtk.TreeDragSource Gtk.TreeModel Gtk.TreeModel GObject.GInterface->Gtk.TreeModel Gtk.TreeSortable Gtk.TreeSortable GObject.GInterface->Gtk.TreeSortable GObject.Object GObject.Object Gtk.ListStore Gtk.ListStore GObject.Object->Gtk.ListStore Gtk.Buildable->Gtk.ListStore v_sim.UiSelection v_sim.UiSelection Gtk.ListStore->v_sim.UiSelection Gtk.TreeDragDest->Gtk.ListStore Gtk.TreeDragSource->Gtk.ListStore Gtk.TreeModel->Gtk.ListStore Gtk.TreeSortable->Gtk.ListStore

Subclasses:

None

Methods

Inherited:

Gtk.ListStore (18), GObject.Object (37), Gtk.Buildable (10), Gtk.TreeDragDest (2), Gtk.TreeDragSource (3), Gtk.TreeModel (28), Gtk.TreeSortable (6)

Structs:

GObject.ObjectClass (5)

class

new ()

add (id)

append (ids)

appendHighlightedNodes ()

at (iter, id)

clear ()

get ()

highlight (iter, status)

remove (ids)

removeAt (iter)

removePaths (paths)

set (ids)

setHighlightModel (marks)

setNodeModel (data)

Virtual Methods

Inherited:

GObject.Object (7), Gtk.Buildable (10), Gtk.TreeDragDest (2), Gtk.TreeDragSource (3), Gtk.TreeModel (19), Gtk.TreeSortable (6)

Properties

Name

Type

Flags

Short Description

highlight

bool

r/w

highlight the selection.

marks

v_sim.GlExtMarks

r/w

highlight model.

model

v_sim.Data

r/w

node model.

selection

GLib.Array

r/w

ids of selected nodes.

Signals

Inherited:

GObject.Object (1), Gtk.TreeModel (5), Gtk.TreeSortable (1)

Fields

Inherited:

GObject.Object (1), Gtk.TreeModel (5), Gtk.TreeSortable (1)

Name

Type

Access

Description

parent

Gtk.ListStore

r

priv

v_sim.UiSelectionPrivate

r

Class Details

class v_sim.UiSelection(*column_types)
Bases:

Gtk.ListStore

Abstract:

No

Structure:

v_sim.UiSelectionClass

Common name to refer to a #_VisuUiSelection.

classmethod new()
Returns:

a newly created object.

Return type:

v_sim.UiSelection

Create a new Gtk.ListStore to store planes.

New in version 3.8.

add(id)
Parameters:

id (int) – a node id.

Returns:

True if id can be added to the model.

Return type:

bool

Add the node identified by id to self. If the node already exists or if self has no current node model, nothing is done. If there are several nodes to insert at once, use v_sim.UiSelection.append() instead to ensure that the selection signalis only emitted once.

New in version 3.8.

append(ids)
Parameters:

ids ([int]) – a list of node ids.

Inserts every node from ids into self. The selection signal is only emitted once.

New in version 3.8.

appendHighlightedNodes()

A convenient method to get the highlighted nodes and add them to the self.

New in version 3.8.

at(iter, id)
Parameters:
Returns:

True if node id is set at iter.

Return type:

bool

Inquires if the model self is storing node id at iter.

New in version 3.8.

clear()

An overloaded method of Gtk.ListStore.clear() to ensure that the selection signal is properly emitted.

New in version 3.8.

get()
Returns:

a list of node ids.

Return type:

[int]

Retrieves the list of node ids in the selection.

New in version 3.8.

highlight(iter, status)
Parameters:

Apply the new status to nodes. If iter is None, all nodes stored in self are modified, otherwise, only the node at iter.

New in version 3.8.

remove(ids)
Parameters:

ids ([int]) – a list of node ids.

Remove a list of nodes from self.

New in version 3.8.

removeAt(iter)
Parameters:

iter (Gtk.TreeIter) – a Gtk.TreeIter structure.

Returns:

True if iter was actually removed.

Return type:

bool

Remove the node stored at iter from self. This is an overloaded function of Gtk.ListStore.remove() to emit the selection signal after change.

New in version 3.8.

removePaths(paths)
Parameters:

paths ([Gtk.TreePath]) – a list of Gtk.TreePath

Remove all given paths from self.

New in version 3.8.

set(ids)
Parameters:

ids ([int]) – a list of node ids.

Clear the self and update it with the nodes from ids.

New in version 3.8.

setHighlightModel(marks)
Parameters:

marks (v_sim.GlExtMarks or None) – a v_sim.GlExtMarks object.

Returns:

True if set is changed

Return type:

bool

Bind the set object to list.

setNodeModel(data)
Parameters:

data (v_sim.Data or None) – a v_sim.Data object.

Returns:

True if set is changed

Return type:

bool

Bind the set object to list.

Property Details

v_sim.UiSelection.props.highlight
Name:

highlight

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

highlight the selection.

v_sim.UiSelection.props.marks
Name:

marks

Type:

v_sim.GlExtMarks

Default Value:

None

Flags:

READABLE, WRITABLE

highlight model.

v_sim.UiSelection.props.model
Name:

model

Type:

v_sim.Data

Default Value:

None

Flags:

READABLE, WRITABLE

node model.

v_sim.UiSelection.props.selection
Name:

selection

Type:

GLib.Array

Default Value:

None

Flags:

READABLE, WRITABLE

ids of selected nodes.