-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
48 lines (36 loc) · 1.55 KB
/
Copy pathmain.py
File metadata and controls
48 lines (36 loc) · 1.55 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import customtkinter as ctk
from gui.profile_page import ProfilePage
from gui.recommendations_page import RecommendationsPage
from gui.search_page import SearchPage
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("blue")
class CineAIApp(ctk.CTk):
def __init__(self):
super().__init__()
self.title("CineAI - Film & Dizi Öneri Sistemi")
self.geometry("820x700")
self.tabview = ctk.CTkTabview(self, width=800, height=650)
self.tabview.pack(padx=10, pady=10, fill="both", expand=True)
self.tabview.add("Profil")
self.tabview.add("Öneriler")
self.tabview.add("Ara")
self.profile_page = ProfilePage(self.tabview.tab("Profil"))
self.profile_page.pack(fill="both", expand=True)
self.recommendations_page = RecommendationsPage(self.tabview.tab("Öneriler"))
self.recommendations_page.pack(fill="both", expand=True)
self.search_page = SearchPage(self.tabview.tab("Ara"))
self.search_page.pack(fill="both", expand=True)
self.tabview.configure(command=self.on_tab_changed)
# İlk açılışta profil sayfasını yükle
self.profile_page.load_profile()
def on_tab_changed(self):
new_tab_name = self.tabview.get()
if new_tab_name == "Profil":
self.profile_page.load_profile()
elif new_tab_name == "Öneriler":
self.recommendations_page.load_recommendations()
elif new_tab_name == "Ara":
pass
if __name__ == "__main__":
app = CineAIApp()
app.mainloop()