Skip to content

gui: Introduce a slots view model

Introduces a CluesViewModel which contains the list of of across and down clues that will contains the data displayed on the UI.

Also, created SlotsViewModel which stores list of across and down slots. It is actually the most complicated part. I can't help thinking that there must be a smarter solution to manage slots but I couldn't find one.

Re-evaluating all the slots upon each grid modification would be simpler but it would trigger more updates/it would more complicated to determine which clue should be cleared and which should be kept.

Here the code is more complicated, but only the necessary changes are performed on SlotsViewModel upon grid modification, which makes the code in CluesViewModel trivial.

Merge request reports