Skip to content

gui: Implement word suggestion

Antoine Belvire requested to merge feature/69_word_suggestions into master

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.

Word Suggestion

Implements #69 (closed). Fixes #72 (closed).

What has changed?

Main Changes

gui-view-model

  • Add a suggestions and suggestionFilter properties to DictionariesViewModel: Filter words using suggestionFilter when suggestionFilter is updated
  • Add a currentSlotUnsolvable property to CrosswordGridViewModel and bind it to selected boxes unsolvable status
  • Binds grid's currentSlotUnsolvable property to emptiness of dictionaries suggestions 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 to DictionariesViewModel (avoids sorting it a second time for suggestions)
Edited by Antoine Belvire

Merge request reports