Changeset ef628a1 in sasview
- Timestamp:
- Feb 17, 2009 12:13:12 PM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 202a7dc3
- Parents:
- f343069
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/model_thread.py
rdd66fbd ref628a1 110 110 self.model = model 111 111 self.starttime = 0 112 112 wx.PostEvent(self.parent, StatusEvent(status=\ 113 "Start Drawing model ",curr_thread=self,type="start")) 113 114 114 115 def isquit(self): … … 122 123 raise KeyboardInterrupt 123 124 124 def update(self, output=None , time=None):125 def update(self, output=None): 125 126 126 127 wx.PostEvent(self.parent, StatusEvent(status="Plot \ 127 #updating ... %g sec" % time,curr_thread=self,type="update"))128 #updating ... ",curr_thread=self,type="update")) 128 129 129 130 … … 138 139 139 140 self.starttime = time.time() 140 print "model_thread" 141 142 143 lx = len(self.x) 141 144 wx.PostEvent(self.parent, StatusEvent(status=\ 142 "Start Drawing model %g " % (self.starttime))) 143 lx = len(self.x) 144 145 "Computing ",curr_thread=self,type="update")) 145 146 for i_x in range(len(self.x)): 146 147 # Check whether we need to bail out 147 self.update(output=output , time=time.time())148 self.update(output=output ) 148 149 self.isquit() 149 150 -
guiframe/statusbar.py
rdd66fbd ref628a1 15 15 self.timer = wx.Timer(self,-1) 16 16 self.thread= None 17 #self.Bind(wx.EVT_TIMER,self.OnTimer, self.timer)17 self.Bind(wx.EVT_TIMER,self.OnTimer, self.timer) 18 18 19 19 def OnTimer(self, evt): … … 23 23 """ 24 24 # Check stop flag that can be set from non main thread 25 if self.thread!=None and self.thread.isrunning(): 26 self.set_progress() 25 self.gauge.Pulse() 27 26 28 27 def set_progress(self): … … 64 63 self.gauge.Show(True) 65 64 if type.lower()=="start": 65 self.timer.Stop() 66 66 self.SetStatusText( str(msg), 0) 67 self.progress +=10 68 self.gauge.SetValue(int(self.progress)) 67 69 #self.timer.Start(1000) 68 70 #print "went here" … … 71 73 if self.progress < self.gauge.GetRange()-20: 72 74 self.gauge.SetValue(int(self.progress)) 75 if type.lower()=="progress": 76 self.timer.Start(100) 77 self.SetStatusText( str(msg), 0) 78 self.gauge.Pulse() 79 print "in progress" 80 73 81 if type.lower()=="update": 74 82
Note: See TracChangeset
for help on using the changeset viewer.