facebook360_dep
Facebook360 Depth Estimation Pipeline
Public Member Functions | Public Attributes | List of all members
slider_image_thresholds.SliderWidget Class Reference
Inheritance diagram for slider_image_thresholds.SliderWidget:

Public Member Functions

def __init__ (self, type, attr, qt_label_name, printed_name, qt_slider, qt_label, max, default, parent=None)
 
def setup (self, callback)
 
def hide (self)
 
def set_name (self, text)
 
def set_label (self, text, notation="{}")
 
def get_label_text (self)
 
def set_slider (self, val)
 
def set_slider_and_label (self, val)
 
def slider_to_val (self, slider_val)
 
def val_to_slider (self, val)
 

Public Attributes

 type
 
 attr
 
 name
 
 printed_name
 
 hs
 
 label
 
 max
 
 default
 
 count
 

Detailed Description

Slider class for interacting with the threshold displays.

Attributes:
    attr (class.attribute): Attribute being controlled by the slider.
    count (int): Discrete number of steps in the range.
    default (float): Starting value.
    hs (QtWidgets.QSlider): UI element tied to the widget.
    label (str): Label displayed next to the slider.
    max (float): Maximum of the slider value range.
    name (str): Internal name of the slider object.
    printed_name (str): Displayed slider name.
    type (Union[ColorVariance, ForegroundMask]): Which threshold app to interact with.

Constructor & Destructor Documentation

◆ __init__()

def slider_image_thresholds.SliderWidget.__init__ (   self,
  type,
  attr,
  qt_label_name,
  printed_name,
  qt_slider,
  qt_label,
  max,
  default,
  parent = None 
)
Initializes slider class for interacting with the threshold displays.

Args:
    type (Union[ColorVariance, ForegroundMask]): Which threshold app to interact with.
    attr (class.attribute): Attribute being controlled by the slider.
    qt_label_name (str): Internal name of the slider object.
    printed_name (str): Displayed slider name.
    qt_slider (QtWidgets.QSlider): UI element tied to the widget.
    qt_label (str): Label displayed next to the slider.
    max (float): Maximum of the slider value range.
    default (float): Starting value.
    parent (App(QDialog), optional): Object corresponding to the parent UI element.

Member Function Documentation

◆ get_label_text()

def slider_image_thresholds.SliderWidget.get_label_text (   self)
Finds the label of the slider.

Returns:
    str: Label of the slider.

◆ hide()

def slider_image_thresholds.SliderWidget.hide (   self)
Hides the slider.

◆ set_label()

def slider_image_thresholds.SliderWidget.set_label (   self,
  text,
  notation = "{}" 
)
Sets the label of the slider.

Args:
    text (str): Label of the slider.
    notation (str, optional): Formatted notation for the display.

◆ set_name()

def slider_image_thresholds.SliderWidget.set_name (   self,
  text 
)
Sets the name of the slider.

Args:
    text (str): Name of the slider.

◆ set_slider()

def slider_image_thresholds.SliderWidget.set_slider (   self,
  val 
)
Updates the slider value.

Args:
    val (float): Value corresponding to an attribute.

◆ set_slider_and_label()

def slider_image_thresholds.SliderWidget.set_slider_and_label (   self,
  val 
)
Updates the slider value and adjust its text.

Args:
    val (float): Value corresponding to an attribute.

Returns:
    float: Value set to the slider.

◆ setup()

def slider_image_thresholds.SliderWidget.setup (   self,
  callback 
)
Sets up the slider class with default values and a changed value event.

Args:
    callback (func : float -> float): Callback associated with updating value.

◆ slider_to_val()

def slider_image_thresholds.SliderWidget.slider_to_val (   self,
  slider_val 
)
Converts from a slider value to the corresponding attribute value.

Args:
    slider_val (float): Value corresponding to the slider.

Returns:
    float: Value corresponding to the attribute.

◆ val_to_slider()

def slider_image_thresholds.SliderWidget.val_to_slider (   self,
  val 
)
Converts from an attribute value to the corresponding value in the slider.

Args:
    val (float): Value corresponding to the attribute.

Returns:
    float: Value corresponding to the slider.

Member Data Documentation

◆ attr

slider_image_thresholds.SliderWidget.attr

◆ count

slider_image_thresholds.SliderWidget.count

◆ default

slider_image_thresholds.SliderWidget.default

◆ hs

slider_image_thresholds.SliderWidget.hs

◆ label

slider_image_thresholds.SliderWidget.label

◆ max

slider_image_thresholds.SliderWidget.max

◆ name

slider_image_thresholds.SliderWidget.name

◆ printed_name

slider_image_thresholds.SliderWidget.printed_name

◆ type

slider_image_thresholds.SliderWidget.type

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