RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
gui.float_edit.FloatEdit Class Reference

Widget for editing 32-bit and 64-bit floating-point values. More...

Inheritance diagram for gui.float_edit.FloatEdit:

Public Member Functions

 __init__ (self, parent=None, *args, **kwargs)
 Initialise the FloatEdit widget.
 
 get_value (self)
 Getter for the value property will return the edited floating-point value.
 
 set_value (self, float value)
 Setter for the value property.
 
 get_minimum (self)
 Getter returns the minimum (inclusive) floating-point value allowed.
 
 set_minimum (self, float value)
 Setter for the minimum (inclusive) floating-point value allowed.
 
 get_maximum (self)
 Getter returns the maximum (inclusive) floating-point value allowed.
 
 set_maximum (self, float value)
 Setter for the maximum (inclusive) floating-point value allowed.
 
 set_range (self, float minimum=None, float maximum=None, type=None)
 Set the minimum and maximum range allowed for the floating-point value.
 

Static Public Attributes

 value_changed = Signal()
 This signal is emitted whenever the value property changes.
 
 commit_data = Signal(QWidget)
 This signal is emitted whenever the user has made modifications to the data using this edit widget that should be committed.
 
 value
 
 minimum
 
 maximum
 

Protected Member Functions

 _editing_finished (self)
 
 _text_changed (self, text)
 

Protected Attributes

 _type = None
 
 _validator = FloatingPointValidator(parent=self)
 
 _editing_finished
 
 _text_changed
 

Detailed Description

Widget for editing 32-bit and 64-bit floating-point values.

Constructor & Destructor Documentation

◆ __init__()

gui.float_edit.FloatEdit.__init__ ( self,
parent = None,
* args,
** kwargs )

Initialise the FloatEdit widget.

Parameters
parentThe optional parent Qt widget object.
argsAdditional positional arguments passed onto the base class.
kwargsAdditional keyword arguments passed onto the base class.

Member Function Documentation

◆ _editing_finished()

gui.float_edit.FloatEdit._editing_finished ( self)
protected

◆ _text_changed()

gui.float_edit.FloatEdit._text_changed ( self,
text )
protected

◆ get_maximum()

gui.float_edit.FloatEdit.get_maximum ( self)

Getter returns the maximum (inclusive) floating-point value allowed.

◆ get_minimum()

gui.float_edit.FloatEdit.get_minimum ( self)

Getter returns the minimum (inclusive) floating-point value allowed.

◆ get_value()

gui.float_edit.FloatEdit.get_value ( self)

Getter for the value property will return the edited floating-point value.

◆ set_maximum()

gui.float_edit.FloatEdit.set_maximum ( self,
float value )

Setter for the maximum (inclusive) floating-point value allowed.

Note that infinities are accepted irrespective of the maximum.

Parameters
valueThe new maximum value allowed.

◆ set_minimum()

gui.float_edit.FloatEdit.set_minimum ( self,
float value )

Setter for the minimum (inclusive) floating-point value allowed.

Note that negative infinities are accepted irrespective of the minimum.

Parameters
valueThe new minimum value allowed.

◆ set_range()

gui.float_edit.FloatEdit.set_range ( self,
float minimum = None,
float maximum = None,
type = None )

Set the minimum and maximum range allowed for the floating-point value.

The range as [minimum, maximum] should either be provided explicitly as arguments, or the type argument should be provided instead, from which the range will be derived.

Parameters
minimumThe minimum (inclusive) value allowed.
maximumThe maximum (inclusive) value allowed.
typeAlternative type (RtcFloat or RtcDouble) from which to derive the minimum/maximum.

◆ set_value()

gui.float_edit.FloatEdit.set_value ( self,
float value )

Setter for the value property.

If the set_range was used with a type argument, e.g. RtcFloat, this method will attempts to round the value appropriately using Numpy when converting to a string representation.

Parameters
valueThe new value to be edited by this widget.

Member Data Documentation

◆ _editing_finished

gui.float_edit.FloatEdit._editing_finished
protected

◆ _text_changed

gui.float_edit.FloatEdit._text_changed
protected

◆ _type

gui.float_edit.FloatEdit._type = None
protected

◆ _validator

gui.float_edit.FloatEdit._validator = FloatingPointValidator(parent=self)
protected

◆ commit_data

gui.float_edit.FloatEdit.commit_data = Signal(QWidget)
static

This signal is emitted whenever the user has made modifications to the data using this edit widget that should be committed.

◆ maximum

gui.float_edit.FloatEdit.maximum
static
Initial value:
= Property(
type=float,
fget=get_maximum,
fset=set_maximum,
doc="The maximum value allowed for the floating-point value.",
)

◆ minimum

gui.float_edit.FloatEdit.minimum
static
Initial value:
= Property(
type=float,
fget=get_minimum,
fset=set_minimum,
doc="The minimum value allowed for the floating-point value.",
)

◆ value

gui.float_edit.FloatEdit.value
static
Initial value:
= Property(
type=float,
fget=get_value,
fset=set_value,
user=True,
notify=value_changed,
doc="The floating-point value being edited by this widget.",
)

◆ value_changed

gui.float_edit.FloatEdit.value_changed = Signal()
static

This signal is emitted whenever the value property changes.


The documentation for this class was generated from the following file: