![]() |
VR-Forces 5.0.3 Developer's Guide
|
The Unit Status example demonstrates the following:
The Unit Status example demonstrates how to add a new panel to the application and to display information in that panel about an item that is selected on the terrain map.
The example supplies a .ui file that shows how to create a dialog box using Qt Designer and how that .ui file translates itself into a .cpp and .h file that can be subclassed and extended for use in the VR-Forces GUI.
Using the Qt connection call, the panel connects to functions that send out updates when an entity is updated. This shows how user interface objects can have their states change when some aspect of an entity changes.
This example also shows a very simple way to draw attached graphics based on the current selected object. Does not create or use a new model definition but instead just uses exisiting model definitions and showing how to manipulate the parameters of those models directly by accessing the agents associated with them. For this example those agents area DtOverlayEllipseArcModelAgent and DtEllipsoidArcModelAgent
In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin.
To view the new behavior:
| DtUnitStatus | The toolbar widget that displays information about the currently selected unit. |
| DtUnitStatusLogic | The logic for setting the information into the widget. |