Exemplo n.º 1
0
 def __init__(self, parent, image_item: ChannelImageItem):
     ViewBox.__init__(self,
                      parent,
                      border=mkPen("d", width=1),
                      lockAspect=True,
                      name=image_item.channel.metal,
                      invertY=True)
     self.addItem(image_item, ignoreBounds=False)
Exemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        BaseConfigurableClass.__init__(self)
        ViewBox.__init__(self, *args, **kwargs)

        self.registerConfigProperty(self.getCurves, self.setCurves, 'Y2Curves')
        self.registerConfigProperty(self._getState, self.setState, 'viewState')
        self._isAttached = False
        self.plotItem = None
        self._curvesModelNames = []
Exemplo n.º 3
0
    def __init__(self, *args, **kwargs):
        self._isAttached = False
        self.plotItem = None
        name = kwargs.pop("name", "Y2 ViewBox")
        BaseConfigurableClass.__init__(self)
        ViewBox.__init__(self, *args, name=name, **kwargs)

        self.registerConfigProperty(self._getCurvesNames,
                                    self._addCurvesByName, "Y2Curves")
        self.registerConfigProperty(self._getState, self.setState, "viewState")
Exemplo n.º 4
0
    def __init__(self, *args, **kwargs):
        # Initialize the superclass
        ViewBox.__init__(self, *args, **kwargs)

        # Create a scale box
        self.scaleBox = DraggableScaleBox()
        self.scaleBox.hide()
        self.addItem(self.scaleBox, ignoreBounds=True)
        # And disable the one from PyQtGraph
        self.removeItem(self.rbScaleBox)

        # The mouse mode is not used, since we override what left clicking does anyway
        removeMenuItems = ('Mouse Mode', )
        for menuItem in removeMenuItems:
            actions = self.menu.actions()
            for action in actions:
                if action.text() == menuItem:
                    self.menu.removeAction(action)

        # Extra menu actions
        self.makeTracesDifferentAction = QtGui.QAction("Make All Traces Different", self.menu)
        self.makeTracesDifferentAction.triggered.connect(self.makeTracesDifferent)