Add a "model" for descriptive phrases.
This is work toward making qtComponentItem (and qtResourceItem, once it exists) use the smtk::view module. As part of that work,
- add a
PhraseModel
class that owns a descriptive phrase hierarchy and observes SMTK managers for events (such as operations, selection changes, resource addition/removal). - add a
ResourcePhraseModel
that populates a hierarchy's top-level with a list of available resources. - fix a problem with the QStyledItemDelegate subclass used to display a resource tree (do not use the inherited paint() method and do use the usual Qt::DisplayRole for the title text).
- move
smtk::resource::SelectionManager
tosmtk::view::Selection
since (a) it is really more about presentation than an inherent property of a resource and (b) only a single selection map is managed, making "Manager" a little specious. While it is true that the map may be used for multiple selections by mapping components to different integers, one would have to reserve a bit per selection in order for them to be independent.
Edited by David Thompson