-
Notifications
You must be signed in to change notification settings - Fork 6
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
Qt-ifying #24
Comments
@psomers3 I don't quite get it. So instead of using this function, I send a signal coming from the database every time a user changes something? And this signal I would use to... set a boolean hasChanged in the image_display to True (for example)? |
@jakobhampel Yes to the first question, but it can also have different signals depending on what is changed. Yes to the second question, but I also haven't seen how often/where exactly you use this function so it may not be super critical, but once you're passing lists of data around, I would think first if you have to do it that way. |
@psomers3 could I also do it this way: Pro: No calls to the database needed, very simple (f.e. a class variable in the image_display to keep track of it) |
@jakobhampel I am fine with that idea. We will need something that does more isolated change tracking and this could make it easier to do in the long run. So I would create something that describes what the change was and is emitted with the signal. i.e. a dataclass or something with different info like file changed, type of change (label move, label creation, etc). |
@jakobhampel
Another example spot to make things more QT-like is to not use a function like this and instead replace it with a set of signal-slots such as "label changed" or "item added", etc coming from the database.
The text was updated successfully, but these errors were encountered: