VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtVrfSelectionHandler Class Reference

Functionality added to allow developers to more easily get information about currently selected items.

Related examples
Inheritance diagram for makVrf::DtVrfSelectionHandler:
Inheritance graph
[legend]

Public Member Functions

 DtVrfSelectionHandler (makVrv::DtDe &)
 
virtual ~DtVrfSelectionHandler ()
 
virtual void currentSelectionChanged (const makVrv::DtSelectionManager::IdSet &selected)
 
virtual
makVrv::DtSelectionManager::IdSet 
convertNamesToIds (const std::vector< DtUUID > &) const
 
virtual
makVrv::DtSelectionManager::IdSet 
convertNamesToIds (const std::vector< std::string > &) const
 
virtual DtVector getLocationFromLaserState (const DtLaserDesignatorState &) const
 
virtual std::vector< DtUUIDgetSelectedNames () const
 
virtual std::vector< DtUUIDgetSelectedNames (const makVrv::DtSelectionManager::IdSet &) const
 
virtual std::vector< std::string > getSelectedNamesAsMarkingText () const
 
virtual std::vector< std::string > getSelectedNamesAsMarkingText (const makVrv::DtSelectionManager::IdSet &) const
 
virtual std::vector
< makVrv::DtSimEntry * > 
getSelectedEntries () const
 
virtual std::vector
< makVrv::DtSimEntry * > 
getSelectedEntries (const makVrv::DtSelectionManager::IdSet &) const
 
virtual bool selectionHasExtendedKeyAndValue (const DtString &keyword, const DtString &value) const
 
virtual void selectObjects (const std::vector< DtUUID > &names)
 
virtual bool allObjectsAreVrfSimulated (const makVrv::DtSelectionManager::IdSet &) const
 
virtual bool allObjectsAreInSameVrfSession (const makVrv::DtSelectionManager::IdSet &) const
 
virtual bool objectIsVrfSimulated (makVrv::DtUniqueID) const
 
virtual bool objectInSameVrfSession (makVrv::DtUniqueID) const
 
virtual const
makVrv::DtStateView
< makVrv::DtVrlinkSimulatedBaseState > * 
getVrlinkSimulatedState (makVrv::DtUniqueID id) const
 
virtual DtEntityType getEntityTypeFromUniqueID (makVrv::DtUniqueID id) const
 
virtual void selectItemsInScreenBox (makVrv::DtChannel &channel, int minX, int minY, int maxX, int maxY, const makVrv::DtSelectionManager::IdSet &mergeWith=makVrv::DtSelectionManager::IdSet(), bool requestTaskSets=true)
 
virtual bool isWithinScreenBounds (makVrv::DtChannel &, const makVrv::DtUniqueID &id, const makVrv::DtVrlinkSimulatedBaseState *, int minX, int minY, int maxX, int maxY) const
 
virtual makVrv::DtUniqueID sceneObjectIdFromElementId (makVrv::DtChannel &channel, const makVrv::DtUniqueID &elementID) const
 
virtual void setLastDatabaseLocation (const DtVector &)
 
virtual const DtVectorlastDatabaseLocation () const
 
virtual void setAllowNonVrfItemsToBeManipulated (bool)
 
virtual bool allowNonVrfItemsToBeManipulated () const
 
virtual void setAutomaticallSelectDeselectAggregateExpansionChanges (bool)
 
virtual bool automaticallSelectDeselectAggregateExpansionChanges () const
 
virtual void zoomToExtents (bool zoomEvenIfPrimaryAttachment=false) const
 
virtual void zoomToExtents (const std::vector< makVrv::DtUniqueID > &ids, bool zoomEvenIfPrimaryAttachment=false) const
 
virtual void zoomToExtents (makVrv::DtUniqueID, bool zoomEvenIfPrimaryAttachment=false) const
 
virtual void centerOn (const std::vector< makVrv::DtUniqueID > &ids) const
 
virtual void centerOn (makVrv::DtUniqueID) const
 
virtual void zoomToBoundingVolume (const DtVector &geometricCenter, double radius, bool maintainCurrentAltitude=true) const
 
virtual void setBlockAggregateSelectionChanges (bool)
 
bool blockAggregateSelectionChanges () const
 
virtual void showInformationFor (makVrv::DtElementID)
 
virtual void pushSelections (bool andClear=false)
 
virtual bool hasPushedSelections () const
 
virtual int pushSelectionsCount () const
 
virtual void popSelections (bool popOnly=false)
 
virtual void clearSelections ()
 
virtual void setEntityTypeBoxSelectable (const DtEntityType &, bool)
 
virtual bool entityTypeBoxSelectable (const DtEntityType &) const
 
virtual void setEntityUniqueIDBoxSelectable (makVrv::DtUniqueID, bool)
 
virtual bool entityUniqueIDBoxSelectable (makVrv::DtUniqueID) const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtVrfSelectionHandlerinstance (makVrv::DtDe &de)
 

Public Attributes

boost::signals2::signal< void(const
makVrv::DtSelectionManager::IdSet
&selected)> 
signal_currentSelectionChanged
 
boost::signals2::signal< void(const
DtVector &)> 
signal_lastDatabaseLocationSet
 
boost::signals2::signal< void(makVrv::DtElementID)> signal_showInformationFor
 
boost::signals2::signal< void()> signal_selectionPushed
 
boost::signals2::signal< void()> signal_selectionPopped
 
boost::signals2::signal< void()> signal_selectionAboutToBePopped
 

Protected Types

typedef std::vector
< makVrv::DtSelectionManager::IdSet
Selections
 

Protected Member Functions

virtual bool canBoxSelectEntity (const makVrv::DtUniqueID &id, const makVrv::DtVrlinkSimulatedBaseState *state) const
 
virtual void slot_onCurrentSelectionChanged (const makVrv::DtSelectionManager::IdSet &selected, const makVrv::DtSelectionManager::IdSet &deselected)
 
virtual void slot_onObjectEntryAdded (makVrv::DtSimObjectEntry &)
 
virtual void slot_onSimStateAdded (makVrv::DtSimObjectEntry &entry)
 
virtual void slot_onStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *)
 
virtual void slot_deInitialized (makVrv::DtDe &)
 
virtual void slot_onAttributesChanged (const makVrv::DtElementAttributeManager::EntryAttributesList &signalList)
 
virtual void completeAggregateSelectionChange (makVrv::DtSelectionManager::IdSet deselect, makVrv::DtSelectionManager::IdSet select)
 

Protected Attributes

makVrv::DtDemyDe
 
makVrv::DtSelectionManager::IdSet myLastSelection
 
makVrv::DtSignalConnectionManager myConnections
 
DtVrfStateViewCollectionManagermyStateViewCollectionManager
 
DtVector myLastDatabaseLocation
 
bool myAllowNonVrfItemsToBeManipulated
 
bool myBlockAggregateSelectionChanges
 
std::set< makVrv::DtUniqueIDmyEntityUniqueIDNotBoxSelectable
 
std::vector< DtEntityType > myEntityTypeNotBoxSelectable
 
Selections mySelections
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtVrfSelectionHandler::DtVrfSelectionHandler ( makVrv::DtDe )
virtual makVrf::DtVrfSelectionHandler::~DtVrfSelectionHandler ( )
virtual

Member Function Documentation

static DtVrfSelectionHandler& makVrf::DtVrfSelectionHandler::instance ( makVrv::DtDe de)
static

Returns instance of the DtVrfSelectionHandler.

virtual void makVrf::DtVrfSelectionHandler::currentSelectionChanged ( const makVrv::DtSelectionManager::IdSet selected)
virtual

Calls down to DtVrfTaskSetManager, DtVrfFormationRequestor and DtEmbeddedEntitiesListRequestor to request information for current selection.

virtual makVrv::DtSelectionManager::IdSet makVrf::DtVrfSelectionHandler::convertNamesToIds ( const std::vector< DtUUID > &  ) const
virtual

Converts the list of names to unique ids.

virtual makVrv::DtSelectionManager::IdSet makVrf::DtVrfSelectionHandler::convertNamesToIds ( const std::vector< std::string > &  ) const
virtual
virtual DtVector makVrf::DtVrfSelectionHandler::getLocationFromLaserState ( const DtLaserDesignatorState ) const
virtual

Given the laser state, get the location of the spot or the location of the attached object. Returned in geocentric.

virtual std::vector<DtUUID> makVrf::DtVrfSelectionHandler::getSelectedNames ( ) const
virtual

Returns a list of the currently selected names.

virtual std::vector<DtUUID> makVrf::DtVrfSelectionHandler::getSelectedNames ( const makVrv::DtSelectionManager::IdSet ) const
virtual
virtual std::vector<std::string> makVrf::DtVrfSelectionHandler::getSelectedNamesAsMarkingText ( ) const
virtual

Returns a list of the currently selected as marking text.

virtual std::vector<std::string> makVrf::DtVrfSelectionHandler::getSelectedNamesAsMarkingText ( const makVrv::DtSelectionManager::IdSet ) const
virtual
virtual std::vector<makVrv::DtSimEntry*> makVrf::DtVrfSelectionHandler::getSelectedEntries ( ) const
virtual

Returns a list of the currently selected sim entries.

virtual std::vector<makVrv::DtSimEntry*> makVrf::DtVrfSelectionHandler::getSelectedEntries ( const makVrv::DtSelectionManager::IdSet ) const
virtual
virtual bool makVrf::DtVrfSelectionHandler::selectionHasExtendedKeyAndValue ( const DtString keyword,
const DtString value 
) const
virtual

Returns true if every item in the current selection has the extended data keyword with the give value.

virtual void makVrf::DtVrfSelectionHandler::selectObjects ( const std::vector< DtUUID > &  names)
virtual

Selects all objects that match the given names.

virtual bool makVrf::DtVrfSelectionHandler::allObjectsAreVrfSimulated ( const makVrv::DtSelectionManager::IdSet ) const
virtual

Returns true if all objects in set are VRF simulated.

virtual bool makVrf::DtVrfSelectionHandler::allObjectsAreInSameVrfSession ( const makVrv::DtSelectionManager::IdSet ) const
virtual

Returns true if all objects are in the same session. If there is no session information for an object then it will be considered in this session.

virtual bool makVrf::DtVrfSelectionHandler::objectIsVrfSimulated ( makVrv::DtUniqueID  ) const
virtual

Returns true if specified object is VRF simulated.

virtual bool makVrf::DtVrfSelectionHandler::objectInSameVrfSession ( makVrv::DtUniqueID  ) const
virtual

Returns true if object is in the same VRF session.

virtual const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* makVrf::DtVrfSelectionHandler::getVrlinkSimulatedState ( makVrv::DtUniqueID  id) const
virtual
virtual DtEntityType makVrf::DtVrfSelectionHandler::getEntityTypeFromUniqueID ( makVrv::DtUniqueID  id) const
virtual

Returns the DtEntityType object associated with the DtUniqueID argument. if no entity type is found, it returns a nullType entity type.

virtual void makVrf::DtVrfSelectionHandler::selectItemsInScreenBox ( makVrv::DtChannel channel,
int  minX,
int  minY,
int  maxX,
int  maxY,
const makVrv::DtSelectionManager::IdSet mergeWith = makVrv::DtSelectionManager::IdSet(),
bool  requestTaskSets = true 
)
virtual

Selects all the items found within the bounding box as defined by the screen. z coordinate is meaningless. If resetCurrentSelection is false, keeps selection and adds new items to it. Using the supplied ID set, will merge in selection by inverting selected items (i.e. if one would be selected in the screen box, and it is selected in the supplied selection box, it will be deselected), or add new items.

virtual bool makVrf::DtVrfSelectionHandler::isWithinScreenBounds ( makVrv::DtChannel ,
const makVrv::DtUniqueID id,
const makVrv::DtVrlinkSimulatedBaseState ,
int  minX,
int  minY,
int  maxX,
int  maxY 
) const
virtual

Returns true if the current item is withing the supplied screen bounds.

virtual makVrv::DtUniqueID makVrf::DtVrfSelectionHandler::sceneObjectIdFromElementId ( makVrv::DtChannel channel,
const makVrv::DtUniqueID elementID 
) const
virtual
virtual void makVrf::DtVrfSelectionHandler::setLastDatabaseLocation ( const DtVector )
virtual

Sets the last database location. Will also signal the last database location has been changed.

virtual const DtVector& makVrf::DtVrfSelectionHandler::lastDatabaseLocation ( ) const
virtual

Returns the last database location set.

virtual void makVrf::DtVrfSelectionHandler::setAllowNonVrfItemsToBeManipulated ( bool  )
virtual

Set to true to allow non-Vrf items to be manipulated (act as simulated by vrf). Default is false.

virtual bool makVrf::DtVrfSelectionHandler::allowNonVrfItemsToBeManipulated ( ) const
virtual
virtual void makVrf::DtVrfSelectionHandler::setAutomaticallSelectDeselectAggregateExpansionChanges ( bool  )
virtual

Set whether or not to change aggregate selections when expanded/collapsed. Default is true.

virtual bool makVrf::DtVrfSelectionHandler::automaticallSelectDeselectAggregateExpansionChanges ( ) const
virtual
virtual void makVrf::DtVrfSelectionHandler::zoomToExtents ( bool  zoomEvenIfPrimaryAttachment = false) const
virtual

If items are selected and there are no attachments will zoom to the extents comprised of those elements. If there is an attachment will reset the camera to that attachment. If nothing is selected and their are no attachments will reset to center of terrain.

virtual void makVrf::DtVrfSelectionHandler::zoomToExtents ( const std::vector< makVrv::DtUniqueID > &  ids,
bool  zoomEvenIfPrimaryAttachment = false 
) const
virtual

Zooms to the extents of the ids given.

virtual void makVrf::DtVrfSelectionHandler::zoomToExtents ( makVrv::DtUniqueID  ,
bool  zoomEvenIfPrimaryAttachment = false 
) const
virtual

Zooms to the extent of the object with the given ID.

virtual void makVrf::DtVrfSelectionHandler::centerOn ( const std::vector< makVrv::DtUniqueID > &  ids) const
virtual

Move the camera to the origin of all the objects given the current zoom/orientation.

virtual void makVrf::DtVrfSelectionHandler::centerOn ( makVrv::DtUniqueID  ) const
virtual

Move the camera to the origin of the objects given the current zoom/orientation.

virtual void makVrf::DtVrfSelectionHandler::zoomToBoundingVolume ( const DtVector geometricCenter,
double  radius,
bool  maintainCurrentAltitude = true 
) const
virtual

Given a geocentric center and a radius, zoom to the extents at the center that will show that radius.

virtual void makVrf::DtVrfSelectionHandler::setBlockAggregateSelectionChanges ( bool  )
virtual
bool makVrf::DtVrfSelectionHandler::blockAggregateSelectionChanges ( ) const
virtual void makVrf::DtVrfSelectionHandler::showInformationFor ( makVrv::DtElementID  )
virtual

Simply emits the signal to show information for the given item. If no one is connected to this signal then information will not be shown.

virtual void makVrf::DtVrfSelectionHandler::setEntityTypeBoxSelectable ( const DtEntityType &  ,
bool   
)
virtual

Add/remove object ids or types for box selection. Entity types will match the pattern supplied. By default local weather objects are not box selectable.

virtual bool makVrf::DtVrfSelectionHandler::entityTypeBoxSelectable ( const DtEntityType &  ) const
virtual

Add/remove object ids or types for box selection. Entity types will match the pattern supplied. By default local weather objects are not box selectable.

virtual void makVrf::DtVrfSelectionHandler::setEntityUniqueIDBoxSelectable ( makVrv::DtUniqueID  ,
bool   
)
virtual

Add/remove object ids or types for box selection. Entity types will match the pattern supplied. By default local weather objects are not box selectable.

virtual bool makVrf::DtVrfSelectionHandler::entityUniqueIDBoxSelectable ( makVrv::DtUniqueID  ) const
virtual

Add/remove object ids or types for box selection. Entity types will match the pattern supplied. By default local weather objects are not box selectable.

virtual void makVrf::DtVrfSelectionHandler::pushSelections ( bool  andClear = false)
virtual

Pushes (and optionally clears) the current selection.

virtual bool makVrf::DtVrfSelectionHandler::hasPushedSelections ( ) const
virtual

If it has any pushed selections.

virtual int makVrf::DtVrfSelectionHandler::pushSelectionsCount ( ) const
virtual

Number of pushed selections.

virtual void makVrf::DtVrfSelectionHandler::popSelections ( bool  popOnly = false)
virtual

Pops the last pushed selection.

virtual void makVrf::DtVrfSelectionHandler::clearSelections ( )
virtual

Clears the currently push selections with restoring.

virtual bool makVrf::DtVrfSelectionHandler::canBoxSelectEntity ( const makVrv::DtUniqueID id,
const makVrv::DtVrlinkSimulatedBaseState state 
) const
protectedvirtual

Whether or not the entity can be box selected. By default weather areas cannot be box selected.

virtual void makVrf::DtVrfSelectionHandler::slot_onCurrentSelectionChanged ( const makVrv::DtSelectionManager::IdSet selected,
const makVrv::DtSelectionManager::IdSet deselected 
)
protectedvirtual
virtual void makVrf::DtVrfSelectionHandler::slot_onObjectEntryAdded ( makVrv::DtSimObjectEntry )
protectedvirtual
virtual void makVrf::DtVrfSelectionHandler::slot_onSimStateAdded ( makVrv::DtSimObjectEntry entry)
protectedvirtual

When a state is added, if there is a base vrlink state and it does not have the marking text or entity type, reforce the update.

virtual void makVrf::DtVrfSelectionHandler::slot_onStateViewUpdated ( makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  )
protectedvirtual
virtual void makVrf::DtVrfSelectionHandler::slot_deInitialized ( makVrv::DtDe )
protectedvirtual
virtual void makVrf::DtVrfSelectionHandler::slot_onAttributesChanged ( const makVrv::DtElementAttributeManager::EntryAttributesList signalList)
protectedvirtual
virtual void makVrf::DtVrfSelectionHandler::completeAggregateSelectionChange ( makVrv::DtSelectionManager::IdSet  deselect,
makVrv::DtSelectionManager::IdSet  select 
)
protectedvirtual

Member Data Documentation

boost::signals2::signal<void (const makVrv::DtSelectionManager::IdSet& selected)> makVrf::DtVrfSelectionHandler::signal_currentSelectionChanged
boost::signals2::signal<void (const DtVector&)> makVrf::DtVrfSelectionHandler::signal_lastDatabaseLocationSet
boost::signals2::signal<void (makVrv::DtElementID)> makVrf::DtVrfSelectionHandler::signal_showInformationFor
boost::signals2::signal<void ()> makVrf::DtVrfSelectionHandler::signal_selectionPushed
boost::signals2::signal<void ()> makVrf::DtVrfSelectionHandler::signal_selectionPopped
boost::signals2::signal<void ()> makVrf::DtVrfSelectionHandler::signal_selectionAboutToBePopped
makVrv::DtDe& makVrf::DtVrfSelectionHandler::myDe
protected
makVrv::DtSelectionManager::IdSet makVrf::DtVrfSelectionHandler::myLastSelection
protected
makVrv::DtSignalConnectionManager makVrf::DtVrfSelectionHandler::myConnections
protected
DtVrfStateViewCollectionManager* makVrf::DtVrfSelectionHandler::myStateViewCollectionManager
protected
DtVector makVrf::DtVrfSelectionHandler::myLastDatabaseLocation
protected
bool makVrf::DtVrfSelectionHandler::myAllowNonVrfItemsToBeManipulated
protected
bool makVrf::DtVrfSelectionHandler::myBlockAggregateSelectionChanges
protected
std::set<makVrv::DtUniqueID> makVrf::DtVrfSelectionHandler::myEntityUniqueIDNotBoxSelectable
protected
std::vector<DtEntityType> makVrf::DtVrfSelectionHandler::myEntityTypeNotBoxSelectable
protected
Selections makVrf::DtVrfSelectionHandler::mySelections
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)