![]() |
VR-Forces 5.0.2 Developer's Guide
|
This class displays the display units.

Public Member Functions | |
| DtDisplayUnitsSettingsWidget (DtDe &de, QWidget *parent, Qt::WindowFlags f=Qt::Widget) | |
| virtual | ~DtDisplayUnitsSettingsWidget () |
| virtual void | addDisplayUnitToUI (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName, makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType type) |
| virtual void | updateDisplayUnitUnit (const std::string &displayUnitCollectionName, const std::string &displayUnitName, unsigned int unitEnumValue) |
| virtual void | updateDisplayUnitDecimals (const std::string &displayUnitCollectionName, const std::string &displayUnitName, unsigned int decimals) |
| virtual void | updateDisplayUnitName (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName, const DtUnicode &newDisplayName) |
| virtual void | setDisplayUnitDecimalsQSpinBoxVisible (const std::string &displayUnitCollectionName, const std::string &displayUnitName, bool isVisible) |
| virtual void | addSuppressMagneticNorthNotationCheckBox () |
| virtual void | setSuppressMagneticNorthNotationEnabled (bool enabled) |
| virtual void | addObjectTypeToUI (const DtUnicode &objectType) |
| virtual std::string | currentObjectType () const |
| virtual void | populateDisplayUnitComboBoxes (makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType displayUnitType, const DtUnicode &name, unsigned int unitEnumValue) |
| virtual void | removeUnitOfMeasurementEntryByDisplayUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName, const DtUnicode &unitOfMeasurementName) |
| virtual void | clear () |
Public Member Functions inherited from makVrv::DtDisplayUnitsSettingsInterface | |
| virtual | ~DtDisplayUnitsSettingsInterface () |
Public Attributes | |
| QGridLayout * | myMainLayout |
| QHBoxLayout * | myObjectTypeLayout |
| QLabel * | myObjectTypeLabel |
| QComboBox * | myObjectTypeComboBox |
| QLabel * | myDecimalPlacesLabel |
| std::map< std::string, std::set< QWidget * > > | myDynamicWidgets |
| std::map< std::string, unsigned int > | myDynamicWidgetsLayoutIndices |
| std::map < makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType, std::set< QComboBox * > > | myComboBoxesByDisplayUnitType |
Public Attributes inherited from makVrv::DtDisplayUnitsSettingsInterface | |
| boost::signalslib::signal< void()> | signal_currentObjectTypeChanged |
| boost::signalslib::signal < void(const std::string &displayUnitCollectionName, const std::string &displayUnitName, unsigned int unitEnumValue)> | signal_displayUnitUnitChanged |
| boost::signalslib::signal < void(const std::string &displayUnitCollectionName, const std::string &displayUnitName, unsigned int decimals)> | signal_displayUnitDecimalsChanged |
| boost::signalslib::signal < void(bool suppressMagNorthNotation)> | signal_suppressMagneticNorthNotationChanged |
Protected Slots | |
| void | slot_onObjectTypeChanged (int index) |
| void | slot_onDisplayUnitUnitChanged (int unit) |
| void | slot_onDisplayUnitDecimalsChanged (int decimals) |
| void | slot_onSuppressMagneticNorthNotationCheckboxChanged (int state) |
Protected Member Functions | |
| virtual void | setupGui () |
| virtual std::string | getDisplayUnitKey (const std::string &displayUnitCollectionName, const std::string &displayUnitName) const |
Protected Attributes | |
| DtDe & | myDe |
| unsigned int | myNextAvailableObjectRowIndex |
| unsigned int | myNextAvailableApplicationRowIndex |
| unsigned int | myNextAvailableWeatherRowIndex |
Friends | |
| class | DtDisplayUnitsSettingsWidgetCreator |
| makVrv::DtDisplayUnitsSettingsWidget::DtDisplayUnitsSettingsWidget | ( | DtDe & | de, |
| QWidget * | parent, | ||
| Qt::WindowFlags | f = Qt::Widget |
||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
virtual |
Add a display unit to the interface.
| displayUnitCollectionName | The name of the collection the display unit is in. |
| displayUnitName | The name of the display unit of interest. |
| type | The display unit type this display unit measures. |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Update the interface to reflect the new unit of measurement a display unit uses.
| displayUnitCollectionName | The name of the collection the display unit is in. |
| displayUnitName | The name of the display unit of interest. |
| unitEnumValue | The enumeration value of the specific unit of measurement to use. |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Update the interface to reflect the new number of decimals a display unit uses.
| displayUnitCollectionName | The name of the collection the display unit is in. |
| displayUnitName | The name of the display unit of interest. |
| decimals | The number of decimals the display unit now uses. |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Update the name of a display unit in the UI.
| displayUnitCollectionName | The name of the collection the display unit is in. |
| displayUnitName | The name of the display unit of interest. |
| newDisplayName | The name of the display unit as shown in the GUI This function will look for the dynamic QLabel widget for a display unit and uses QLabel::setText(...) to update the display name for a display unit in the GUI and will do nothing if the widget is not found. This function does not rename the display unit in the display unit settings. |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Update the visibility of a QSpinBox associated with a display unit.
| displayUnitCollectionName | The name of the collection the display unit is in. |
| displayUnitName | The name of the display unit of interest. |
| newDisplayName | The name of the display unit as shown in the GUI This function will look for the dynamic QSpinBox widget for a display unit and uses QWidget::setVisible(...) to update it visibility and will do nothing if the widget is not found. |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Add a checkbox that toggles the suppression of magnetic north notation to the GUI.
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Set the state of the QCheckBox for suppressing magnetic north notation.
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Add an object type to the interface.
| objectType | The string representation for the object type |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Get the currently selected object type.
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Populate the appropriate unit of measurement combo boxes. This function populates the dropdown boxes of all display units that measure the specified display unit type with the unit of measurement information that is passed in.
| displayUnitType | The unsigned integer value that corresponds to a physical quantity, in the DisplayUnitType enumeration, the display unit is measuring. |
| name | The name of the unit of measurement. |
| unitEnumValue | The enumeration value corresponding to the unit of measurement being added. |
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Removes a particular unit of measurement entry from a display unit.
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
virtual |
Removes all the display units and unit of measurements from the GUI.
Implements makVrv::DtDisplayUnitsSettingsInterface.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedvirtual |
Sets up the GUI with three sections for some number of display units, added via addDisplayUnitToUI(...). The three sections are used for the three display unit collection types VR-Vantage has by default. They are, in order as they appear in the GUI, the Object-Type display unit collection, the Application display unit collection, and the Weather display unit collection. The Object-Type section has a combo box that lists all the entity types, e.g. Fixed Wing, we maintain display unit information for. The Object-Type section will display display unit information for the currently selected entity type in the combo box. Since the Object-Type section is used for all the display unit collections for entity types, it is assumed they all maintain the same set of display units.
|
protectedvirtual |
Get the string key for a display unit The key is used internally to group its dynamic children widgets by storing the key in widgets that control a display unit setting, e.g. the QSpinBox that controls the number of decimal places used for the Application/Weather display unit.
|
friend |
| QGridLayout* makVrv::DtDisplayUnitsSettingsWidget::myMainLayout |
| QHBoxLayout* makVrv::DtDisplayUnitsSettingsWidget::myObjectTypeLayout |
| QLabel* makVrv::DtDisplayUnitsSettingsWidget::myObjectTypeLabel |
| QComboBox* makVrv::DtDisplayUnitsSettingsWidget::myObjectTypeComboBox |
| QLabel* makVrv::DtDisplayUnitsSettingsWidget::myDecimalPlacesLabel |
| std::map<std::string, std::set<QWidget*> > makVrv::DtDisplayUnitsSettingsWidget::myDynamicWidgets |
| std::map<std::string, unsigned int> makVrv::DtDisplayUnitsSettingsWidget::myDynamicWidgetsLayoutIndices |
| std::map<makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType, std::set<QComboBox*> > makVrv::DtDisplayUnitsSettingsWidget::myComboBoxesByDisplayUnitType |
|
protected |
These are used to maintain the next free row in the QGridLayout so display units can continually be added to the GUI. The default values make it so the widget can have 49 Object-Type display units before running out of slots. Same is true for the number of Application display units. Since the weather dispaly units live at the bottom of the widget, you could have more than 49 display units.