View Issue Details

IDProjectCategoryView StatusLast Update
0000109FreeCADFeaturepublic2010-06-21 08:53
ReporterJriegelAssigned Towmayer  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.10 
Summary0000109: wait coursor for open operation via python module
DescriptionI integrate at the moment a long running python script for IDF import.
Registered as python file ending handler to App.

Would be good a wait cursor would be activated till the open operation.
TagsNo tags attached.
FreeCAD Information

Activities

Jriegel

2010-06-19 04:59

administrator   ~0000247

since you don't like my fixes anyway, you can do it right by your self....

wmayer

2010-06-21 08:53

administrator   ~0000251

Use class FreeCAD.Base.ProgressIndicator

start:
Expects two parameters string (status text) and int (number of steps)

next:
One optional boolean argument. If this is True it is possible to abort a pending operation with ESC

stop:
Stops the current indicator. This method can be omitted but must be called before a second call of start()

Note:
When experimenting with this class in the GUI python console the application doesn't accept any further input. To leave this mode CTRL+ALT+ESC must be pressed.

Example:
import time

def test():
    s=App.Base.ProgressIndicator()
    s.start("www",100)
    for i in range(101):
        import time
        time.sleep(0.05)
        s.next(True)
    #s.stop()

test()

Issue History

Date Modified Username Field Change
2010-06-19 04:58 Jriegel New Issue
2010-06-19 04:58 Jriegel Status new => assigned
2010-06-19 04:58 Jriegel Assigned To => wmayer
2010-06-19 04:59 Jriegel Note Added: 0000247
2010-06-21 08:53 wmayer Note Added: 0000251
2010-06-21 08:53 wmayer Status assigned => closed
2010-06-21 08:53 wmayer Resolution open => fixed