gui: Implement word suggestion
Context
Adds a new "Suggestions" tiled pane in dictionaries pane giving the feasible words for the selected slot. The selected slot becomes red when no feasible word exists.
Implements #69 (closed). Fixes #72 (closed).
What has changed?
Main Changes
gui-view-model
- Add a
suggestions
andsuggestionFilter
properties toDictionariesViewModel
: Filter words usingsuggestionFilter
whensuggestionFilter
is updated - Add a
currentSlotUnsolvable
property toCrosswordGridViewModel
and bind it to selected boxes unsolvable status - Binds grid's
currentSlotUnsolvable
property to emptiness of dictionariessuggestions
property
gui-view
- Add a new element "Suggestions" in dictionaries pane: Contains a list of suggestions (words) applicable to the selected slot.
- Change the way to represent the selected box: Use a thicker border instead of a different colour, since now current box can be highlighted as unsolvable.
gui
- Bind view models new properties to views
Side Effects
gui-view
, gui-view-model
- Move words sorting from
DictionariesPane
toDictionariesViewModel
(avoids sorting it a second time for suggestions)
Edited by Antoine Belvire