80 lines
2.5 KiB
Python
80 lines
2.5 KiB
Python
|
from tkinter import *
|
||
|
|
||
|
root = Tk()
|
||
|
root.title("Обчислення Z")
|
||
|
|
||
|
# Віджети введених множин
|
||
|
sets_frame = Frame(root, bd=5)
|
||
|
|
||
|
set_A_label = Label(sets_frame, text="Множина A:", bd=5)
|
||
|
elements_A_label = Label(sets_frame)
|
||
|
|
||
|
set_B_label = Label(sets_frame, text="Множина B:", bd=5)
|
||
|
elements_B_label = Label(sets_frame)
|
||
|
|
||
|
set_C_label = Label(sets_frame, text="Множина C:", bd=5)
|
||
|
elements_C_label = Label(sets_frame)
|
||
|
|
||
|
# Пакувальники введених множин
|
||
|
sets_frame.grid(row=0, column=0)
|
||
|
|
||
|
set_A_label.grid(row=0, column=0, sticky=E)
|
||
|
elements_A_label.grid(row=0, column=1, sticky=W)
|
||
|
|
||
|
set_B_label.grid(row=1, column=0, sticky=E)
|
||
|
elements_B_label.grid(row=1, column=1, sticky=W)
|
||
|
|
||
|
set_C_label.grid(row=2, column=0, sticky=E)
|
||
|
elements_C_label.grid(row=2, column=1, sticky=W)
|
||
|
|
||
|
set_labels = [elements_A_label, elements_B_label, elements_C_label]
|
||
|
|
||
|
# Кнопка початку розрахунків
|
||
|
start_calculations_button = Button(root, text="Почати розрахунки")
|
||
|
start_calculations_button.grid(row=1, column=0)
|
||
|
|
||
|
# Віджети покрокового розв'язання
|
||
|
calculations_frame = Frame(root, bd=5)
|
||
|
|
||
|
expression_label = Label(calculations_frame, text="Вираз: Z = X ∆ Y", bd=5)
|
||
|
|
||
|
first_step_label = Label(calculations_frame, text="X = ¬B = ", bd=5)
|
||
|
first_step_result = Label(calculations_frame)
|
||
|
|
||
|
second_step_label = Label(calculations_frame, text="Y = ¬A = ", bd=5)
|
||
|
second_step_result = Label(calculations_frame)
|
||
|
|
||
|
third_step_label = Label(calculations_frame, text="Z = ", bd=5)
|
||
|
third_step_result = Label(calculations_frame)
|
||
|
|
||
|
step_results = [first_step_result, second_step_result, third_step_result]
|
||
|
|
||
|
# Пакувальники покрокового розв'язання
|
||
|
calculations_frame.grid(row=2, column=0, sticky=W)
|
||
|
|
||
|
expression_label.grid(row=0, column=0, columnspan=2)
|
||
|
|
||
|
first_step_label.grid(row=1, column=0, sticky=E)
|
||
|
second_step_label.grid(row=2, column=0, sticky=E)
|
||
|
third_step_label.grid(row=3, column=0, sticky=E)
|
||
|
|
||
|
first_step_result.grid(row=1, column=1, sticky=W)
|
||
|
second_step_result.grid(row=2, column=1, sticky=W)
|
||
|
third_step_result.grid(row=3, column=1, sticky=W)
|
||
|
|
||
|
# Віджети множини Z
|
||
|
z_frame = Frame(root, bd=5)
|
||
|
|
||
|
set_Z_label = Label(z_frame, text="Множина Z:", bd=5)
|
||
|
elements_Z_label = Label(z_frame)
|
||
|
|
||
|
save_Z_button = Button(z_frame, text="Зберегти Z")
|
||
|
|
||
|
# Пакувальники множини Z
|
||
|
z_frame.grid(row=3, column=0)
|
||
|
|
||
|
set_Z_label.grid(row=0, column=0)
|
||
|
elements_Z_label.grid(row=0, column=1)
|
||
|
|
||
|
save_Z_button.grid(row=1, column=0, columnspan=2)
|