added indeterminate progressbar
This commit is contained in:
parent
2862ec871c
commit
c976aabdba
@ -17,7 +17,6 @@ class Controller(object):
|
|||||||
|
|
||||||
if self.count == steps or self.interrupt:
|
if self.count == steps or self.interrupt:
|
||||||
print(self.count)
|
print(self.count)
|
||||||
self.running = False
|
|
||||||
self.finish()
|
self.finish()
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
@ -33,7 +32,10 @@ class Controller(object):
|
|||||||
def set_running(self):
|
def set_running(self):
|
||||||
if not self.interrupt:
|
if not self.interrupt:
|
||||||
self.running = True
|
self.running = True
|
||||||
|
self.app.p_indet.start()
|
||||||
self.app.b.configure(text="Abort", command=self.set_interrupt)
|
self.app.b.configure(text="Abort", command=self.set_interrupt)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
def set_reset(self):
|
def set_reset(self):
|
||||||
self.count = 0
|
self.count = 0
|
||||||
@ -42,6 +44,8 @@ class Controller(object):
|
|||||||
self.app.b.configure(text="Start", command=self.run_process)
|
self.app.b.configure(text="Start", command=self.run_process)
|
||||||
|
|
||||||
def finish(self):
|
def finish(self):
|
||||||
|
self.running = False
|
||||||
|
self.app.p_indet.stop()
|
||||||
print("finished.")
|
print("finished.")
|
||||||
self.app.b.configure(text="Restart", command=self.set_reset)
|
self.app.b.configure(text="Restart", command=self.set_reset)
|
||||||
|
|
||||||
@ -63,6 +67,9 @@ class Application(tk.Tk):
|
|||||||
self.b = ttk.Button(master=self, text="Start", command=self.con.run_process)
|
self.b = ttk.Button(master=self, text="Start", command=self.con.run_process)
|
||||||
self.b.grid(row=1, column=0)
|
self.b.grid(row=1, column=0)
|
||||||
|
|
||||||
|
self.p_indet = ttk.Progressbar(master=self, length="200", maximum=10, mode="indeterminate")
|
||||||
|
self.p_indet.grid(row=2,column=0)
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
# Execution
|
# Execution
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user