taurus_pyqtgraph/curveproperties.py
def showProperties(self, prop=None):
        """Updates the dialog to show the given properties.

        :param prop: (CurveAppearanceProperties) the properties object
                     containing what should be shown. If a given property is
                     set to CONFLICT, the corresponding plot_item will show a
                     "neutral" display
        """

        if prop is None:
            prop = self._shownProp
        # set the Style comboboxes
        self.sStyleCB.setCurrentIndex(
            self.sStyleCB.findText(NamedSymbolStyles[prop.sStyle])
        )
        self.lStyleCB.setCurrentIndex(
            self.lStyleCB.findText(NamedLineStyles[prop.lStyle])
        )
        self.cStyleCB.setCurrentIndex(
            self.cStyleCB.findText(NamedCurveStyles[prop.cStyle])
        )

        if prop.y2 is CONFLICT:
            self.assignToY1BT.setChecked(False)
            self.assignToY2BT.setChecked(False)
        elif prop.y2:
            self.assignToY2BT.setChecked(True)
        else:
            self.assignToY1BT.setChecked(True)

        # set sSize and lWidth spinboxes. if prop.sSize is None, it puts -1
        # (which is the special value for these switchhboxes)
        if prop.sSize is CONFLICT or prop.sStyle is None:
            self.sSizeSB.setValue(-1)
        else:
            self.sSizeSB.setValue(max(prop.sSize, -1))
        if prop.lWidth is CONFLICT:
            self.lWidthSB.setValue(-1)
        else:
            self.lWidthSB.setValue(max(prop.lWidth, -1))

        # Set the Color combo boxes. The item at index 0 is the empty one in
        # the comboboxes Manage unknown colors by including them
        if prop.sColor in (None, CONFLICT) or prop.sStyle is None:
            index = 0
        else:
            index = self.sColorCB.findData(Qt.QColor(prop.sColor))
        if index == -1:  # if the color is not supported, add it to combobox
            index = self.sColorCB.count()
            self.sColorCB.addItem(
                self._colorIcon(Qt.QColor(prop.sColor)),
                "",
                Qt.QColor(prop.sColor),
            )
        self.sColorCB.setCurrentIndex(index)
        if prop.lColor is None or prop.lColor is CONFLICT:
            index = 0
        else:
            index = self.lColorCB.findData(Qt.QColor(prop.lColor))
        if index == -1:  # if the color is not supported, add it to combobox
            index = self.lColorCB.count()
            self.lColorCB.addItem(
                self._colorIcon(Qt.QColor(prop.lColor)),
                "",
                Qt.QColor(prop.lColor),
            )
        self.lColorCB.setCurrentIndex(index)
        # set the Fill Checkbox. The prop.sFill value can be in 3 states: True,
        # False and None
        if prop.sFill is None or prop.sFill is CONFLICT:
            checkState = Qt.Qt.PartiallyChecked
        elif prop.sFill:
            checkState = Qt.Qt.Checked
        else:
            checkState = Qt.Qt.Unchecked
        self.sFillCB.setCheckState(checkState)
        # set the Area Fill Checkbox. The prop.cFill value can be in 3 states:
        # True, False and None
        if prop.cFill is CONFLICT:
            checkState = Qt.Qt.PartiallyChecked
            self.cAreaDSB.setValue(0.0)
        elif prop.cFill is None:
            checkState = Qt.Qt.Unchecked
            self.cAreaDSB.setValue(0.0)
        else:
            checkState = Qt.Qt.Checked
            self.cAreaDSB.setValue(prop.cFill)
        self.cFillCB.setCheckState(checkState)
Updates the dialog to show the given properties.

        :param prop: (CurveAppearanceProperties) the properties object
                     containing what should be shown. If a given property is
                     set to CONFLICT, the corresponding plot_item will show a
                     "neutral" display
        
Updates the dialog to show the given properties.
Updates the dialog to show the given properties .
def showProperties(self, prop=None):
        if prop is None:
            prop = self._shownProp
        self.sStyleCB.setCurrentIndex(
            self.sStyleCB.findText(NamedSymbolStyles[prop.sStyle])
        )
        self.lStyleCB.setCurrentIndex(
            self.lStyleCB.findText(NamedLineStyles[prop.lStyle])
        )
        self.cStyleCB.setCurrentIndex(
            self.cStyleCB.findText(NamedCurveStyles[prop.cStyle])
        )
        if prop.y2 is CONFLICT:
            self.assignToY1BT.setChecked(False)
            self.assignToY2BT.setChecked(False)
        elif prop.y2:
            self.assignToY2BT.setChecked(True)
        else:
            self.assignToY1BT.setChecked(True)
        if prop.sSize is CONFLICT or prop.sStyle is None:
            self.sSizeSB.setValue(-1)
        else:
            self.sSizeSB.setValue(max(prop.sSize, -1))
        if prop.lWidth is CONFLICT:
            self.lWidthSB.setValue(-1)
        else:
            self.lWidthSB.setValue(max(prop.lWidth, -1))
        if prop.sColor in (None, CONFLICT) or prop.sStyle is None:
            index = 0
        else:
            index = self.sColorCB.findData(Qt.QColor(prop.sColor))
        if index == -1:  
            index = self.sColorCB.count()
            self.sColorCB.addItem(
                self._colorIcon(Qt.QColor(prop.sColor)),
                "",
                Qt.QColor(prop.sColor),
            )
        self.sColorCB.setCurrentIndex(index)
        if prop.lColor is None or prop.lColor is CONFLICT:
            index = 0
        else:
            index = self.lColorCB.findData(Qt.QColor(prop.lColor))
        if index == -1:  
            index = self.lColorCB.count()
            self.lColorCB.addItem(
                self._colorIcon(Qt.QColor(prop.lColor)),
                "",
                Qt.QColor(prop.lColor),
            )
        self.lColorCB.setCurrentIndex(index)
        if prop.sFill is None or prop.sFill is CONFLICT:
            checkState = Qt.Qt.PartiallyChecked
        elif prop.sFill:
            checkState = Qt.Qt.Checked
        else:
            checkState = Qt.Qt.Unchecked
        self.sFillCB.setCheckState(checkState)
        if prop.cFill is CONFLICT:
            checkState = Qt.Qt.PartiallyChecked
            self.cAreaDSB.setValue(0.0)
        elif prop.cFill is None:
            checkState = Qt.Qt.Unchecked
            self.cAreaDSB.setValue(0.0)
        else:
            checkState = Qt.Qt.Checked
            self.cAreaDSB.setValue(prop.cFill)
        self.cFillCB.setCheckState(checkState)
def showProperties ( self , prop = None ) : if prop is None : prop = self . _shownProp self . sStyleCB . setCurrentIndex ( self . sStyleCB . findText ( NamedSymbolStyles [ prop . sStyle ] ) ) self . lStyleCB . setCurrentIndex ( self . lStyleCB . findText ( NamedLineStyles [ prop . lStyle ] ) ) self . cStyleCB . setCurrentIndex ( self . cStyleCB . findText ( NamedCurveStyles [ prop . cStyle ] ) ) if prop . y2 is CONFLICT : self . assignToY1BT . setChecked ( False ) self . assignToY2BT . setChecked ( False ) elif prop . y2 : self . assignToY2BT . setChecked ( True ) else : self . assignToY1BT . setChecked ( True ) if prop . sSize is CONFLICT or prop . sStyle is None : self . sSizeSB . setValue ( - 1 ) else : self . sSizeSB . setValue ( max ( prop . sSize , - 1 ) ) if prop . lWidth is CONFLICT : self . lWidthSB . setValue ( - 1 ) else : self . lWidthSB . setValue ( max ( prop . lWidth , - 1 ) ) if prop . sColor in ( None , CONFLICT ) or prop . sStyle is None : index = 0 else : index = self . sColorCB . findData ( Qt . QColor ( prop . sColor ) ) if index == - 1 : index = self . sColorCB . count ( ) self . sColorCB . addItem ( self . _colorIcon ( Qt . QColor ( prop . sColor ) ) , "" , Qt . QColor ( prop . sColor ) , ) self . sColorCB . setCurrentIndex ( index ) if prop . lColor is None or prop . lColor is CONFLICT : index = 0 else : index = self . lColorCB . findData ( Qt . QColor ( prop . lColor ) ) if index == - 1 : index = self . lColorCB . count ( ) self . lColorCB . addItem ( self . _colorIcon ( Qt . QColor ( prop . lColor ) ) , "" , Qt . QColor ( prop . lColor ) , ) self . lColorCB . setCurrentIndex ( index ) if prop . sFill is None or prop . sFill is CONFLICT : checkState = Qt . Qt . PartiallyChecked elif prop . sFill : checkState = Qt . Qt . Checked else : checkState = Qt . Qt . Unchecked self . sFillCB . setCheckState ( checkState ) if prop . cFill is CONFLICT : checkState = Qt . Qt . PartiallyChecked self . cAreaDSB . setValue ( 0.0 ) elif prop . cFill is None : checkState = Qt . Qt . Unchecked self . cAreaDSB . setValue ( 0.0 ) else : checkState = Qt . Qt . Checked self . cAreaDSB . setValue ( prop . cFill ) self . cFillCB . setCheckState ( checkState )
Updates the dialog to show the given properties.
Updates the dialog to show the given properties .
"""Updates the dialog to show the given properties.

        :param prop: (CurveAppearanceProperties) the properties object
                     containing what should be shown. If a given property is
                     set to CONFLICT, the corresponding plot_item will show a
                     "neutral" display
        """ # set the Style comboboxes # set sSize and lWidth spinboxes. if prop.sSize is None, it puts -1 # (which is the special value for these switchhboxes) # Set the Color combo boxes. The item at index 0 is the empty one in # the comboboxes Manage unknown colors by including them # if the color is not supported, add it to combobox # if the color is not supported, add it to combobox # set the Fill Checkbox. The prop.sFill value can be in 3 states: True, # False and None # set the Area Fill Checkbox. The prop.cFill value can be in 3 states: # True, False and None
self
prop
(CurveAppearanceProperties) the properties object
containing what should be shown. If a given property is
set to CONFLICT, the corresponding plot_item will show a
"neutral" display
( CurveAppearanceProperties ) the properties object containing what should be shown . If a given property is set to CONFLICT the corresponding plot_item will show a " neutral " display