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

For validation, add lower_bound and upper_bound properties to set a lower and upper bound. More...

Inheritance diagram for DtUiIntegerElement:
Inheritance graph
[legend]

Public Member Functions

 DtUiIntegerElement (makVrv::DtDe &)
 Constructor.
virtual ~DtUiIntegerElement ()
 Destructor.
virtual void setValue (int)
 Sets/gets values.
virtual int value () const
- Public Member Functions inherited from DtUiMapAwareElement
 DtUiMapAwareElement (makVrv::DtDe &)
 Constructor.
virtual ~DtUiMapAwareElement ()
 Destructor.
virtual void init (QWidget *sourceWidget, QWidget *label, const std::vector< DtReaderWriter * > &sourceData, const std::vector< DtReaderWriter * > &backup, DtElementChangedCallbackFcn f)
virtual void init (QWidget *sourceWidget, QWidget *label, DtReaderWriter *sourceData, DtReaderWriter *backup, DtElementChangedCallbackFcn f)
- Public Member Functions inherited from DtUiElement
 DtUiElement (makVrv::DtDe &)
 Constructor.
virtual ~DtUiElement ()
 Destructor.
virtual bool blockSignals (bool)
virtual void init (QWidget *widget, QWidget *label, const DtObjectType &, const DtString &platformType, DtElementChangedCallbackFcn=boost::bind(&DtUiElement::theNullFunction, _1))
virtual DtString displayUnits () const
virtual void setDisplayUnits (const DtString &units)
virtual void setLabelText (const QString &)
virtual DtString sourceUnits () const
virtual void setSourceUnits (const DtString &units)
virtual void setFromSystemParameterData (const DtSystemParameterData *data, const DtComponentSystemDefinition *)
 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 setModelModified (DtModelSetEntry *)
 Called when the model is modified. Default is no-op.
virtual DtString uniqueName () const
 Returns a unique name for this element.
virtual bool supportsSystems () const
 Returns true if this element supports systes.
virtual const DtStringplatformType () const
 Returns the type of platform this entity represents.
virtual void setPlatformType (const DtString &)
 Sets the type of platform for this entity.
virtual void setObjectTypes (const std::vector< DtObjectType > &)
 Sets the object type this element represents.
virtual void aboutToShow ()
 Called when about to show as part of a properties dialog. Default is no-op.
virtual bool isModified () const
virtual void setFromParameters (DtReaderWriter *parentRw)
 Calls setFromParameters with std::vector of parameter.
virtual bool restoreFromBackup ()
 Restores this element from a backup created with the specified name.
const std::vector< DtObjectType > & objectTypes () const
virtual void sendEvent (const DtUiElementEvent &)
virtual bool allValuesTheSame () const
virtual bool isMixedValue () const
 If widget is line edit and the value is mixedText returns true, else the subclass will need to return this value.
virtual void setEnabled (bool)
 If this item is not enabled it cannot be modified.
virtual bool enabled () const

Static Public Member Functions

static DtUiElementCreatorFunction (makVrv::DtDe &)

Protected Types

typedef std::map< DtString, int > DisplayLabelToSourceValueMap

Protected Slots

virtual void recalculateAsRestOf ()
- Protected Slots inherited from DtUiMapAwareElement
virtual void setupMapValuesFromKey ()
- Protected Slots inherited from DtUiElement
virtual void enableIfChecked ()
 Connected to if the enable_if_checked property is set, and there is a matching check box for the enable_if_checked property.
virtual void disableIfChecked ()
 Connected to if the disable_if_checked property is set, and there is a matching check box for the disable_if_checked property.

Protected Member Functions

virtual void createControls (QWidget *)
 If additional widgets or connections need to be made do it here. The parent is the myWidget member.
virtual void decorateElement ()
 Sets element decoration depending on the isModified state of the element.
virtual void setFromParameters (const std::vector< DtReaderWriter * > &parentRw)
virtual void elementChanged ()
virtual DtString sourceValueToDisplayLabel (const int source, bool *foundDisplayValue=NULL) const
virtual int displayLabelToSourceValue (const DtString &display, bool *foundSourceValue=NULL) const
virtual void processUiEvent (const DtUiElementEvent &e)
 Process ui event. Default does nothing.
- Protected Member Functions inherited from DtUiMapAwareElement
virtual void connectedTo (QObject *)
 Called when this item is connected to any signal emitted by the given item.
virtual void setupReaderWriterFromMapCombo (QComboBox *)
virtual void setupReaderWriterFromMapKey (const DtString &key, const std::string &elementContainer)
virtual void setupReaderWriterFromMapKey (const DtString &key, const std::string &elementContainer, std::vector< DtReaderWriter * > &vars, std::vector< DtReaderWriter * > &backupVars)
virtual DtString variableNameFromParameters (const DtRwPropertiesMap *mapToCheck, const std::string &prototypeName, const std::string &variableName, const DtString &mapKey) const
virtual void setupReaderWriterFromVariable (const std::string &elementContainer)
- Protected Member Functions inherited from DtUiElement
virtual double sourceToDisplayUnits (double) const
virtual double displayToSourceUnits (double) const
virtual QString units () const
virtual void updateLabelTitle ()
 Updates label title based on valid units.
virtual QString labelTitle () const
 Returns the unmodified label title.

Protected Attributes

QIntValidator * myValidator
bool myIsLineEdit
 True if this string element uses a line edit, false if combo box.
DisplayLabelToSourceValueMap myDisplayToSourceValues

Additional Inherited Members

- Public Types inherited from DtUiElement
typedef boost::function
< DtUiElement *(makVrv::DtDe &)> 
CreatorFunction
typedef std::map< std::string,
CreatorFunction
UiElementFactoryMap
- Public Slots inherited from DtUiElement
virtual void toggleDisplayed (bool display)
- Signals inherited from DtUiElement
void uiEvent (const DtUiElementEvent &)
- Public Attributes inherited from DtUiElement
QWidgetmyWidget
QWidgetmyLabel
- Static Protected Attributes inherited from DtUiElement
static UiElementFactoryMap theFactory

Detailed Description

For validation, add lower_bound and upper_bound properties to set a lower and upper bound.

Member Typedef Documentation

Constructor & Destructor Documentation

DtUiIntegerElement::DtUiIntegerElement ( makVrv::DtDe )

Constructor.

virtual DtUiIntegerElement::~DtUiIntegerElement ( )
virtual

Destructor.

Member Function Documentation

virtual void DtUiIntegerElement::setValue ( int  )
virtual

Sets/gets values.

virtual int DtUiIntegerElement::value ( ) const
virtual
virtual void DtUiIntegerElement::createControls ( QWidget parent)
protectedvirtual

If additional widgets or connections need to be made do it here. The parent is the myWidget member.

Reimplemented from DtUiElement.

virtual void DtUiIntegerElement::decorateElement ( )
protectedvirtual

Sets element decoration depending on the isModified state of the element.

This version changes myLabel font.

Reimplemented from DtUiElement.

virtual void DtUiIntegerElement::setFromParameters ( const std::vector< DtReaderWriter * > &  parentRw)
protectedvirtual

Reimplemented from DtUiElement.

virtual void DtUiIntegerElement::elementChanged ( )
protectedvirtual

Reimplemented from DtUiElement.

virtual DtString DtUiIntegerElement::sourceValueToDisplayLabel ( const int  source,
bool foundDisplayValue = NULL 
) const
protectedvirtual
virtual int DtUiIntegerElement::displayLabelToSourceValue ( const DtString display,
bool foundSourceValue = NULL 
) const
protectedvirtual
virtual void DtUiIntegerElement::processUiEvent ( const DtUiElementEvent )
protectedvirtual

Process ui event. Default does nothing.

Reimplemented from DtUiElement.

virtual void DtUiIntegerElement::recalculateAsRestOf ( )
protectedvirtualslot

Member Data Documentation

QIntValidator* DtUiIntegerElement::myValidator
protected
bool DtUiIntegerElement::myIsLineEdit
protected

True if this string element uses a line edit, false if combo box.

DisplayLabelToSourceValueMap DtUiIntegerElement::myDisplayToSourceValues
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)