Added a function called all_rfid_mapped() which returns true if the number of mapped rfids is equal to the total number of animals in the experiment.
Added function called on_show_frame() that checks to see if all_rfid_mapped is true and enables/disables group_configuration, collection, and data_analysis accordingly.
Overrode raise_frame function for experiment_menu button. Now also calls on_show_frame.
Changed MenuButton and ChangePageButton so that they take MouserPages and the navigate functions of them to use the function MouserPage.raise_frame().
Also changed the function press_back_to_menu_button() in map_rfid so that it calls navigate
Why was it changed?
We want to be able to disable certain features of the program until the user maps all animals, as otherwise things would break.
Overrode raise_frame so that it checks everytime we return to the menu. That way, if user finishes mapping rfids they do not have to reopen the file to use the other buttons.
I had to change the functionality of MenuButton and ChangePageButton so that they use the MouserPage.raise_frame() function. That way we can now use the MouserPage.raise_frame() function to now do anything we would like when we raise a frame.
How was it changed?
Had to add an experiment object to the experiment menu class to facilitate the all_rfid_mapped function.
Also had to move the class declarations below the MouserPage class declaration so that they can take a MouserPage as an argument.
Fixes #192
What was changed?
Added a function called all_rfid_mapped() which returns true if the number of mapped rfids is equal to the total number of animals in the experiment.
Added function called on_show_frame() that checks to see if all_rfid_mapped is true and enables/disables group_configuration, collection, and data_analysis accordingly.
Overrode raise_frame function for experiment_menu button. Now also calls on_show_frame.
Changed MenuButton and ChangePageButton so that they take MouserPages and the navigate functions of them to use the function MouserPage.raise_frame().
https://github.com/oss-slu/Mouser/blob/5d886c02bae1f1ca0b16b883921b34213a1782e4/shared/tk_models.py#L114-L146
Also changed the function press_back_to_menu_button() in map_rfid so that it calls navigate
Why was it changed?
We want to be able to disable certain features of the program until the user maps all animals, as otherwise things would break.
Overrode raise_frame so that it checks everytime we return to the menu. That way, if user finishes mapping rfids they do not have to reopen the file to use the other buttons.
I had to change the functionality of MenuButton and ChangePageButton so that they use the MouserPage.raise_frame() function. That way we can now use the MouserPage.raise_frame() function to now do anything we would like when we raise a frame.
How was it changed?
Had to add an experiment object to the experiment menu class to facilitate the all_rfid_mapped function.
Also had to move the class declarations below the MouserPage class declaration so that they can take a MouserPage as an argument.
Images Before rfids are mapped
After