88from collections import OrderedDict
99import re
1010import threading
11+ import time
1112
1213try :
1314 import queue
@@ -175,6 +176,8 @@ def setup(self):
175176 hlayout .addWidget (self .currentStatusLabel )
176177 self .layout .addLayout (hlayout )
177178
179+ self .filterStartTime = None
180+
178181 self .progress = qt .QProgressBar ()
179182 self .progress .setRange (0 ,1000 )
180183 self .progress .setValue (0 )
@@ -319,14 +322,16 @@ def onCancelButton(self):
319322
320323
321324 def onLogicEventStart (self ):
325+ self .filterStartTime = time .time ()
322326 self .currentStatusLabel .text = "Running"
323327 self .cancelButton .setDisabled (False )
324328 self .progress .setValue (0 )
325329 self .progress .show ()
326330
327331
328332 def onLogicEventEnd (self ):
329- self .currentStatusLabel .text = "Completed"
333+ elapsedTimeSec = time .time () - self .filterStartTime
334+ self .currentStatusLabel .text = "Completed ({0:3.1f}s)" .format (elapsedTimeSec )
330335 self .progress .setValue (1000 )
331336
332337
@@ -336,7 +341,7 @@ def onLogicEventAbort(self):
336341
337342
338343 def onLogicEventProgress (self , progress ):
339- self .currentStatusLabel .text = "Running ({0:6.5f} )" .format (progress )
344+ self .currentStatusLabel .text = "Running ({0:3.1f}% )" .format (progress * 100.0 )
340345 self .progress .setValue (progress * 1000 )
341346
342347
0 commit comments