PySDM_examples.utils.widgets.progbar_updater

1class ProgbarUpdater:
2    def __init__(self, progbar, max_steps):
3        self.max_steps = max_steps
4        self.steps = 0
5        self.progbar = progbar
6
7    def notify(self):
8        self.steps += 1
9        self.progbar.value = 100 * (self.steps / self.max_steps)
class ProgbarUpdater:
 2class ProgbarUpdater:
 3    def __init__(self, progbar, max_steps):
 4        self.max_steps = max_steps
 5        self.steps = 0
 6        self.progbar = progbar
 7
 8    def notify(self):
 9        self.steps += 1
10        self.progbar.value = 100 * (self.steps / self.max_steps)
ProgbarUpdater(progbar, max_steps)
3    def __init__(self, progbar, max_steps):
4        self.max_steps = max_steps
5        self.steps = 0
6        self.progbar = progbar
max_steps
steps
progbar
def notify(self):
 8    def notify(self):
 9        self.steps += 1
10        self.progbar.value = 100 * (self.steps / self.max_steps)