VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Entity List (entityList)

Table of Contents

The Entity List example demonstrates the following:

The Entity List example demonstrates how to add a new panel to the application and to display task in that panel about all entities. This includes showing the destination point if the task is "move-to".

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.

Usage

Since this example is loaded as a plugin, it will need to be enabled in the Launcher. In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin. Then launch VR-Forces.

  1. Start vrfGui.
  2. Start vrfSim.
  3. Create a new scenario.
  4. Create a tank.
  5. Right click on the tank and assign a Move To task.
  6. Play the scenario.

The 'Entity List' panel will display information about the tank and where it is moving to.

Classes

DtEntityListThe toolbar widget that displays task information about all entities.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2011 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
//\file entityListPlugin.cxx
//\brief Contains plugin function
//This file defines the generic DT_DLL_VRF_PLUGIN_EXPORT_MACRO. Use that macro when
//you want to export symbols. Also, in your CMakeLists.txt file, make sure to
//define the VRFPLUGIN_EXPORTS define to tell the compiler to define the macro as an
//export
#include "DtEntityList.h"
#include <vrvCore/DtDe.h>
using namespace makVrf;
{
//Register new widget with the system so that it can be created.
//NOTE: This does not actually display the widget anywhere.
//Add the widget to the display configuration so that it will be displayed.
//Each page must be on a panel, so in this case we add a panel that will
//contain only this page.
if(igApp)
{
//If the configuration for the panel already exists, this means that the
//display configuration file was saved with this plugin active. In this case,
//leave the panel where the display configuration file says. This will be
//where the user had it when they closed the app.
"DtEntityListPanel"))
{
//If it was not in the configuration, make a new dockable panel, and start it on
//the left side dock area.
igApp->masterModePageConfiguration().addPageCollection("DtEntityListPanel",
//Add the widget to that panel.
makVrv::DtPagePath::collection("DtEntityListPanel").page("DtEntityList"));
}
}
return true;
}
{
info.pluginName = "entityList";
info.pluginDescription = "This example shows how to work with entity lists.";
info.pluginVersion = "1.00";
info.pluginCreator = "MAK Technologies";
info.pluginCreatorEmail = "sales@mak.com";
info.pluginContactWebPage = "www.mak.com";
info.pluginContactMailingAddress = "150 Cambridge Park Drive 3rd Floor - Cambridge, MA 02140 USA";
info.pluginContactPhone = "(617) 876 8085";
}

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)