Refactor project#40
Merged
Merged
Conversation
Organize main window related files
EliasJRH
marked this pull request as draft
November 22, 2024 23:19
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #39
This PR refactors basically the entire project structure into something more organized. The first thing that was done was renaming
widget.pytomain_window.pyas it's the main widget in the application. All code related to the main_window was then move into a separate directory.main.pyis not the entrypoint of the application and all it does in create an instance ofMainWindowand show it.Files related to the user interface, those being
form.uiandresources.qrcwere moved intomain_window/ui. Going forward all generated code from these files must be created in this directory as well. There are a few ways this can be done.In QT Designer, add two custom build steps (one for UI and one for resources file) in the project build steps tab

Note that the command and working directory fields for each should be replaced in respect to you're working directory.
As part of this PR and
build.pyscript will be provided that be run whenever making modifications to the UI which should correctly recompile the filesFinally, most of the logic within
main_window.pywas refactored. Specifically:udp.pyrecording_and_playback.pydata_handlers.pylogging.pyThese files are imported within the
MainWindowclass, effectively breaking the class up into manageable files.