SplineTable (hwx.gui)#

class SplineTable(splineEditor, columnLabels=('X', 'Y'), **kwds)#

Bases: Table

A table used to display/edit a Spline.

Method Table#

Name

Description

onSelectionChangeHandler (self)

Callback method when selected cells changed.

onValueChangeHandler (self, row, col)

Acts when a user changes a value in one the fields.

setSpline (self, spline)

Sets the tables cell values from the spline values.

Example

from hwx.gui import SplineEditor as se
splineEditor = se.SplineEditor()
splineTable = se.SplineTable(splineEditor)
show(splineTable)
setSpline(spline)#

Sets the tables cell values from the spline values.

It gets called from the SplineEditor when the spline changes.

Parameters:

spline (Spline) – A spline containing x/y values to be set.

onValueChangeHandler(row, col)#

Acts when a user changes a value in one the fields.

If the value is valid, it updates the data model, else it resets to pre-changed value.

Parameters:
  • row (int) – The row index of the table.

  • col (int) – The column index of the table.

onSelectionChangeHandler()#

Callback method when selected cells changed.