planetarypy / pdsview

Python PDS Image Viewer
BSD 3-Clause "New" or "Revised" License
13 stars 7 forks source link

Refactor Label to MVC framework and add find next/prev buttons #44

Open percurnicus opened 7 years ago

percurnicus commented 7 years ago

label.py and textfinder.py need to be refactored into a MVC framework. After refactoring, write some more tests so we can consider label to be stable. There are a couple of tests in test_pdsview.py that test the label but the label tests should be independent of pdsview (in the end there should be a test_label.py). Finally, with the label refactored and tested, create find next and previous buttons in the textfinder.py dialog. Spend some time before moving to MVC to think about how you would add this new feature and test it and you should discover how much of a nightmare that probably would be. After moving to MVC it won't necessarily be easier but should be more clear.

warningtimer.py is a pretty simple example on how the MVC should work.