v_sim.GlExtMarks

g GObject.GInterface GObject.GInterface v_sim.NodeMasker v_sim.NodeMasker GObject.GInterface->v_sim.NodeMasker GObject.Object GObject.Object v_sim.GlExt v_sim.GlExt GObject.Object->v_sim.GlExt v_sim.GlExtMarks v_sim.GlExtMarks v_sim.GlExt->v_sim.GlExtMarks v_sim.NodeMasker->v_sim.GlExtMarks

Subclasses:

None

Methods

Inherited:

v_sim.GlExt (16), GObject.Object (37), v_sim.NodeMasker (3)

Structs:

GObject.ObjectClass (5)

class

new (name)

exportXMLFile (filename, nodes, drawingMode, drawingInfos)

getActive (nodeId)

getHidingMode ()

getHighlightStatus (nodeId)

getHighlighted ()

getInternalList ()

getMeasurementLabels ()

getMeasurementStrings ()

parseXMLFile (filename, drawingMode, drawingInfos)

removeMeasures (nodeId)

setDataRenderer (renderer)

setDrawValues (status)

setHidingMode (mode)

setHighlight (nodes, status)

setInfos (nodeId, status)

setInteractive (inter)

unHighlight ()

Virtual Methods

Inherited:

v_sim.GlExt (3), GObject.Object (7), v_sim.NodeMasker (2)

Properties

Inherited:

v_sim.GlExt (9)

Name

Type

Flags

Short Description

gl-view

v_sim.GlView

r/w

GlView mark labels are aligned with

hiding-mode

int

r/w

nodes hiding property

highlight

GLib.Array

r/w

node ids with highlight mark.

interactive

v_sim.Interactive

r/w

Interactive the marks react on

Signals

Inherited:

GObject.Object (1), v_sim.NodeMasker (1)

Name

Short Description

measurementChanged

The list of measurements has been changed.

Fields

Inherited:

GObject.Object (1), v_sim.NodeMasker (1)

Name

Type

Access

Description

parent

v_sim.GlExt

r

Class Details

class v_sim.GlExtMarks(**kwargs)
Bases:

v_sim.GlExt, v_sim.NodeMasker

Abstract:

No

Structure:

v_sim.GlExtMarksClass

All fields are private.

New in version 3.6.

classmethod new(name)
Parameters:

name (str or None) – a possible name for the v_sim.GlExt.

Returns:

the newly created object.

Return type:

v_sim.GlExtMarks

Create a new v_sim.GlExtMarks object. Make it listen to v_sim.Interactive ::node-selection signal to update itself automatically.

exportXMLFile(filename, nodes, drawingMode, drawingInfos)
Parameters:
  • filename (str) – a location to save to.

  • nodes ([int]) – an array of node ids.

  • drawingMode (v_sim.GlExtInfosDrawId) – a flag.

  • drawingInfos (int) – a flag.

Raises:

GLib.Error

Returns:

True if no error.

Return type:

bool

This routines export to an XML file a description of selected nodes. If nodes is None, the nodes stored in the mark will be used instead.

New in version 3.5.

getActive(nodeId)
Parameters:

nodeId (int) – a node id.

Returns:

True if nodeId participate to any mark (distance, angle…).

Return type:

bool

Retrieve if nodeId is implied any measurement marks stored in mark.

getHidingMode()
Returns:

a v_sim.GlExtMarksHidingModes value.

Return type:

v_sim.GlExtMarksHidingModes

Retrieves the hiding mode of self, see v_sim.GlExtMarksHidingModes.

New in version 3.8.

getHighlightStatus(nodeId)
Parameters:

nodeId (int) – a node id (ranging from 0).

Returns:

True if nodeId has an highlight.

Return type:

bool

Nodes can be highlighted.

New in version 3.7.

getHighlighted()
Returns:

list of highlighted nodes (starting from 0), should not be freed.

Return type:

[int]

self has a list of mark for some nodes. These marks are only highlight marks.

New in version 3.6.

getInternalList()
Returns:

a v_sim.GlExt object.

Return type:

v_sim.GlExt

Return an additional list used internaly.

New in version 3.7.

getMeasurementLabels()
Returns:

a newly allocated string.

Return type:

str

Exports as a string the ids of nodes for measurement marks.

New in version 3.6.

getMeasurementStrings()
Returns:

a newly allocated string.

Return type:

str

Exports as a string all measurements stored in self.

New in version 3.6.

parseXMLFile(filename, drawingMode, drawingInfos)
Parameters:
  • filename (str) – a location to save to.

  • drawingMode (v_sim.GlExtInfosDrawId) – a location to a flag.

  • drawingInfos (int) – a location to a flag.

Raises:

GLib.Error

Returns:

True if no error.

infos:

a location to a GLib.List.

Return type:

(bool, infos: [int])

This routines read from an XML file the description of selected nodes, mark is updated accordingly.

New in version 3.5.

removeMeasures(nodeId)
Parameters:

nodeId (int) – a node id.

Returns:

True is mark is changed.

Return type:

bool

This routine scans the mark to remove all marks of distance or angle where nodeId is implied in.

setDataRenderer(renderer)
Parameters:

renderer (v_sim.NodeArrayRenderer) – a v_sim.NodeArrayRenderer object.

Attach the given self to data. self will be updated if data is changed and internal list of marks is updated with the new nodes of data.

setDrawValues(status)
Parameters:

status (bool) – a boolean.

Returns:

True if self is modified.

Return type:

bool

Change if the measurements are printed or not (distance length, or angles…).

setHidingMode(mode)
Parameters:

mode (v_sim.GlExtMarksHidingModes) – a v_sim.GlExtMarksHidingModes value.

Returns:

True if value is actually changed.

Return type:

bool

Change the hiding mode of self.

setHighlight(nodes, status)
Parameters:
Returns:

True if redraw needed.

Return type:

bool

self has a list of mark for some nodes. These marks can be highlight (or distance, angles…). Depending on status values, the mark may be switch on or off.

New in version 3.6.

setInfos(nodeId, status)
Parameters:
  • nodeId (int) – a node id.

  • status (bool) – a boolean.

Returns:

True if self is changed.

Return type:

bool

Depending on status, it removes all measurements from nodeId or it calculate all first neighbour relations of nodeId.

setInteractive(inter)
Parameters:

inter (v_sim.Interactive or None) – a v_sim.Interactive object.

Listen to v_sim.Interactive ::node-selection signal to update self.

New in version 3.7.

unHighlight()
Returns:

True if anything was highlighted.

Return type:

bool

Remove all highlight marks.

New in version 3.8.

Signal Details

v_sim.GlExtMarks.signals.measurementChanged(gl_ext_marks, data)
Signal Name:

measurementChanged

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

The list of measurements has been changed.

New in version 3.6.

Property Details

v_sim.GlExtMarks.props.gl_view
Name:

gl-view

Type:

v_sim.GlView

Default Value:

None

Flags:

READABLE, WRITABLE

GlView mark labels are aligned with

v_sim.GlExtMarks.props.hiding_mode
Name:

hiding-mode

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

nodes hiding property

v_sim.GlExtMarks.props.highlight
Name:

highlight

Type:

GLib.Array

Default Value:

None

Flags:

READABLE, WRITABLE

node ids with highlight mark.

v_sim.GlExtMarks.props.interactive
Name:

interactive

Type:

v_sim.Interactive

Default Value:

None

Flags:

READABLE, WRITABLE

Interactive the marks react on