VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtUiElement Class Reference
Inheritance diagram for DtUiElement:
Inheritance graph
[legend]

Public Member Functions

 DtUiElement (const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
 Constructor.
virtual ~DtUiElement ()
 Destructor.
 DtUiElement (const DtUiElement &orig)
 Copy constructor.
DtUiElementoperator= (const DtUiElement &orig)
 Assignment operator.
virtual const DtStringobjectName () const
virtual void setTitle (const DtString &s)
virtual void setObjectName (const DtString &s)
virtual void mergeInto (DtUiForParameter *)
virtual DtUiElementelementNamed (const DtString &)
virtual bool mergeInto (const DtString &readerWriterName, bool after, DtUiElement *element)
virtual void init ()
virtual DtString sourceReaderWriterName () const
virtual void setSourceReaderWriterName (const DtString &name)
virtual DtString displayUnits () const
virtual void setDisplayUnits (const DtString &units)
virtual DtString sourceUnits () const
virtual void setSourceUnits (const DtString &units)
virtual DtString tooltip () const
virtual void setTooltip (const DtString &text)
virtual void setFromSystemParameterData (const DtSystemParameterData *data)
 Sets data of this UiElement from the specified system parameter data.
virtual void objectParametersModified ()
 This method is called any time that any of the parameters for the object are modified.
virtual void processUiEvent (const DtUiElementEvent &)
 Process ui event. Default does nothing.
DtReaderWriterRegistryDatavalue () const
DtReaderWriterRegistryDatabackupValue () const
virtual void initForControls ()
 Initializes element before creating controls. Sets parameter values to NULL.
virtual void setModelModified (DtModelSetEntry *)
 Called when the model is modified. Default is no-op.
DtUiElementSignalHandlersignalHandler ()
virtual void uiState (QMap< QString, QVariant > &state) const
 State is a dictionary of a string that uniquely identifies a control and its state.
virtual void setUiState (const QMap< QString, QVariant > &)
virtual void sendUpdatedUiState ()
 Sends out updated ui state with message.
virtual DtUiElementclone ()=0
virtual bool isModified () const
virtual void decorateElement ()
 Sets element decoration depending on the isModified state of the element.
virtual QWidgetcreateLabelWidget (QWidget *parent)
 Create and return the label widget for this element.
virtual QWidgetcreateControls (QWidget *parent)
 Creates and returns the non-label part of the element.
virtual void setFromParameters (DtReaderWriter *parentRw)
virtual void elementChanged ()
virtual void addElementChangedCallback (DtElementChangedCallbackFcn f, void *usr)
virtual void removeElementChangedCallback (DtElementChangedCallbackFcn f, void *usr)
virtual void removeAllCallbacks ()
virtual
DtReaderWriterRegistryData
createBackup (const DtString &backupName)
 Creates a backup entry in the RW structure for the current value of this element.
virtual bool restoreFromBackup (const DtString &backupName, bool deleteBackup=false)
 Restores this element from a backup created with the specified name.
virtual void deleteBackup (const DtString &backupName)
 Deletes backup entries previously created with createBackup, with the specified name.
const DtCallbackList
< DtUiElement * > & 
elementChangedCallbackList () const
void setElementChangedCallbackList (const DtCallbackList< DtUiElement * > &)
virtual
DtReaderWriterRegistryData
value (DtReaderWriter *parentRw)
 Seeds myValue and myBackupValue if not set.
virtual
DtReaderWriterRegistryData
value (DtReaderWriter *parentRw, const DtString &rw, DtReaderWriterRegistryData **backupValue) const
virtual bool centerElement () const
 Returns whether or not to center the element on the display.
virtual void finalizeSize (QWidget *)
 Adjusts size of child by looking at min/max size. If any values are non-zero, sets to that value.
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 default constructor
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 real constructor Setting the readonly flag prevents object from writing itself to the stream.
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 assignment operator
virtual ~DtReaderWriter ()
 destructor
virtual void putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Top level call to write itself to file.
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Top level to read itself from an input stream.
virtual void writeSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry.
virtual DtSymbolString name () const
 Accessor for name of this readable/writable object.
virtual void addAlias (const DtSymbolString &alias)
 Add an alias as an alternative name for this object.
virtual bool hasAlias (const DtSymbolString &alias)
virtual const aliasContaineraliases () const
virtual void setReadonly (bool flag)
 Set read-only flag.
virtual bool isReadonly () const
virtual bool variableIsBound () const
virtual void unbindVariable ()
 Sets the myVariableIsBound flag to false.
virtual void setName (const DtString &)
 Set the name of the object.
virtual const char * readerWriterType () const
 Used to supply a string type that this reader writer type is.
virtual DtString prettyPrint () const
 Routine to return a human readable form of the reader/writer variable.
virtual void bindVariables (DtVariableBindingsList variableBindings)
 Runs a variable binding pass on this reader writer and any of its children.
virtual std::list
< DtVariableNameType
unboundVariables () const
bool invalid () const
virtual bool hasChild (const DtReaderWriter *p) const
 Returns true if this variable has a child p in it's chain.
virtual void setValueSpecified (bool specified, bool recurse=false)
 The specified flags are used for optional values.
virtual bool valueSpecified () const
 The specified flags are used for optional values.
virtual bool isVariableReference () const
 Specifies whether or not this reader writer is really a variable that is specified elsewhere.
virtual void setIsVariableReference (bool value)
virtual DtSymbolString variableName () const
 The variable name, if this object is a variable reference.
virtual void setVariableName (const DtSymbolString variableName)
 The variable name, if this object is a variable reference.
const DtReaderWriterRegistryregistry () const
 Collection of child DtReaderWriter nodes owned by this object.
DtReaderWriterRegistryregistry ()
 Collection of child DtReaderWriter nodes owned by this object.

Static Public Member Functions

static void registerUiTypes ()
 Factory methods for creating ui elements.
static DtUiElementcreateUiElement (const DtString &type, const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
static DtReaderWriterFactoryelementFactory ()
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (FILE *fp, int indentLevel)
static const
DtVariableBindingsList
nullVariableReference ()
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
static const DtFilename & appPath ()
 Gets the current working directory.
static DtReaderWriterFactoryfactory ()

Protected Member Functions

virtual QWidgetcreateDataEntryElement (QWidget *)
virtual double sourceToDestination (double) const
virtual double destinationToSource (double) const
virtual QString units () const
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 Copies values from the specified DtReaderWriter.
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 Checks to see if this RW object is a variable reference that can be bound using the provided bindings.
virtual void putData (FILE *fp, int indentLevel=0)
 Deriving class overrides these to get/put class specific data.
virtual DtlObjPtr getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 Deriving class overrides these to get/put class specific data.

Protected Attributes

DtRwString myReaderWriterName
DtRwString myTitle
DtRwString myDisplayUnits
DtRwString mySourceUnits
DtRwString myObjectName
DtRwString myTooltip
DtRwBoolean myCenterElement
DtRwInt myMaximumWidth
DtRwInt myMaximumHeight
DtRwInt myMinimumWidth
DtRwInt myMinimumHeight
DtReaderWriterRegistryDatamyValue
DtReaderWriterRegistryDatamyBackupValue
DtUiElementSignalHandler mySignalHandler
DtRwBoolean mySetVisible
bool myIsNew
QWidgetmyLabel
DtCallbackList< DtUiElement * > myElementChangedCallbackList
DtUnit mySource
DtUnit myDestination
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
DtReaderWriterRegistry myRegistry
bool myValueSpecified
bool myReadOnlyFlag
bool myIsVariableReference
DtSymbolString myVariableName
bool myVariableIsBound
aliasContainer myAliases
 Container for the aliases which represent alternative names for the object.
bool myInvalid
 Set to true if there is a problem reading this item.

Static Protected Attributes

static DtReaderWriterFactory theFactory
static DtUnitConverterFactory theConversionFactory
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
static DtGetSelfCallbackInfo thePostGetSelfCallback
static DtPutSelfCallbackInfo thePrePutSelfCallback
static const DtVariableBindingsList theEmptyVariableBindingsList
static DtReaderWriterFactory theFactory

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType

Constructor & Destructor Documentation

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

Constructor.

virtual DtUiElement::~DtUiElement ( )
virtual

Destructor.

DtUiElement::DtUiElement ( const DtUiElement orig)

Copy constructor.

Member Function Documentation

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

Assignment operator.

virtual const DtString& DtUiElement::objectName ( ) const
virtual

Reimplemented in DtUiLayoutElement.

virtual void DtUiElement::setTitle ( const DtString s)
virtual

Reimplemented in DtLayoutElement.

virtual void DtUiElement::setObjectName ( const DtString s)
virtual
virtual void DtUiElement::mergeInto ( DtUiForParameter )
virtual
virtual DtUiElement* DtUiElement::elementNamed ( const DtString )
virtual

Reimplemented in DtUiLayoutElement.

virtual bool DtUiElement::mergeInto ( const DtString readerWriterName,
bool  after,
DtUiElement element 
)
virtual

Reimplemented in DtUiLayoutElement.

virtual void DtUiElement::init ( )
virtual

Reimplemented in DtUiSystemElement.

virtual DtString DtUiElement::sourceReaderWriterName ( ) const
virtual
virtual void DtUiElement::setSourceReaderWriterName ( const DtString name)
virtual
virtual DtString DtUiElement::displayUnits ( ) const
virtual
virtual void DtUiElement::setDisplayUnits ( const DtString units)
virtual
virtual DtString DtUiElement::sourceUnits ( ) const
virtual
virtual void DtUiElement::setSourceUnits ( const DtString units)
virtual
virtual DtString DtUiElement::tooltip ( ) const
virtual
virtual void DtUiElement::setTooltip ( const DtString text)
virtual
virtual void DtUiElement::setFromSystemParameterData ( const DtSystemParameterData data)
virtual

Sets data of this UiElement from the specified system parameter data.

Sets things like sourceUnits, displayUnits, etc.

Reimplemented in DtUiPositionElement, and DtUiArtPartElement.

virtual void DtUiElement::objectParametersModified ( )
inlinevirtual

This method is called any time that any of the parameters for the object are modified.

It is not called for the UI element that caused the modification itself, to avoid infinite loops. Default implementation does nothing.

Reimplemented in DtUiLayoutElement, DtUiAutoContactFusionElement, DtUiModelResolutionConfigurationElement, DtUiAutoConnectionElement, and DtUiAutoTargetSelectionElement.

virtual void DtUiElement::processUiEvent ( const DtUiElementEvent )
inlinevirtual
DtReaderWriterRegistryData * DtUiElement::value ( ) const
inline

References myValue.

DtReaderWriterRegistryData * DtUiElement::backupValue ( ) const
inline

References myBackupValue.

virtual void DtUiElement::initForControls ( )
virtual

Initializes element before creating controls. Sets parameter values to NULL.

virtual void DtUiElement::setModelModified ( DtModelSetEntry )
virtual

Called when the model is modified. Default is no-op.

Reimplemented in DtUiLayoutElement, DtUiAggregateFormationEditor, and DtUiAggregateCompositionEditor.

DtUiElementSignalHandler* DtUiElement::signalHandler ( )
inline
virtual void DtUiElement::uiState ( QMap< QString, QVariant > &  state) const
virtual

State is a dictionary of a string that uniquely identifies a control and its state.

Reimplemented in DtUiLayoutElement, and DtUiAggregateFormationEditor.

virtual void DtUiElement::setUiState ( const QMap< QString, QVariant > &  )
virtual
virtual void DtUiElement::sendUpdatedUiState ( )
virtual

Sends out updated ui state with message.

static void DtUiElement::registerUiTypes ( )
static

Factory methods for creating ui elements.

static DtUiElement* DtUiElement::createUiElement ( const DtString type,
const DtString name,
DtReaderWriterRegistry parentRegistry = NULL 
)
static
virtual DtUiElement* DtUiElement::clone ( )
pure virtual
virtual bool DtUiElement::isModified ( ) const
virtual
virtual void DtUiElement::decorateElement ( )
virtual
virtual QWidget* DtUiElement::createLabelWidget ( QWidget parent)
virtual
virtual QWidget* DtUiElement::createControls ( QWidget parent)
virtual
virtual void DtUiElement::setFromParameters ( DtReaderWriter parentRw)
virtual
virtual void DtUiElement::elementChanged ( )
virtual
virtual void DtUiElement::addElementChangedCallback ( DtElementChangedCallbackFcn  f,
void *  usr 
)
virtual

Reimplemented in DtUiLayoutElement.

virtual void DtUiElement::removeElementChangedCallback ( DtElementChangedCallbackFcn  f,
void *  usr 
)
virtual

Reimplemented in DtUiLayoutElement.

virtual void DtUiElement::removeAllCallbacks ( )
virtual

Reimplemented in DtUiLayoutElement.

virtual DtReaderWriterRegistryData* DtUiElement::createBackup ( const DtString backupName)
virtual

Creates a backup entry in the RW structure for the current value of this element.

The backup is named with the specified name.

Returns
The pointer to the backup RW entry.

Reimplemented in DtUiPositionElement.

virtual bool DtUiElement::restoreFromBackup ( const DtString backupName,
bool  deleteBackup = false 
)
virtual

Restores this element from a backup created with the specified name.

Optionally deletes the backup entry after restoring.

Returns
True if successfully restored.
virtual void DtUiElement::deleteBackup ( const DtString backupName)
virtual

Deletes backup entries previously created with createBackup, with the specified name.

Reimplemented in DtUiPositionElement.

const DtCallbackList< DtUiElement * > & DtUiElement::elementChangedCallbackList ( ) const
inline
void DtUiElement::setElementChangedCallbackList ( const DtCallbackList< DtUiElement * > &  lst)
inline
virtual DtReaderWriterRegistryData* DtUiElement::value ( DtReaderWriter parentRw)
virtual

Seeds myValue and myBackupValue if not set.

Returns myValue based on myReaderWriterName

Reimplemented in DtUiAutoConnectionElement, DtUiSystemElement, DtUiAutoContactFusionElement, DtUiAutoTargetSelectionElement, DtUiMultiSystemElement, and DtUiSingleSystemElement.

virtual DtReaderWriterRegistryData* DtUiElement::value ( DtReaderWriter parentRw,
const DtString rw,
DtReaderWriterRegistryData **  backupValue 
) const
virtual
static DtReaderWriterFactory* DtUiElement::elementFactory ( )
static
virtual bool DtUiElement::centerElement ( ) const
virtual

Returns whether or not to center the element on the display.

virtual void DtUiElement::finalizeSize ( QWidget )
virtual

Adjusts size of child by looking at min/max size. If any values are non-zero, sets to that value.

virtual QWidget* DtUiElement::createDataEntryElement ( QWidget )
protectedvirtual
virtual double DtUiElement::sourceToDestination ( double  ) const
protectedvirtual
virtual double DtUiElement::destinationToSource ( double  ) const
protectedvirtual
virtual QString DtUiElement::units ( ) const
protectedvirtual

Member Data Documentation

DtReaderWriterFactory DtUiElement::theFactory
staticprotected
DtRwString DtUiElement::myReaderWriterName
protected
DtRwString DtUiElement::myTitle
protected

Referenced by DtLayoutElement::title().

DtRwString DtUiElement::myDisplayUnits
protected
DtRwString DtUiElement::mySourceUnits
protected
DtRwString DtUiElement::myObjectName
protected
DtRwString DtUiElement::myTooltip
protected
DtRwBoolean DtUiElement::myCenterElement
protected
DtRwInt DtUiElement::myMaximumWidth
protected
DtRwInt DtUiElement::myMaximumHeight
protected
DtRwInt DtUiElement::myMinimumWidth
protected
DtRwInt DtUiElement::myMinimumHeight
protected
DtReaderWriterRegistryData* DtUiElement::myValue
protected

Referenced by value().

DtReaderWriterRegistryData* DtUiElement::myBackupValue
protected

Referenced by backupValue().

DtUiElementSignalHandler DtUiElement::mySignalHandler
protected
DtRwBoolean DtUiElement::mySetVisible
protected
bool DtUiElement::myIsNew
protected
QWidget* DtUiElement::myLabel
protected
DtCallbackList<DtUiElement*> DtUiElement::myElementChangedCallbackList
protected
DtUnit DtUiElement::mySource
protected
DtUnit DtUiElement::myDestination
protected
DtUnitConverterFactory DtUiElement::theConversionFactory
staticprotected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)