-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
32 lines (24 loc) · 872 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import tkinter as tk
from gui.controller import Controller
# TODO: Should probalby create a seperate Address class for the GUI part
# TODO: Style the notebook table. It's rather ugly to look at.
class App(tk.Tk):
"""
Tkinter based GUI app. Trying to implement the MVC pattern, which means that
the controller knows everything, the view doesn't know anything about the model
and the model knows nothing about the other two.
"""
def __init__(self):
super().__init__()
self.version = "1.0"
self.title(f"Address Book v{ self.version }")
# add icon:
icon = tk.PhotoImage(file="img/book_icon.png")
self.iconphoto(True, icon)
# load controller:
self.controller = Controller(self)
if __name__ == "__main__":
print("Start...")
app = App()
app.mainloop()
print("exit.")