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
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.
In order to use this example, you must do the following:
-
Create a new Scenario.
-
Create some friendly and opposing entities 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 tab.
-
On the Viewpoint tab, select a viewpoint to look from (Friendly or Opposing).
-
Go to the Enable/Disable spot reports tab and make sure that spot reporting is on.
-
Play the scenario.
-
When a spot report shows up, select the report. You can see the selection in the Last Selected Object panel.
#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, _1, &de));
}
{
info.
pluginDescription =
"This example shows how to work with the selection of spot reports.";
}