The Spot Report example demonstrates the following:
- How to build a plugin module for the VR-Forces Gui
- How to make spot reports selectable
- How to know when spot reports are selected
- How to know when spot reports are double clicked on
- How to know when spot reports are right clicked on
How to Run the Example
The Spot Report Manipulation example demonstrates how to manipulate the selection of spot report objects by allowing for custom code when a spot report is selected.
Usage
In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin.
To view the new behavior:
-
Start VR-Forces GUI and SIM.
-
Create a new Scenario - e.g. EntityLevel SMS on a Ground_DB II terrain.
-
Create some friendly and opposing entities (e.g. US Army M16) and set their Rules of Engagement to Hold Fire.
-
Make sure that spot reports configuration is set up correctly by going to the Settings → Application Settings → Spot Reports Options tab.
-
Enable the "Send Spot Reports" check box.
-
Select the Viewpoint tab and select Friendly or Opposing in the "Show spot reports from viewpoint of force" combo box.
-
Select the Display tab and enable some of the Spot Report Labels - e.g. Reported By , Entity Type.
-
Run the scenario.
-
When a spot report shows up in the Objects List panel, select an entity from the report.
-
You can see the details for the reported entity in the Last Selected Object panel.
Plugin Entry Points
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QStatusBar>
using namespace makVrf;
{
return true;
}
void slot_onCurrentSelectionChanged(
{
if (mainQWindow)
{
mainQWindow->statusBar()->showMessage("");
mainQWindow->statusBar()->hide();
}
makVrv::DtSelectionManager::IdSet::const_iterator it = selectedSet.begin();
for(; it != selectedSet.end(); ++it)
{
{
if (mainQWindow)
{
mainQWindow->statusBar()->show();
mainQWindow->statusBar()->showMessage("A spot report was selected");
return;
}
}
}
}
{
if (mainQWindow)
{
{
mainQWindow->statusBar()->show();
mainQWindow->statusBar()->showMessage("A spot report was double clicked on");
}
else
{
mainQWindow->statusBar()->hide();
}
}
}
{
&slot_onCurrentSelectionChanged, boost::placeholders::_1, &de));
boost::bind(&slot_unhandledEdit, boost::placeholders::_1, &de));
}
{
info.
pluginDescription =
"This example shows how to work with the selection of spot reports.";
}