From 4118d545dc5d1a9a4f7a6ecfb6e7b5130429d7a6 Mon Sep 17 00:00:00 2001 From: noko1024 Date: Sun, 24 Dec 2023 04:29:12 +0900 Subject: [PATCH 1/3] =?UTF-8?q?GUI=E9=96=A2=E9=80=A3=E3=81=AE=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=83=96=E3=83=A9=E3=83=AA=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b89951f..2e2b112 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,8 @@ python-rtmidi = "^1.5.8" timecode = "^1.3.1" questionary = "^2.0.1" mpv = "^1.0.5" +customtkinter = "^5.2.1" +ttkwidgets = "^0.13.0" [build-system] From 859cc9f1cc53cbcb8aa183434a3e1ec7a9e25d17 Mon Sep 17 00:00:00 2001 From: noko1024 Date: Sun, 24 Dec 2023 20:49:10 +0900 Subject: [PATCH 2/3] =?UTF-8?q?GUI=E7=94=A8=E3=81=AEclass=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mtcsync/gui/liveShowGUI.py | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 mtcsync/gui/liveShowGUI.py diff --git a/mtcsync/gui/liveShowGUI.py b/mtcsync/gui/liveShowGUI.py new file mode 100644 index 0000000..94c3030 --- /dev/null +++ b/mtcsync/gui/liveShowGUI.py @@ -0,0 +1,55 @@ +import customtkinter + +class MyCheckboxFrame(customtkinter.CTkFrame): + def __init__(self, master): + super().__init__(master) + + self.checkbox_1 = customtkinter.CTkCheckBox(self, text="checkbox 1") + self.checkbox_1.grid(row=0, column=0, padx=10, pady=(10, 0), sticky="w") + self.checkbox_2 = customtkinter.CTkCheckBox(self, text="checkbox 2") + self.checkbox_2.grid(row=1, column=0, padx=10, pady=(10, 0), sticky="w") + +class LiveClockFrame(customtkinter.CTkFrame): + def __init__(self, master): + super().__init__(master) + + self.liveMasterClock = customtkinter.CTkLabel(self, text="00:00:00", font=("Helvetica", 20)) + +class App(customtkinter.CTk): + def __init__(self): + super().__init__() + + self.title("Midi Time Code Sync") + self.minsize(400, 180) + self.geometry("400x180") + self.grid_columnconfigure(3, weight=1) + self.grid_rowconfigure(4, weight=1) + + #self.checkbox_frame = MyCheckboxFrame(self) + #self.checkbox_frame.grid(row=0, column=0, padx=0, pady=(10, 0), sticky="nsw") + + + #self.live_clock_frame = LiveClockFrame(self) + #self.live_clock_frame.grid(row=0, column=0, padx=10, pady=(10, 0)) + #self.live_clock_frame2 = LiveClockFrame(self) + #self.live_clock_frame.grid(row=1, column=0, padx=10, pady=(10, 0)) + #self.live_clock_frame2 = LiveClockFrame(self) + #self.live_clock_frame.grid(row=2, column=0, padx=10, pady=(10, 0)) + #self.live_clock_frame3 = LiveClockFrame(self) + #self.live_clock_frame3.grid(row=3, column=0, padx=10, pady=(10, 0)) + #self.live_clock_frame4 = LiveClockFrame(self) + #self.live_clock_frame4.grid(row=0, column=4, padx=10, pady=(10, 0)) + + + self.label1 = customtkinter.CTkLabel(self, text="my label", font=("Helvetica", 20)) + self.label1 = customtkinter.CTkLabel(self, text="my label", font=("Helvetica", 20)) + + def button_callback(self): + print("button pressed") + +app = App() +app.attributes("-topmost", True) +app.mainloop() + +app.mainloop() + From 069a9436e394d725c30b84dcb59fdfc47ea01c1f Mon Sep 17 00:00:00 2001 From: noko1024 Date: Tue, 26 Dec 2023 15:44:59 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=80=E6=97=A6=E9=80=B2=E6=8D=97?= =?UTF-8?q?=E3=82=92push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mtcsync/gui/__init__.py | 0 mtcsync/gui/liveShowGUI.py | 56 ++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 mtcsync/gui/__init__.py diff --git a/mtcsync/gui/__init__.py b/mtcsync/gui/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mtcsync/gui/liveShowGUI.py b/mtcsync/gui/liveShowGUI.py index 94c3030..95421d3 100644 --- a/mtcsync/gui/liveShowGUI.py +++ b/mtcsync/gui/liveShowGUI.py @@ -1,19 +1,14 @@ import customtkinter -class MyCheckboxFrame(customtkinter.CTkFrame): - def __init__(self, master): - super().__init__(master) - self.checkbox_1 = customtkinter.CTkCheckBox(self, text="checkbox 1") - self.checkbox_1.grid(row=0, column=0, padx=10, pady=(10, 0), sticky="w") - self.checkbox_2 = customtkinter.CTkCheckBox(self, text="checkbox 2") - self.checkbox_2.grid(row=1, column=0, padx=10, pady=(10, 0), sticky="w") class LiveClockFrame(customtkinter.CTkFrame): def __init__(self, master): super().__init__(master) self.liveMasterClock = customtkinter.CTkLabel(self, text="00:00:00", font=("Helvetica", 20)) + self.liveMasterClock.grid(row=0, column=1, rowspan=2 ) + class App(customtkinter.CTk): def __init__(self): @@ -21,28 +16,43 @@ def __init__(self): self.title("Midi Time Code Sync") self.minsize(400, 180) - self.geometry("400x180") - self.grid_columnconfigure(3, weight=1) + self.geometry("1280x720") + + self.grid_columnconfigure(5, weight=1) self.grid_rowconfigure(4, weight=1) + + + + ## ガイド + self.label00 = customtkinter.CTkLabel(self, text="( 0 0 )", font=("Helvetica", 20)).grid(row=0, column=0, padx=10, pady=(10, 0)) + self.label01 = customtkinter.CTkLabel(self, text="( 0 1 )", font=("Helvetica", 20)).grid(row=0, column=1, padx=10, pady=(10, 0)) + self.label02 = customtkinter.CTkLabel(self, text="( 0 2 )", font=("Helvetica", 20)).grid(row=0, column=2, padx=10, pady=(10, 0)) + self.label03 = customtkinter.CTkLabel(self, text="( 0 3 )", font=("Helvetica", 20)).grid(row=0, column=3, padx=10, pady=(10, 0)) + + self.label10 = customtkinter.CTkLabel(self, text="( 1 0 )", font=("Helvetica", 20)).grid(row=1, column=0, padx=10, pady=(10, 0)) + self.label11 = customtkinter.CTkLabel(self, text="( 1 1 )", font=("Helvetica", 20)).grid(row=1, column=1, padx=10, pady=(10, 0)) + self.label12 = customtkinter.CTkLabel(self, text="( 1 2 )", font=("Helvetica", 20)).grid(row=1, column=2, padx=10, pady=(10, 0)) + self.label13 = customtkinter.CTkLabel(self, text="( 1 3 )", font=("Helvetica", 20)).grid(row=1, column=3, padx=10, pady=(10, 0)) + + self.label20 = customtkinter.CTkLabel(self, text="( 2 0 )", font=("Helvetica", 20)).grid(row=2, column=0, padx=10, pady=(10, 0)) + self.label21 = customtkinter.CTkLabel(self, text="( 2 1 )", font=("Helvetica", 20)).grid(row=2, column=1, padx=10, pady=(10, 0)) + self.label22 = customtkinter.CTkLabel(self, text="( 2 2 )", font=("Helvetica", 20)).grid(row=2, column=2, padx=10, pady=(10, 0)) + self.label23 = customtkinter.CTkLabel(self, text="( 2 3 )", font=("Helvetica", 20)).grid(row=2, column=3, padx=10, pady=(10, 0)) + + self.label30 = customtkinter.CTkLabel(self, text="( 3 0 )", font=("Helvetica", 20)).grid(row=3, column=0, padx=10, pady=(10, 0)) + self.label31 = customtkinter.CTkLabel(self, text="( 3 1 )", font=("Helvetica", 20)).grid(row=3, column=1, padx=10, pady=(10, 0)) + self.label32 = customtkinter.CTkLabel(self, text="( 3 2 )", font=("Helvetica", 20)).grid(row=3, column=2, padx=10, pady=(10, 0)) + self.label33 = customtkinter.CTkLabel(self, text="( 3 3 )", font=("Helvetica", 20)).grid(row=3, column=3, padx=10, pady=(10, 0)) + # ------------------------------ - #self.checkbox_frame = MyCheckboxFrame(self) - #self.checkbox_frame.grid(row=0, column=0, padx=0, pady=(10, 0), sticky="nsw") + # Que List - #self.live_clock_frame = LiveClockFrame(self) - #self.live_clock_frame.grid(row=0, column=0, padx=10, pady=(10, 0)) - #self.live_clock_frame2 = LiveClockFrame(self) - #self.live_clock_frame.grid(row=1, column=0, padx=10, pady=(10, 0)) - #self.live_clock_frame2 = LiveClockFrame(self) - #self.live_clock_frame.grid(row=2, column=0, padx=10, pady=(10, 0)) - #self.live_clock_frame3 = LiveClockFrame(self) - #self.live_clock_frame3.grid(row=3, column=0, padx=10, pady=(10, 0)) - #self.live_clock_frame4 = LiveClockFrame(self) - #self.live_clock_frame4.grid(row=0, column=4, padx=10, pady=(10, 0)) + # Live Clock + self.live_clock_frame = LiveClockFrame(self) + self.live_clock_frame.grid(row=0, column=1, columnspan=2, rowspan=2, padx=10, pady=10, sticky="nsw") - self.label1 = customtkinter.CTkLabel(self, text="my label", font=("Helvetica", 20)) - self.label1 = customtkinter.CTkLabel(self, text="my label", font=("Helvetica", 20)) def button_callback(self): print("button pressed")