-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add Doxygen to project * create Doxyfile * add documentation to controllers * add documentation to models * add documentation to views
- Loading branch information
1 parent
7144160
commit feb7325
Showing
50 changed files
with
4,185 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ tests/ | |
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
/html | ||
# C extensions | ||
*.so | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
## | ||
# @brief: This file contains the hooks for the optional states. | ||
# | ||
|
||
# Imports | ||
import importlib | ||
from types import ModuleType | ||
models: ModuleType = importlib.import_module(name='micview.models.getters') | ||
|
||
# Functions | ||
def imageIsSquareHook(* args: None) -> None: | ||
"""! | ||
@brief: This function is called when the image is square | ||
@param args: None | ||
@return: None | ||
""" | ||
if(models.states['loading_states'].image_is_loaded and not models.states['loading_states'].loading): | ||
models.states['image_canvas_states'].update_all_childs = True | ||
|
||
def maskIsSetHook(* args: None) -> None: | ||
"""! | ||
@brief: This function is called when the mask is set | ||
@param args: None | ||
@return: None | ||
""" | ||
if(models.states['loading_states'].mask_is_loaded and not models.states['loading_states'].loading): | ||
models.states['image_canvas_states'].update_all_childs = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,60 @@ | ||
## | ||
# | ||
# @brief: This file contains the hooks for the toolframe_states | ||
# | ||
|
||
# Imports | ||
import importlib | ||
from types import ModuleType | ||
from typing import Any | ||
models: ModuleType = importlib.import_module(name='micview.models.getters') | ||
from micview.controllers.services.tools.toolframe import setTool | ||
|
||
# Functions | ||
def channelSelectHook(* args: Any) -> None: | ||
"""! | ||
@brief: This function is called when the user clicks in one of the childs of the image canvas | ||
@param args: Any | ||
@return: None | ||
""" | ||
if(models.states['loading_states'].image_is_loaded and not models.states['loading_states'].loading): | ||
models.states['image_canvas_states'].update_all_childs = True | ||
|
||
def selectedToolHook(* args: Any) -> None: | ||
"""! | ||
@brief: This function is called when the user clicks in one of the childs of the image canvas | ||
@param args: Any | ||
@return: None | ||
""" | ||
tool: str = models.states['toolframe_states'].selected_tool | ||
master: object = models.views['objects_ref'].ToolFrame | ||
setTool(tool=tool, master=master) | ||
models.states['image_canvas_states'].update_all_childs = True | ||
|
||
def toolIsSetHook(* args: Any) -> None: | ||
"""! | ||
@brief: This function is called when the user clicks in one of the childs of the image canvas | ||
@param args: Any | ||
@return: None | ||
""" | ||
if(models.states['toolframe_states'].tool_is_set): | ||
models.states['toolframe_states'].selected_tool = "cursor" | ||
else: | ||
del models.views['objects_ref'].ToolFrame | ||
models.states['toolframe_states'].selected_tool = "none" | ||
|
||
def transparencyLevelHook(* args: Any) -> None: | ||
"""! | ||
@brief: This function is called when the user clicks in one of the childs of the image canvas | ||
@param args: Any | ||
@return: None | ||
""" | ||
models.states['image_canvas_states'].update_all_childs = True | ||
|
||
def zoomHook(* args: Any) -> None: | ||
"""! | ||
@brief: This function is called when the user clicks in one of the childs of the image canvas | ||
@param args: Any | ||
@return: None | ||
""" | ||
models.states['image_canvas_states'].update_all_childs = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.