VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
DtUiAutoConnectionElement Class Reference

UI Element which automatically creates connections between specified systems. More...

Inheritance diagram for DtUiAutoConnectionElement:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtUiAutoConnectionElement (const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
 Constructor.
virtual ~DtUiAutoConnectionElement ()
 Destructor.
 DtUiAutoConnectionElement (const DtUiAutoConnectionElement &orig)
 Copy constructor.
DtUiAutoConnectionElementoperator= (const DtUiAutoConnectionElement &orig)
 Assignment operator.
virtual void objectParametersModified ()
 Calls updatesensorConnections() and updateSensorConnections().
virtual QWidgetcreateControls (QWidget *parent)
 Creates and returns the non-label part of the element.

Protected Member Functions

virtual const
DtComponentSystemDefinition
lookupSystemDefinition (const DtComponentSystemDescriptor *descriptor) const
virtual QWidgetcreateDataEntryElement (QWidget *)
virtual bool updateConnections ()
 Checks and updates connections between any applicable systems on the entity.
virtual std::list< DtSymbolStringsourceSystems () const
virtual std::list< DtSymbolStringdestinationSystems () const
virtual bool checkExistingConnection (const DtSymbolString &sourceName, const DtSymbolString &destinationName) const
 Checks for an existing connection between the two specified systems.
virtual void addConnection (const DtSymbolString &sourceName, const DtSymbolString &destinationName) const
 Adds a new connection from the source to the destination.
virtual bool removeDanglingConnections ()
 Goes though the connections list and removes any connections that don't have a source and/or destination, and that meet the name requirements for this UI element.
virtual bool systemOrComponentExists (const DtString &name)
virtual void updateDisplayLabel ()
 Updates the label displayed on the GUI with the current info about the controller.
virtual DtUiElementclone ()
virtual void setFromParameters (DtReaderWriter *parentRw)
virtual
DtReaderWriterRegistryData
value (DtReaderWriter *parentRw)
 Seeds myValue and myBackupValue if not set.

Protected Attributes

DtRwString mySourceCategory
DtRwString mySourcePortName
DtRwString myDestinationCategory
DtRwString myDestinationPortName
QLabelmyInfoLabel
DtConnectionDescriptorListmyConnectionList
DtVrfObjectParametersmyObjectParameters

Detailed Description

UI Element which automatically creates connections between specified systems.


Constructor & Destructor Documentation

DtUiAutoConnectionElement::DtUiAutoConnectionElement ( const DtString name,
DtReaderWriterRegistry *const  parentRegistry = NULL 
)

Constructor.

Destructor.

Copy constructor.


Member Function Documentation

DtUiAutoConnectionElement& DtUiAutoConnectionElement::operator= ( const DtUiAutoConnectionElement orig)

Assignment operator.

Calls updatesensorConnections() and updateSensorConnections().

Reimplemented from DtUiElement.

virtual QWidget* DtUiAutoConnectionElement::createControls ( QWidget parent) [virtual]

Creates and returns the non-label part of the element.

Reimplemented from DtUiElement.

virtual const DtComponentSystemDefinition* DtUiAutoConnectionElement::lookupSystemDefinition ( const DtComponentSystemDescriptor descriptor) const [protected, virtual]
virtual QWidget* DtUiAutoConnectionElement::createDataEntryElement ( QWidget ) [protected, virtual]

Reimplemented from DtUiElement.

virtual bool DtUiAutoConnectionElement::updateConnections ( ) [protected, virtual]

Checks and updates connections between any applicable systems on the entity.

Returns:
True if any changes are made.
virtual std::list<DtSymbolString> DtUiAutoConnectionElement::sourceSystems ( ) const [protected, virtual]
Returns:
A list of the system names that are connection sources for this UI element. All these systems will be the correct sourceCategory and have an output of the appropriate name.
virtual std::list<DtSymbolString> DtUiAutoConnectionElement::destinationSystems ( ) const [protected, virtual]
Returns:
A list of the system names that are connection destinations for this UI element. All these systems will be the correct destinationCategory and have an input of the appropriate name.
virtual bool DtUiAutoConnectionElement::checkExistingConnection ( const DtSymbolString sourceName,
const DtSymbolString destinationName 
) const [protected, virtual]

Checks for an existing connection between the two specified systems.

Uses the port names specified in this UI element.

virtual void DtUiAutoConnectionElement::addConnection ( const DtSymbolString sourceName,
const DtSymbolString destinationName 
) const [protected, virtual]

Adds a new connection from the source to the destination.

Goes though the connections list and removes any connections that don't have a source and/or destination, and that meet the name requirements for this UI element.

It does not remove dangling connections that have names that don't match the source/destination name for this element.

Returns:
True if any changes are made.
virtual bool DtUiAutoConnectionElement::systemOrComponentExists ( const DtString name) [protected, virtual]
Returns:
True if a system, actuator, controller, or sensor with the specified name was found.
virtual void DtUiAutoConnectionElement::updateDisplayLabel ( ) [protected, virtual]

Updates the label displayed on the GUI with the current info about the controller.

Should be called after every change to the controller.

virtual DtUiElement* DtUiAutoConnectionElement::clone ( ) [protected, virtual]

Implements DtUiElement.

virtual void DtUiAutoConnectionElement::setFromParameters ( DtReaderWriter parentRw) [protected, virtual]

Reimplemented from DtUiElement.

virtual DtReaderWriterRegistryData* DtUiAutoConnectionElement::value ( DtReaderWriter parentRw) [protected, virtual]

Seeds myValue and myBackupValue if not set.

Returns myValue based on myReaderWriterName

Reimplemented from DtUiElement.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)