VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
DtUiElementEvent Class Reference

The DtUiElement class is the base for which all UI elements are defined. More...

Public Types

enum  DtUiElementEventTypes {
  DtUiElementTypeUnknown = 0, DtUiElementItemExpand = 1, DtUiElementItemCollapse = 2, DtUiElementHierarchySelectionChanged = 3,
  DtUiElementAddedToHierarchy = 5, DtUiElementRemovedFromHierarchy = 6, DtUiElementMovedInHierarchy = 7, DtUiElementReplacedInHierarchy = 8,
  DtUiElementForceChanged = 9, DtUiElementPositionModified = 12, DtUiElementPositionDestroyed = 13, DtUiBoundingVolumeModified = 14,
  DtUiCanvasInitialized = 15, DtUiCreateController = 19, DtUiCleanup = 20, DtUiElementHierarchyChanged = 21,
  DtUiEnterEditMode = 22, DtUiLeaveEditMode = 23, DtUiSupportPointsModified = 24, DtUiPreSaveEvent = 25,
  DtSystemsRemoved = 26, DtUiSuportPointsCalculated = 27, DtUiBoundingVolumeCalculated = 28, DtUiCalculateBoundingVolume = 29,
  DtUiCalculateSupportPoints = 30, DtUiMarkingChanged = 31, DtUiChangeTrailEffect = 32, DtUiStartSimulation = 33,
  DtUiSetSpeedPercentage = 34, DtUiSystemParameterDataChanged = 35, DtUiAffectGui = 36, DtUiDetonationPowerChanged = 37,
  DtUiDamageTableChanged = 38, DtUiHitTableChanged = 39, DtUiElementDataChanged = 40, DtUiAmmunitionChanged = 41,
  DtUiHealthFix = 42, DtUiIconListsChanged = 43, DtUiSystemEvent = 44
}

Public Member Functions

 DtUiElementEvent (DtUiElement *owner=0, DtUiElementEventTypes type=DtUiElementTypeUnknown)
 DtUiElementEvent (const DtUiElementEvent &orig)
DtUiElementEventoperator= (const DtUiElementEvent &rhs)
DtUiElementowner () const
DtUiElementEventTypes type () const
void setType (DtUiElementEventTypes t)
void setValue (const QVariant &val)
const QVariant & value () const

Protected Attributes

DtUiElementmyOwner
QVariant myValue
DtUiElementEventTypes myType

Detailed Description

The DtUiElement class is the base for which all UI elements are defined.

If you wish to create a new UI element, you must subclass this item and:

1) Register is i the uiElement factory: DtUiElement()::elementFactory()[<reader_writer_type>] = boost::bind(&MyElement::CreatorFunction);

2) Add code to take information from the descriptor and place it into your element void DtUiStringElement::setFromParameters(DtReaderWriter* parentRw) { DtReaderWriterRegistryData* val = value(parentRw);

if (val) { DtRwString* str = dynamic_cast<DtRwString*>(val->readerWriter());

if (str) { myLineEdit->blockSignals(true); myLineEdit->setText(QString::fromLocal8Bit(str->c_str())); myLineEdit->blockSignals(false); } }

DtUiElement::setFromParameters(parentRw); }

3) Create code to update the parameter descriptor element when your element changes void DtUiStringElement::elementChanged() { if (myValue) { DtRwString* str = dynamic_cast<DtRwString*>(myValue->readerWriter());

if (str) { str = (const char)myLineEdit->text().toLocal8Bit(); } }

DtUiElement::elementChanged(); }

In order to use the units class, you muse add dynamic properties in designer for the particular field. Add "display-units" and/or "source-units". Other keywords will be represented at specific uiElement levels

The object names in the designer .ui will match to the reader/writer names of the data elements, having the

Member Enumeration Documentation

Enumerator:
DtUiElementTypeUnknown 
DtUiElementItemExpand 
DtUiElementItemCollapse 
DtUiElementHierarchySelectionChanged 
DtUiElementAddedToHierarchy 
DtUiElementRemovedFromHierarchy 
DtUiElementMovedInHierarchy 
DtUiElementReplacedInHierarchy 
DtUiElementForceChanged 
DtUiElementPositionModified 
DtUiElementPositionDestroyed 
DtUiBoundingVolumeModified 
DtUiCanvasInitialized 
DtUiCreateController 
DtUiCleanup 
DtUiElementHierarchyChanged 
DtUiEnterEditMode 
DtUiLeaveEditMode 
DtUiSupportPointsModified 
DtUiPreSaveEvent 
DtSystemsRemoved 
DtUiSuportPointsCalculated 
DtUiBoundingVolumeCalculated 
DtUiCalculateBoundingVolume 
DtUiCalculateSupportPoints 
DtUiMarkingChanged 
DtUiChangeTrailEffect 
DtUiStartSimulation 
DtUiSetSpeedPercentage 
DtUiSystemParameterDataChanged 
DtUiAffectGui 
DtUiDetonationPowerChanged 
DtUiDamageTableChanged 
DtUiHitTableChanged 
DtUiElementDataChanged 
DtUiAmmunitionChanged 
DtUiHealthFix 
DtUiIconListsChanged 
DtUiSystemEvent 

Constructor & Destructor Documentation

DtUiElementEvent::DtUiElementEvent ( DtUiElement owner = 0,
DtUiElementEventTypes  type = DtUiElementTypeUnknown 
)
inline
DtUiElementEvent::DtUiElementEvent ( const DtUiElementEvent orig)
inline

Member Function Documentation

DtUiElementEvent& DtUiElementEvent::operator= ( const DtUiElementEvent rhs)
inline

References myOwner, myType, and myValue.

DtUiElement* DtUiElementEvent::owner ( ) const
inline
DtUiElementEventTypes DtUiElementEvent::type ( void  ) const
inline
void DtUiElementEvent::setType ( DtUiElementEventTypes  t)
inline
void DtUiElementEvent::setValue ( const QVariant &  val)
inline
const QVariant& DtUiElementEvent::value ( ) const
inline

Member Data Documentation

DtUiElement* DtUiElementEvent::myOwner
protected

Referenced by operator=().

QVariant DtUiElementEvent::myValue
protected

Referenced by operator=().

DtUiElementEventTypes DtUiElementEvent::myType
protected

Referenced by operator=().


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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)