Argument

Classes defining individual arguments as Qt elements.

Arg

class qtap.argument.Arg(name: str, typ: type, val: Union[int, float, str, bool], parent: PyQt5.QtWidgets.QWidget, vlayout: PyQt5.QtWidgets.QVBoxLayout, tooltip: Optional[str] = None, **kwargs)[source]
__init__(name: str, typ: type, val: Union[int, float, str, bool], parent: PyQt5.QtWidgets.QWidget, vlayout: PyQt5.QtWidgets.QVBoxLayout, tooltip: Optional[str] = None, **kwargs)[source]

Creates the appropriate QWidget interface.

Parameters:
  • name (str) – argument name
  • typ (type) – function type, one of int, float, str or bool. Used for determining the correct QWidget to be used
  • val (Union[int, float, str, bool]) – default value for the widget
  • parent (QtWidgets.QWidget) – parent widget
  • vlayout (QtWidgets.QVBoxLayout) – parent VBoxLayout
  • tooltip (str) – toolTip
sig_changed

emits self.val when GUI value is changed.

Type:object
name

argument name

val

current argument value

ArgNumeric

class qtap.argument.ArgNumeric(name: str, typ: type, val: Union[int, float], parent: PyQt5.QtWidgets.QWidget, vlayout: PyQt5.QtWidgets.QVBoxLayout, minmax: tuple = (-1, 999), step: Union[int, float] = 1, use_slider: bool = False, suffix: str = None, **kwargs)[source]

Bases: qtap.argument.Arg

__init__(name: str, typ: type, val: Union[int, float], parent: PyQt5.QtWidgets.QWidget, vlayout: PyQt5.QtWidgets.QVBoxLayout, minmax: tuple = (-1, 999), step: Union[int, float] = 1, use_slider: bool = False, suffix: str = None, **kwargs)[source]

Creates numerical QWidget interface

Parameters:
  • minmax (tuple) – min & max values
  • step (Union[int, float]) – step size for the spin box
  • use_slider (Optional[bool]) – adds a slider below the spin box
  • suffix (Optional[str]) – text suffix for the spin box, like data units
  • **kwargs – passed to Arg
max

max value limit for the widget

min

min value limit for the widget

minmax

minmax limits for the widget

name

argument name

step

step size for the widget

val

current argument value