pylablib.core.gui.qt.widgets package¶
Submodules¶
pylablib.core.gui.qt.widgets.edit module¶
-
class
pylablib.core.gui.qt.widgets.edit.
LVTextEdit
(parent, value=None)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Expanded text edit.
Maintains internally stored consistent value (which can be, e.g., accessed from different threads).
-
value_entered
¶ Signal emitted when value is entered (regardless of whether it stayed the same)
-
value_changed
¶ Signal emitted when value is changed
-
show_value
(interrupt_edit=False)[source]¶ Display currently stored numerical value
If
interrupt_edit==True
and the edit is currently being modified by the user, don’t update the display.
-
set_value
(value, notify_value_change=True, interrupt_edit=False)[source]¶ Set current numerical value.
If
notify_value_change==True
, emit the value_changed signal; otherwise, change value silently. Ifinterrupt_edit==True
and the edit is currently being modified by the user, don’t update the display (but still update the internally stored value).
-
-
class
pylablib.core.gui.qt.widgets.edit.
LVNumEdit
(parent, value=None, num_limit=None, num_format=None)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Labview-style numerical edit.
Maintains internally stored consistent value (which can be, e.g., accessed from different threads). Supports different number representations, metric perfixes (in input or output), keyboard shortcuts (up/down for changing number, escape for cancelling).
-
set_number_limit
(lower_limit=None, upper_limit=None, action='ignore', value_type=None)[source]¶ Set number limit.
lower_limit and upper_limit set the value limits (
None
means no limit). action specifies the action on out-of-limit: either"ignore"
(return to the previously stored value), or"coerce"
(coerce to the closest limit) value_type can be either"float"
(any floating point number is accepted), or"int"
(round to the nearest integer).
-
set_number_format
(kind='float', *args, **kwargs)[source]¶ Set numerical format
kind specifies the format kind (
"float"
or"int"
), and the additional arguments are passed to the corresponding formatter. Seeformat.FloatFormatter
andformat.IntegerFormatter
for details.
-
value_entered
¶ Signal emitted when value is entered (regardless of whether it stayed the same)
-
value_changed
¶ Signal emitted when value is changed
-
show_value
(interrupt_edit=False, preserve_cursor_order=True)[source]¶ Display currently stored numerical value
If
interrupt_edit==True
and the edit is currently being modified by the user, don’t update the display. Ifpreserve_cursor_order==True
and the display value is being edited, keep the decimal order of the cursor position after change.
-
set_value
(value, notify_value_change=True, interrupt_edit=False, preserve_cursor_order=True)[source]¶ Set and display current numerical value.
If
notify_value_change==True
, emit the value_changed signal; otherwise, change value silently. Ifinterrupt_edit==True
and the edit is currently being modified by the user, don’t update the display (but still update the internally stored value). Ifpreserve_cursor_order==True
and the display value is being edited, keep the decimal order of the cursor position after change.
-
pylablib.core.gui.qt.widgets.label module¶
-
class
pylablib.core.gui.qt.widgets.label.
LVNumLabel
(parent, value=None, num_limit=None, num_format=None, allow_text=True)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Labview-style numerical label.
Supports different number representations and metric perfixes.
-
set_number_limit
(lower_limit=None, upper_limit=None, action='ignore', value_type=None)[source]¶ Set number limit.
lower_limit and upper_limit set the value limits (
None
means no limit). action specifies the action on out-of-limit: either"ignore"
(return to the previously stored value), or"coerce"
(coerce to the closest limit) value_type can be either"float"
(any floating point number is accepted), or"int"
(round to the nearest integer).
-
set_number_format
(kind='float', *args, **kwargs)[source]¶ Set numerical format
kind specifies the format kind (
"float"
or"int"
), and the additional arguments are passed to the corresponding formatter. Seeformat.FloatFormatter
andformat.IntegerFormatter
for details.
-
pylablib.core.gui.qt.widgets.plot module¶
-
class
pylablib.core.gui.qt.widgets.plot.
MPLFigureCanvas
(parent=None)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Simple widget wrapper for MPL plotting canvas.