Changeset 858f2ae5 in sasview
- Timestamp:
- Feb 20, 2009 10:59:13 AM (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:
- 33afff7
- Parents:
- 4937983
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/model_thread.py
ref628a1 r858f2ae5 143 143 lx = len(self.x) 144 144 wx.PostEvent(self.parent, StatusEvent(status=\ 145 "Computing ",curr_thread=self,type=" update"))145 "Computing ",curr_thread=self,type="progress")) 146 146 for i_x in range(len(self.x)): 147 147 # Check whether we need to bail out -
guiframe/statusbar.py
r282a3e7 r858f2ae5 17 17 self.progress = 0 # Current progress value of the bar 18 18 self.timer = wx.Timer(self,-1) 19 self.timer_stop = wx.Timer(self,-1) 19 20 self.thread= None 20 21 self.Bind(wx.EVT_TIMER,self.OnTimer, self.timer) 22 self.Bind(wx.EVT_TIMER,self.OnTimer_stop, self.timer_stop) 23 self.count=0 21 24 25 def OnTimer_stop(self, evt): 26 """Update the progress bar while the timer is running 27 @param evt: wx.EVT_TIMER 28 29 """ 30 self.count +=1 31 if self.count ==20: 32 self.timer_stop.Stop() 33 self.gauge.Hide() 34 self.count=0 22 35 def OnTimer(self, evt): 23 36 """Update the progress bar while the timer is running … … 26 39 """ 27 40 # Check stop flag that can be set from non main thread 28 self.gauge.Pulse() 41 if self.timer.IsRunning(): 42 self.gauge.Pulse() 43 29 44 30 45 def set_progress(self): … … 96 111 self.progress =0 97 112 self.gauge.SetValue(90) 98 113 self.timer_stop.Start(3) 99 114 100 115
Note: See TracChangeset
for help on using the changeset viewer.