diff options
Diffstat (limited to 'jfr_playoff/gui/__init__.py')
-rw-r--r-- | jfr_playoff/gui/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py index ffd9d00..4b1441b 100644 --- a/jfr_playoff/gui/__init__.py +++ b/jfr_playoff/gui/__init__.py @@ -10,6 +10,7 @@ class PlayoffGUI(tk.Tk): ttk.Style().configure('TLabelframe', padding=5) self.geometry('920x640') self.tabs = {} + self.newFileIndex = 0 def run(self): self.notebook = ttk.Notebook(self) @@ -17,8 +18,21 @@ class PlayoffGUI(tk.Tk): for tab in tabs.__all__: self.tabs[tab] = globals()[tab](self.notebook) self.notebook.add(self.tabs[tab], text=self.tabs[tab].title) + self.newFile() self.mainloop() + def _setValues(self, config): + for tab in self.tabs.values(): + tab.setValues(config) + + def _resetValues(self): + self._setValues({}) + + def newFile(self): + self.newFileIndex += 1 + self.title('Nowa drabinka %d' % (self.newFileIndex)) + self._resetValues() + def getDbConfig(self): return self.tabs['NetworkTab'].getDB() |