oss-slu / Mouser

GNU General Public License v3.0
1 stars 7 forks source link

Added menu bar that has an option to open a file from any location #145

Closed aobermiller closed 12 months ago

aobermiller commented 12 months ago

Fixes #140

What was changed?

Added a menu bar that contains the functionality to open a database file from anywhere on their computer.

Why was it changed?

The previous code would not be able to handle the user moving the .db file to anywhere other than the previously hard-coded directory.

How was it changed?

Menu objects are used to create a drop down menu at the top of the window. This is done in the initialization of the ExperimentUI object. (Lines 31-35 of select_experiment_ui.py)

The funcition open_file() asks the user to select a file using their native OS's file chooser. It then instantiates an ExperimentMenuUI object using the given file as the name. (Lines 109-112)

Changed initializers in data_collection_ui.py, database_controller.py, data_colection_database.py, and map_rfid.py to work when given a full file path as opposed to just the name of the experiment.