Fixing bugs & start creating interface

This commit is contained in:
2022-08-31 12:07:43 +02:00
parent dce1b2f9a5
commit 16794bf488
10 changed files with 145 additions and 38 deletions

View File

@@ -15,4 +15,4 @@ class Frames(Enum):
@since 2022-08-30
"""
Home = 1 # Home view
Info = 2 # Info & copyright view
Info = 2 # Info & copyright view

View File

@@ -37,7 +37,15 @@ class HomeController:
:frame: -> The frame we want to launch.
"""
self.__main_controller.change_frame(frame)
#self.__main_controller.change_frame(frame)
self.__view.add_log("Salut comment vas tu ? 1")
self.__view.add_log("Salut comment vas tu ? 2")
self.__view.add_log("Salut comment vas tu ? 3")
self.__view.add_log("Salut comment vas tu ? 4")
self.__view.add_log("Salut comment vas tu ? 5")
self.__view.add_log("Salut comment vas tu ? 6")
self.__view.add_log("Salut comment vas tu ? 7")
self.__view.add_log("Salut comment vas tu ? 8")
def on_download_started(self, url: str, name: str) -> None:
"""
@@ -47,4 +55,4 @@ class HomeController:
:name: -> The name of the folder in which put pictures.
"""
pass
# END View events
# END View events

View File

@@ -38,4 +38,4 @@ class InfoController:
:frame: -> The frame we want to launch.
"""
self.__main_controller.change_frame(frame)
# END View events
# END View events

View File

@@ -20,18 +20,29 @@ class MainController:
def set_view(self, view) -> None:
"""
[function for view]
=> Allow to define the controller view.
:view: -> The view that this controller manage.
"""
self.__view = view
# END view methods
def on_check_for_update(self) -> None:
"""
[event function for view]
=> Event launched when a check for available updates is requested.
"""
# TODO write the function
print("on_check_for_update")
pass
# END View methods
# START Controller methods
def change_frame(self, frame) -> None:
"""
[function for controller]
=> Allows you to request a frame change in the main window.
:frame: -> The frame we want to display on the window instead of the current frame.
"""
self.__view.show_frame(frame)
# END Controller methods
# END Controller methods