|
SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Present phrases describing a set of acceptable components held by a single resource. More...
#include <ReferenceItemPhraseModel.h>
Public Member Functions | |
| smtkTypeMacro (smtk::view::ReferenceItemPhraseModel) | |
| smtkSuperclassMacro (smtk::view::ComponentPhraseModel) | |
| smtkSharedPtrCreateMacro (smtk::view::PhraseModel) | |
| ReferenceItemPhraseModel (const Configuration *, Manager *) | |
| void | setUseAttributeAssociations (bool val) |
| void | setReferenceItem (smtk::attribute::ReferenceItemPtr &refItem) |
Public Member Functions inherited from smtk::view::ComponentPhraseModel | |
| smtkTypeMacro (smtk::view::ComponentPhraseModel) | |
| smtkSuperclassMacro (smtk::view::PhraseModel) | |
| smtkSharedPtrCreateMacro (smtk::view::PhraseModel) | |
| ComponentPhraseModel (const Configuration *, Manager *mgr) | |
| DescriptivePhrasePtr | root () const override |
| Return the root phrase of the hierarchy. | |
| bool | setComponentFilters (const std::multimap< std::string, std::string > &src) |
| Set the specification for what components are allowed to be src. More... | |
| void | visitComponentFilters (std::function< int(const std::string &, const std::string &)> fn) const |
| Visit all of the filters that define what components are acceptable for display. More... | |
| void | setSortFunction (const SortingCompFunc &comparator) |
| sets a custom comparison function to sort descriptive phrases. More... | |
Public Member Functions inherited from smtk::view::PhraseModel | |
| smtkTypeMacroBase (smtk::view::PhraseModel) | |
| smtkCreateMacro (smtk::view::PhraseModel) | |
| virtual void | updateChildren (smtk::view::DescriptivePhrasePtr plist, DescriptivePhrases &next, const std::vector< int > &idx) |
| Infer changes between sets of subphrases; affect these changes; and notify observers. | |
| virtual void | triggerDataChanged () |
| Manually specify that all rows should be updated (but to keep the expanded/collapsed state). | |
| virtual void | triggerDataChangedFor (smtk::resource::ComponentPtr comp) |
| Manually specify that all rows with their relatedComponent() == comp should be updated. | |
| Observers & | observers () |
| Return the observers associated with this phrase model. | |
| const Observers & | observers () const |
| smtk::operation::ManagerPtr | operationManager () const |
| Return the operationManager for the first Source registered. | |
| void | setMutableAspects (int mutableAspects) |
| Set what aspects of top-level phrases should be user-editable. More... | |
| int | mutableAspects () const |
| Get what aspects of top-level phrases should be user-editable. More... | |
| ManagerPtr | manager () const |
| PhraseModels that are managed have a non-null pointer to their manager. | |
| const BadgeSet & | badges () const |
| Return the badges that may apply to phrases in this model. | |
| BadgeSet & | badges () |
| const UUIDsToPhrasesMap & | uuidPhraseMap () const |
| Return the map between persistent object IDs and Descriptive Phrases. | |
| smtk::common::ThreadPool< DescriptivePhrases > & | threadPool () |
| virtual bool | addSource (const smtk::common::TypeContainer &managers) |
| Manage sources of information to display as phrases. More... | |
| virtual bool | removeSource (const smtk::common::TypeContainer &managers) |
| Indicate managers that should no longer be monitored for changes. | |
| virtual bool | resetSources () |
| Stop listening for changes from all sources. | |
| virtual void | visitSources (SourceVisitorFunction visitor) |
| Invoke the visitor function on each source that has been added to the model. | |
Static Public Member Functions | |
| static PhraseModelPtr | create (const smtk::view::Configuration::Component &viewComp) |
| Create a model and configure it given a view description. More... | |
Static Public Member Functions inherited from smtk::view::PhraseModel | |
| static SubphraseGeneratorPtr | configureSubphraseGenerator (const Configuration *, Manager *) |
| A method subclasses may call to prepare a subphrase generator. More... | |
| static std::multimap< std::string, std::string > | configureFilterStrings (const Configuration *config, Manager *manager) |
| A method subclasses may call to obtain filter strings. | |
| static smtk::operation::Observers::Priority | operationObserverPriority () |
| The priority used for observing operation results. More... | |
Protected Member Functions | |
| void | populateRoot () override |
| Populate the root based on a set of appropriate resource components. | |
| void | handleModified (const smtk::resource::PersistentObjectSet &modifiedObjects) override |
| Called to deal with resources/components marked as modified by the operation. | |
Protected Member Functions inherited from smtk::view::ComponentPhraseModel | |
| void | handleCreated (const smtk::resource::PersistentObjectSet &createdObjects) override |
| Called to deal with resources/components being created as a result of an operation. | |
| void | processResource (const Resource::Ptr &rsrc, bool adding) override |
| DescriptivePhrasePtr | createTopPhrase (const smtk::resource::ComponentPtr &comp) |
| creates a DescriptivePhrase for a top-level Component (i.e. More... | |
Protected Member Functions inherited from smtk::view::PhraseModel | |
| PhraseModel (const Configuration *config, Manager *manager) | |
| virtual void | handleSelectionEvent (const std::string &src, smtk::view::SelectionPtr seln) |
| A method called when a selection is modified. | |
| virtual void | handleResourceEvent (const Resource &, smtk::resource::EventType) |
| A method called when a resource manager adds or removes a resource. More... | |
| virtual int | handleOperationEvent (const Operation &op, operation::EventType e, const Operation::Result &res) |
| A method called when operators have modified one or more resources. More... | |
| virtual void | processResource (const std::shared_ptr< smtk::resource::Resource > &resource, bool adding) |
| This is invoked from within handleOperationEvent when a resource is being added or removed. More... | |
| void | removeChildren (const std::vector< int > &parentIdx, int childRange[2]) |
| Given the index of parent phrase and a range of its children, delete them. More... | |
| void | setPhraseParent (const DescriptivePhrasePtr &phrase, const DescriptivePhrasePtr &parent) const |
| Set the Parent of a Descriptive Phrase. | |
| virtual void | handleExpunged (const smtk::resource::PersistentObjectSet &expungedObjects) |
| Called to deal with resources/components being removed as a result of an operation. | |
| virtual void | redecorate () |
| Un-decorate and re-decorate every phrase in the current hierarchy. More... | |
| virtual void | trigger (DescriptivePhrasePtr phr, PhraseModelEvent e, const std::vector< int > &src, const std::vector< int > &dst, const std::vector< int > &refs) |
| Make changes to the phrase hierarchy. More... | |
| void | recursiveTrigger (DescriptivePhrasePtr phr, std::vector< int > &tl, std::vector< int > &br) |
| This is an utility called by triggerDataChanged() that repeatedly calls trigger for every phrase that has children (in order to effect a redraw of the entire model, but without rows being inserted/removed/repositioned). More... | |
| void | removeFromMap (const DescriptivePhrasePtr &phr) |
| Remove the Descriptive Phrase and its descendants from the Persistent Object / Phrases Map. | |
| void | insertIntoMap (const DescriptivePhrasePtr &phrase) |
| Insert the Descriptive Phrase and its descendants into the Persistent Object / Phrases Map. | |
Protected Attributes | |
| smtk::attribute::ReferenceItemPtr | m_refItem |
| bool | m_useAttributeAssociatons |
Protected Attributes inherited from smtk::view::ComponentPhraseModel | |
| smtk::view::DescriptivePhrasePtr | m_root |
| std::set< std::weak_ptr< smtk::resource::Resource >, std::owner_less< std::weak_ptr< smtk::resource::Resource > > > | m_resources |
| std::multimap< std::string, std::string > | m_componentFilters |
| SortingCompFunc | m_comparator = smtk::view::DescriptivePhrase::compareByTypeThenTitle |
Protected Attributes inherited from smtk::view::PhraseModel | |
| std::list< Source > | m_sources |
| UUIDsToPhrasesMap | m_objectMap |
| Observers | m_observers |
| PhraseDecorator | m_decorator |
| BadgeSet | m_badges |
| int | m_mutableAspects { PhraseContent::EVERYTHING } |
| WeakManagerPtr | m_manager |
| bool | m_updatingChildren = false |
| smtk::common::ThreadPool< DescriptivePhrases > | m_pool |
| std::atomic< bool > | m_pending { false } |
Additional Inherited Members | |
Public Types inherited from smtk::view::ComponentPhraseModel | |
| using | Observer = std::function< void(DescriptivePhrasePtr, PhraseModelEvent, int, int)> |
| using | Operation = smtk::operation::Operation |
| typedef std::function< bool(const smtk::view::DescriptivePhrasePtr &a, const smtk::view::DescriptivePhrasePtr &b)> | SortingCompFunc |
Public Types inherited from smtk::view::PhraseModel | |
| using | Observer = PhraseModelObserver |
| Events that alter the phrase model trigger callbacks of this type. | |
| using | Observers = PhraseModelObservers |
| A collection of observers with runtime-modifiable call behaviors. | |
| using | PhraseDecorator = std::function< void(smtk::view::DescriptivePhrasePtr)> |
| Applications may have a model decorate its phrases by providing a method with this signature. | |
| using | SourceVisitor = std::function< bool(const smtk::resource::ManagerPtr &, const smtk::operation::ManagerPtr &, const smtk::view::ManagerPtr &, const smtk::view::SelectionPtr &)> |
| Subclasses (and others) may wish to invoke functions on the sources of data for the phrases. More... | |
| using | SourceVisitorFunction = std::function< smtk::common::Visit(const smtk::resource::ManagerPtr &, const smtk::operation::ManagerPtr &, const smtk::view::ManagerPtr &, const smtk::view::SelectionPtr &)> |
| Subclasses (and others) may wish to invoke functions on the sources of data for the phrases. More... | |
| using | Operation = smtk::operation::Operation |
| using | OperationPtr = smtk::operation::Operation::Ptr |
| using | ComponentItemPtr = smtk::attribute::ComponentItemPtr |
| using | Resource = smtk::resource::Resource |
Public Attributes inherited from smtk::view::PhraseModel | |
| friend | Manager |
Present phrases describing a set of acceptable components held by a single resource.
This model maintains the list of acceptable components by asking the resource for all matching components each time an operation runs.
The list is flat (i.e., no sub-phrase generator is provided by default). The model provides access to a user-selected subset as an smtk::view::Selection.
|
static |
Create a model and configure it given a view description.
Note that this method, unlike the version that takes a smtk::view::Configuration, is used by qtReferenceItem (where the PhraseModel is a "sub-view" of the qtItem's view).
1.8.17