diff options
Diffstat (limited to 'jfr_playoff/gui')
-rw-r--r-- | jfr_playoff/gui/__init__.py | 34 | ||||
-rw-r--r-- | jfr_playoff/gui/icons/log.gif | bin | 0 -> 1014 bytes | |||
-rw-r--r-- | jfr_playoff/gui/icons/run-once.gif | bin | 0 -> 189 bytes | |||
-rw-r--r-- | jfr_playoff/gui/icons/run-timed.gif | bin | 0 -> 567 bytes |
4 files changed, 33 insertions, 1 deletions
diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py index 09d9c98..a0dedc9 100644 --- a/jfr_playoff/gui/__init__.py +++ b/jfr_playoff/gui/__init__.py @@ -10,7 +10,8 @@ import tkMessageBox as tkmb from .tabs import * from .icons import GuiImage -from .frames import LabelButton +from .frames import LabelButton, NumericSpinbox +from .variables import NumericVar class PlayoffGUI(tk.Tk): def __init__(self): @@ -84,6 +85,28 @@ class PlayoffGUI(tk.Tk): menu, image=GuiImage.get_icon(icon), command=command, tooltip=tooltip, label=statusBar) self.menuButtons[icon].pack(side=tk.LEFT) + (ttk.Separator(menu, orient=tk.VERTICAL)).pack( + side=tk.LEFT, fill=tk.Y, padx=3, pady=1) + for icon, command, tooltip in [ + ('run-once', self.onRunOnce, 'Wygeneruj'), + ('run-timed', self.onRunTimed, 'Generuj co X sekund')]: + self.menuButtons[icon] = LabelButton( + menu, image=GuiImage.get_icon(icon), command=command, + tooltip=tooltip, label=statusBar) + self.menuButtons[icon].pack(side=tk.LEFT) + self.interval = NumericVar() + self.intervalField = NumericSpinbox( + menu, width=5, + textvariable=self.interval, from_=30, to=3600) + self.intervalField.pack(side=tk.LEFT) + (ttk.Label(menu, text='sekund')).pack(side=tk.LEFT) + for icon, command, tooltip in [ + ('log', self.onLogWindowOpen, 'Dziennik komunikatów')]: + self.menuButtons[icon] = LabelButton( + menu, image=GuiImage.get_icon(icon), command=command, + tooltip=tooltip, label=statusBar) + self.menuButtons[icon].pack(side=tk.LEFT) + def onNewFile(self): self._checkSave() @@ -114,6 +137,15 @@ class PlayoffGUI(tk.Tk): filename = filename + '.jtpo' self.saveFile(filename) + def onRunOnce(self): + pass + + def onRunTimed(self): + pass + + def onLogWindowOpen(self): + pass + def newFile(self): self._filepath = None self.newFileIndex += 1 diff --git a/jfr_playoff/gui/icons/log.gif b/jfr_playoff/gui/icons/log.gif Binary files differnew file mode 100644 index 0000000..7915311 --- /dev/null +++ b/jfr_playoff/gui/icons/log.gif diff --git a/jfr_playoff/gui/icons/run-once.gif b/jfr_playoff/gui/icons/run-once.gif Binary files differnew file mode 100644 index 0000000..842afd8 --- /dev/null +++ b/jfr_playoff/gui/icons/run-once.gif diff --git a/jfr_playoff/gui/icons/run-timed.gif b/jfr_playoff/gui/icons/run-timed.gif Binary files differnew file mode 100644 index 0000000..1b8340e --- /dev/null +++ b/jfr_playoff/gui/icons/run-timed.gif |