Curve (hwx.gui)

A curved line.

Public Methods

addSlider (self, **kwds)

clearMemoryCurve (self)

decorateEnabled (self, enabled)

delete (self)

getNextUnusedColor (self)

getTheClosestPoint (self, x, y)

hover (self)

pick (self, event)

setHovered (self, points, showText=False, event=None)

setMemoryCurve (self)

setSelected (self, points, showText=False, event=None)

unhover (self)

Method Details

addSlider(self, **kwds)

Adds a curve slider.

clearMemoryCurve(self)

Clears original curve.

decorateEnabled(self, enabled)

the plot was enabled or disabled, set the color.

delete(self)

Removes this curve from the plot.

getNextUnusedColor(self)

Gets next unused color.

getTheClosestPoint(self, x, y)

Gets the closest CurvePoint for the specified x and y.

param x

Specified x value.

type x

float

param y

Specified y value.

type y

float

returns

The closest CurvePoint.

rtype

CurvePoint

hover(self)

When the line is hovered.

pick(self, event)

When the line is picked from the plot this method gets called

param event

The mouse event when clicked on the line

type event

MouseEvent

returns

A reference to the instance Line object on which it was called or None

rtype

Line

setHovered(self, points, showText=False, event=None)

Sets the curve points hovered.

param points

The list of points to be set hovered.

type points

list[Point]

param showText

Determines whether to show hovered text.

type showText

bool

param event

MouseEvent to capture the hover.

type event

MouseEvent

setMemoryCurve(self)

Shows original curve when dragging.

setSelected(self, points, showText=False, event=None)

Sets the curve points selected.

param points

The list of points to be set selected.

type points

list[Point]

param showText

Determines whether to show selected text.

type showText

bool

param event

MouseEvent to. capture the selection.

type event

MouseEvent

unhover(self)

When the line is not hovered.