This repository has been archived on 2023-11-29. You can view files and clone it, but cannot push or open issues or pull requests.
WebPicDownloader/controller/HomeController.py

50 lines
1.2 KiB
Python
Raw Normal View History

from controller.MainController import MainController
class HomeController:
"""
2022-08-30 21:12:04 +02:00
Controller - HomeController
desc...
2022-08-30 21:12:04 +02:00
@author Jérémi Nihart / EndMove
@link https://git.endmove.eu/EndMove/WebPicDownloader
@version 1.0.0
@since 2022-08-30
"""
# Variables
2022-08-30 21:12:04 +02:00
__main_controller = None
__view = None
# Constructor
def __init__(self, controller: MainController) -> None:
2022-08-30 21:12:04 +02:00
self.__main_controller = controller
2022-08-30 21:12:04 +02:00
# START View methods
def set_view(self, view) -> None:
"""
[function for view]
:view: -> The view that this controller manage.
"""
2022-08-30 21:12:04 +02:00
self.__view = view
# END View method
# START View events
def on_change_view(self, frame) -> None:
"""
[event function for view]
:frame: -> The frame we want to launch.
"""
self.__main_controller.change_frame(frame)
def on_download_started(self, url: str, name: str) -> None:
"""
[event function for view]
:url: -> The url of the website to use for pic-download.\n
:name: -> The name of the folder in which put pictures.
"""
pass
# END View events