コード例 #1
0
 def moveend(self, ev):
     """
     Called a dragging motion ends.Get slicer event
     """
     self.base.thaw_axes()
     ## Post parameters
     event = SlicerParameterEvent()
     event.type = self.__class__.__name__
     event.params = self.get_params()
     ## Send slicer paramers to plotter2D
     wx.PostEvent(self.base, event)
コード例 #2
0
ファイル: SectorSlicer.py プロジェクト: diffpy/srfit-sasview
 def moveend(self, ev):
     """
     Called a dragging motion ends.Get slicer event
     """
     self.base.thaw_axes()
     ## Post parameters
     event = SlicerParameterEvent()
     event.type = self.__class__.__name__
     event.params = self.get_params()
     ## Send slicer paramers to plotter2D
     wx.PostEvent(self.base, event)
コード例 #3
0
ファイル: Arc.py プロジェクト: diffpy/srfit-sasview
    def moveend(self, ev):
        """
            After a dragging motion reset the flag self.has_move to False
            :param ev: event
        """
        self.has_move = False

        event = SlicerParameterEvent()
        event.type = self.__class__.__name__
        event.params = self.get_params()
        self.base.moveend(ev)
コード例 #4
0
    def moveend(self, ev):
        """
            After a dragging motion reset the flag self.has_move to False
            :param ev: event
        """
        self.has_move = False

        event = SlicerParameterEvent()
        event.type = self.__class__.__name__
        event.params = self.get_params()
        self.base.moveend(ev)
コード例 #5
0
ファイル: AnnulusSlicer.py プロジェクト: diffpy/srfit-sasview
 def moveend(self, ev):
     """
     Called when any dragging motion ends.
     Post an event (type =SlicerParameterEvent)
     to plotter 2D with a copy  slicer parameters
     Call  _post_data method
     """
     self.base.thaw_axes()
     # Post parameters to plotter 2D
     event = SlicerParameterEvent()
     event.type = self.__class__.__name__
     event.params = self.get_params()
     wx.PostEvent(self.base, event)
コード例 #6
0
ファイル: boxSlicer.py プロジェクト: mcbeaker/sasview
 def moveend(self, ev):
     """
     Called after a dragging event.
     Post the slicer new parameters and creates a new Data1D
     corresponding to the new average
     """
     self.base.thaw_axes()
     # Post paramters
     event = SlicerParameterEvent()
     event.type = self.__class__.__name__
     event.params = self.get_params()
     wx.PostEvent(self.base.parent, event)
     # create the new data1D
     self._post_data()
コード例 #7
0
ファイル: boxSlicer.py プロジェクト: diffpy/srfit-sasview
 def moveend(self, ev):
     """
     Called after a dragging event.
     Post the slicer new parameters and creates a new Data1D
     corresponding to the new average
     """
     self.base.thaw_axes()
     # Post paramters
     event = SlicerParameterEvent()
     event.type = self.__class__.__name__
     event.params = self.get_params()
     wx.PostEvent(self.base.parent, event)
     # create the new data1D
     self._post_data()
コード例 #8
0
    def onTextEnter(self, evt):
        """
        Parameters have changed
        """
        params = {}
        has_error = False
        for item in self.parameters:
            try:
                params[item[0]] = float(item[1].GetValue())
                item[1].SetBackgroundColour(
                    wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
                item[1].Refresh()
            except:
                has_error = True
                item[1].SetBackgroundColour("pink")
                item[1].Refresh()

        if has_error == False:
            # Post parameter event
            ##parent hier is plotter2D
            event = SlicerParameterEvent(type=self.type, params=params)
            wx.PostEvent(self.parent, event)