![]() |
VR-Forces 4.2 Class Documentation
|
The DtSelectionGroupManager class is the interface to be used when creating selection group. More...

Public Types | |
| typedef std::set< std::string > | GroupItems |
| typedef std::map< std::string, GroupItems > | SelectionGroups |
Public Member Functions | |
| DtSelectionGroupManager (makVrv::DtDe &de) | |
| CTOR. | |
| virtual | ~DtSelectionGroupManager () |
| DTOR. | |
| virtual void | createSelectionGroup (const std::string &) |
| Create a new selection group. If named selection group alread exists will do nothing. | |
| virtual void | createSelectionGroupFromCurrentSelection (const std::string &groupName, bool select=false) |
| Creates a selection group from the current selection as found in the DtVrfSelectionHandler selected names. | |
| virtual void | clearSelectionGroup (const std::string &) |
| Clears a selection group of all items. | |
| virtual void | removeSelectionGroup (const std::string &) |
| Deletes the selection groupd. | |
| virtual bool | hasSelectionGroup (const std::string &) const |
| Returns true if there is a named selection group. | |
| virtual void | renameSelectionGroup (const std::string &from, const std::string &to) |
| Renames a selection group. | |
| virtual void | addItemToSelectionGroup (const std::string &, const std::string &name) |
| Adds a new item to a selection group. | |
| virtual bool | atLeastOneItemNotInSelectionGroup (const std::string &, const GroupItems &names) const |
| Returns true if at least one of the supplied items is not in the selection group. | |
| virtual bool | atLeastOneItemNotInSelectionGroup (const std::string &, const std::vector< std::string > &names) const |
| virtual bool | anyItemsInSelectionGroup (const std::string &, const GroupItems &names) const |
| Returns true if any of the items are in the specified group. | |
| virtual bool | anyItemsInSelectionGroup (const std::string &, const std::vector< std::string > &names) const |
| virtual void | addItemsToSelectionGroup (const std::string &, const GroupItems &names) |
| Adds new items to a selection group. | |
| virtual void | addItemsToSelectionGroup (const std::string &, const std::vector< std::string > &names) |
| virtual bool | itemInAnySelectionGroup (const std::string &) const |
| Returns true if the named item is in any selection group. | |
| virtual void | removeItemFromSelectionGroup (const std::string &, const std::string &name) |
| Removes an item vrom a selection group. | |
| virtual void | removeItemsFromSelectionGroup (const std::string &, const GroupItems &names) |
| Removes items vrom a selection group. | |
| virtual void | removeItemsFromSelectionGroup (const std::string &, const std::vector< std::string > &names) |
| virtual const SelectionGroups & | selectionGroups () const |
| Returns the current list of selection groups. | |
| virtual bool | load (const std::string &) |
| Loads and replaces the current selection group set. | |
| virtual bool | save (const std::string &) |
| Saves out the current selection group set. | |
| virtual void | removeAll () |
| Removes all selection groups. | |
| virtual GroupItems | itemsInSelectionGroup (const std::string &) const |
| Returns all the items in a particular selection group. | |
| virtual bool | itemIsInSelectionGroup (const std::string &group, const std::string &item) const |
| Returns true if the names item is in the supplied selection group. | |
| virtual void | selectItemsInSelectionGroup (const std::string &) |
| Selects all the items in the specified selection group that are in the simulation. | |
| virtual const std::string & | selectedSelectionGroup () const |
| Returns the currently selected selection group. | |
| virtual void | slot_elementAttributeChangeRequested (makVrv::DtUniqueID id, makVrv::DtUniqueID parentId, DtBoost::shared_ptr< const makVrv::DtElementAttribute > atr) |
| Called when an element attribute has changed. | |
| virtual void | addNamesToInternalMaps (const GroupItems &) |
| Adds names to internal maps. | |
| virtual void | removeNamesFromInternalMaps (const GroupItems &) |
| Removes names from internal maps if no longer in any selection group. | |
| virtual void | renameItemInAllSelectionGroups (const std::string &from, const std::string &to) |
| Renames the item in all selection groups from the from item to the to item. If renamed a signal is emitted with the renamed item. | |
| virtual void | slot_onAttributesChanged (const makVrv::DtElementData::EntryAttributesList &signalList) |
| Called with attribute changes. See if one is a name change for something that is in a selection group. | |
| virtual void | handleAttribute (makVrv::DtUniqueID id, const makVrv::DtElementAttribute *atr) |
| See if attribute is display name change. | |
| virtual void | processCreateSelectionGroup (DtSimMessage *) |
| Call back in response receiving creating selection group message. | |
| virtual bool | canRenameSelectionGroup (const std::string &) const |
| Returns true if the selection group can be renamed. | |
Static Public Member Functions | |
| static DtSelectionGroupManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &de, DtSelectionGroupManager *) |
Public Attributes | |
| boost::signal< void(std::string)> | signal_selectionGroupAdded |
| boost::signal< void(std::string, std::string)> | signal_selectionGroupRenamed |
| Signal sent when a selection group is renamed. | |
| boost::signal< void(std::string)> | signal_selectionGroupRemoved |
| Signal sent when a selection group is removed. | |
| boost::signal< void(std::string)> | signal_selectionGroupCleared |
| Signal sent when a selection group is cleared of all its items. | |
| boost::signal< void(std::string, GroupItems)> | signal_itemsAddedToSelectionGroup |
| Signal sent when items are added to a selection group. | |
| boost::signal< void(std::string, GroupItems)> | signal_itemsRemovedFromSelectionGroup |
| Signal sent when items are removed from a selection group. | |
| boost::signal< void()> | signal_loading |
| Signal sent before the selection group manager is loaded. | |
| boost::signal< void()> | signal_loaded |
| Signal sent after the selection group manager is loaded. | |
| boost::signal< void()> | signal_selectionGroupsCleared |
| Signal sent when the selection group manager is cleared. | |
| boost::signal< void(std::string, std::string)> | signal_itemRenamed |
| Signal emitted when an item is renamed in a selection group. | |
| boost::signal< void(std::string)> | signal_selectionGroupSelected |
| Signal emitted when current selection group has changed. | |
Protected Types | |
| typedef std::map< std::string, makVrv::DtUniqueID > | NameToIdMap |
| typedef std::map < makVrv::DtUniqueID, std::string > | IdToNameMap |
Protected Member Functions | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
| When the class Archive corresponds to an output archive, the & operator is defined similar to <<. | |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| SelectionGroups | mySelectionGroups |
| makVrv::DtSignalConnectionManager | myConnectionManager |
| NameToIdMap | myNameToIdMap |
| IdToNameMap | myIdToNameMap |
| std::string | mySelectedSelectionGroup |
Friends | |
| class | boost::serialization::access |
The DtSelectionGroupManager class is the interface to be used when creating selection group.
Selection groups are collection of named objects that can be used to select a group of objects at a single time
| typedef std::set<std::string> makVrf::DtSelectionGroupManager::GroupItems |
| typedef std::map<std::string, GroupItems> makVrf::DtSelectionGroupManager::SelectionGroups |
|
protected |
|
protected |
| makVrf::DtSelectionGroupManager::DtSelectionGroupManager | ( | makVrv::DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
static |
|
static |
|
virtual |
Create a new selection group. If named selection group alread exists will do nothing.
|
virtual |
Creates a selection group from the current selection as found in the DtVrfSelectionHandler selected names.
If selection group already exists replaces current contents of selection group If last parameter is true also will select that group
|
virtual |
Clears a selection group of all items.
|
virtual |
Deletes the selection groupd.
|
virtual |
Returns true if there is a named selection group.
|
virtual |
Renames a selection group.
If the selection group to rename to already exists selection group is not renamed
|
virtual |
Adds a new item to a selection group.
|
virtual |
Returns true if at least one of the supplied items is not in the selection group.
|
virtual |
|
virtual |
Returns true if any of the items are in the specified group.
|
virtual |
|
virtual |
Adds new items to a selection group.
|
virtual |
|
virtual |
Returns true if the named item is in any selection group.
|
virtual |
Removes an item vrom a selection group.
|
virtual |
Removes items vrom a selection group.
|
virtual |
|
virtual |
Returns the current list of selection groups.
|
virtual |
Loads and replaces the current selection group set.
|
virtual |
Saves out the current selection group set.
|
virtual |
Removes all selection groups.
|
virtual |
Returns all the items in a particular selection group.
|
virtual |
Returns true if the names item is in the supplied selection group.
|
virtual |
Selects all the items in the specified selection group that are in the simulation.
Emits a signal that this selection group is currently active
|
virtual |
Returns the currently selected selection group.
|
virtual |
Called when an element attribute has changed.
See if it is a selection group item, and, if so, change the name in the selection group list
|
virtual |
Adds names to internal maps.
If names are not yet in the simulation, add anyway but have ids be 0. Will not add reverse map (by id) if not in simulation
|
virtual |
Removes names from internal maps if no longer in any selection group.
|
virtual |
Renames the item in all selection groups from the from item to the to item. If renamed a signal is emitted with the renamed item.
|
virtual |
Called with attribute changes. See if one is a name change for something that is in a selection group.
|
virtual |
See if attribute is display name change.
|
virtual |
Call back in response receiving creating selection group message.
|
virtual |
Returns true if the selection group can be renamed.
By default the "Selection Group <N>" groups cannot be renamed
|
inlineprotected |
When the class Archive corresponds to an output archive, the & operator is defined similar to <<.
Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.
|
friend |
| boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupAdded |
Signals for selection group manager
Signal sent when a new selection group is added
| boost::signal<void (std::string, std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupRenamed |
Signal sent when a selection group is renamed.
| boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupRemoved |
Signal sent when a selection group is removed.
| boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupCleared |
Signal sent when a selection group is cleared of all its items.
| boost::signal<void (std::string, GroupItems)> makVrf::DtSelectionGroupManager::signal_itemsAddedToSelectionGroup |
Signal sent when items are added to a selection group.
| boost::signal<void (std::string, GroupItems)> makVrf::DtSelectionGroupManager::signal_itemsRemovedFromSelectionGroup |
Signal sent when items are removed from a selection group.
| boost::signal<void ()> makVrf::DtSelectionGroupManager::signal_loading |
Signal sent before the selection group manager is loaded.
| boost::signal<void ()> makVrf::DtSelectionGroupManager::signal_loaded |
Signal sent after the selection group manager is loaded.
| boost::signal<void ()> makVrf::DtSelectionGroupManager::signal_selectionGroupsCleared |
Signal sent when the selection group manager is cleared.
| boost::signal<void (std::string, std::string)> makVrf::DtSelectionGroupManager::signal_itemRenamed |
Signal emitted when an item is renamed in a selection group.
| boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupSelected |
Signal emitted when current selection group has changed.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |