-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Master term models #1893
Conversation
Using the I'm bringing this up because I've been thinking about the structure of the models for the pure QML GUI. I'm imagining that we'll ultimately need a bunch of higher level models (e.g. DissolveModel, CoreDataModel) and that these might be able to return inner models (e.g. a CoreDataModel having a function that returns its MasterAngleModel). That way the models can be passed around as parameters within the QML and can be passed into any other bespoke models that may need them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bunch of places where we might want to add some error logging and/or dialogs, but it looks good otherwise.
Yes, this is a very valid concern, and not one which I had thought about when I made that change! However, your suggestion of a top level model encompassing either or both of |
697375d
to
2040c29
Compare
This PR moves the responsibility of adding / removing master terms to the relevant model, rather than leaving this the job of the GUI at the calling point.
A significant change here is the storage of a reference to
CoreData
within the baseMasterTermModel
. Comments welcome on this, but the allows easy access to the addition / removal of terms, as well as permitting a nice clean up of code throughout all the models.