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).

keyPressEvent(event)[source]
value_entered

Signal emitted when value is entered (regardless of whether it stayed the same)

value_changed

Signal emitted when value is changed

get_value()[source]

Get current numerical value

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. If interrupt_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).

keyPressEvent(event)[source]
change_limiter(limiter, new_value=None)[source]

Change current numerical limiter

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).

change_formatter(formatter)[source]

Change current numerical formatter

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. See format.FloatFormatter and format.IntegerFormatter for details.

get_cursor_order()[source]

Get a decimal order of the text cursor

set_cursor_order(order)[source]

Move text cursor to a given decimal order

repr_value(value)[source]

Return representation of value according to the current numerical format

value_entered

Signal emitted when value is entered (regardless of whether it stayed the same)

value_changed

Signal emitted when value is changed

get_value()[source]

Get current numerical value

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. If preserve_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. If interrupt_edit==True and the edit is currently being modified by the user, don’t update the display (but still update the internally stored value). If preserve_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.

change_limiter(limiter)[source]

Change current numerical limiter

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).

change_formatter(formatter)[source]

Change current numerical formatter

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. See format.FloatFormatter and format.IntegerFormatter for details.

repr_value(value)[source]

Return representation of value according to the current numerical format

get_value()[source]

Get current numerical value

set_value(value)[source]

Set and display current numerical value

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.

redraw(force=False)[source]

Replot the data.

If force==False, and less than self.redraw_period (10ms by default) passed since the last replot event, do nothing.

class pylablib.core.gui.qt.widgets.plot.MPLFigureToolbarCanvas(parent=None)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Simple widget wrapper for MPL plotting canvas with the toolbar (for plot zooming/panning)

redraw_period

Set redraw period

redraw(force=False)[source]

Replot the data.

If force==False, and less than self.redraw_period (10ms by default) passed since the last replot event, do nothing.

Module contents