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)
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)
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)
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()
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)