MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtNetworkMapWidget Class Reference
+ Inheritance diagram for DtNetworkMapWidget:
+ Collaboration diagram for DtNetworkMapWidget:

Public Slots

void selectAndHoverText ()
 SLOT: called when we need to select the hovered object.
void showContextMenu (const QPoint &pos)
 Called when the user requests a context menu in the network map.

Signals

void federateSelected (const MAKRti::DtString &federationName, int federateHandle)
 Emitted when a federate node is selected.
void rtiexecSelected ()
 Emitted when the rtiexec node is selected.
void forwarderSelected (const MAKRti::DtString &forwarderName, int port)
 Emitted when the central forwarder node is selected.
void peerForwarderSelected (const MAKRti::DtString &forwarderName, int port)
 Emitted when a peer forwarder node is selected.
void switchToPeerForwarder (const MAKRti::DtString &forwarderName, int port)
 Emitted when a connection should be switched to peer forwarder node.
void lightweightSelected ()
 Emitted when the lightweight center node is selected.
void nothingSelected ()
 Emitted when selection is cleared.

Public Member Functions

 DtNetworkMapWidget (QWidget *parent)
 Constructor.
virtual ~DtNetworkMapWidget ()
 Destructor.
virtual QSize sizeHint () const
 Returns the recommended size for the widget.
void addPeerForwarderNode (const MAKRti::DtString &forwarderHostName, int port)
 Adds a particular node.
void removeForwarderNode (const MAKRti::DtString &forwarderHostName, int port)
void addExecNode ()
void removeExecNode ()
void addFederateNode (int fedHandle, const MAKRti::DtString &federationName, const MAKRti::DtString &processName, const MAKRti::DtString &fedType, const MAKRti::DtString &fedName, bool notJoined=false, bool isDropped=false)
void removeFederateNode (int fedHandle, const MAKRti::DtString &federationName)
void checkAndAddMainForwarder (const MAKRti::DtString &forwarderHostName, int port)
void checkAndAddLightweight (const MAKRti::DtString &connName)
void updateFederateInfo (int fedHandle, const MAKRti::DtString &federationName, int queueStatus, bool disconnected, bool reconnecting, bool inErrorState=false)
bool isPeerForwarder (const MAKRti::DtString &forwarderHostName, int port)
void refreshPositions ()
bool doesFederateExist (int fedHandle, const MAKRti::DtString &federationName)
 Does this federate exist?
void clearFederateFlags (int fedHandle, const MAKRti::DtString &federationName)
 clear this federates flags
void forceFederateSelection (int fedHandle, const MAKRti::DtString &federationName)
 For the widget to select the specified federate.
void forceRtiexecSelection ()
 For the widget to select the rtiexec.
void forceForwarderSelection (const MAKRti::DtString &forwarderName, int port)
 For the widget to select the central forwarder.
void forceClearSelection ()
 For the widget to clear the current selection.
virtual void tick (float delta)
 Update.
virtual void selection (int x, int y, bool onHover=false)
 checks for selection
virtual void clearList ()
 Clears the nodes.
virtual bool hasSelection ()
 Checks for a selected node.
virtual int getSelectedHandle ()
 Returns the selected index.
virtual void getSelectedNodeInfo (MAKRti::DtString &federationName, int &federateHandle, bool &isForwarder, bool &isExec, bool &isLightweightCenter)
 Gets the selected node information.
virtual QColor getFederationColor (const MAKRti::DtString &federationName)
 Gets the federation color.
virtual void changeFederationColor (const MAKRti::DtString &federationName, const QColor &newColor)
 Changes the federation names color mapping.
virtual void enableFederationColors (bool enable)
 Enable or disable display of federation colors.
virtual void setFederateIdentifierType (DtFederateIdentifierType fedIdType)
 Choose type of text to be used to identify federates.
virtual void setContextMenu (QMenu *contextMenu)
 Set the context menu to use when activated.
virtual bool hasForwarder () const
 Return true if there is a forwarder node.
virtual bool hasExec () const
 Return true if there is an rtiexec node.
virtual bool isLightweight () const
 Return true if there is a lightweight node.

Protected Member Functions

virtual void resizeEvent (QResizeEvent *evt)
 Resize event.
virtual void closeEvent (QCloseEvent *evt)
 close event
virtual void wheelEvent (QWheelEvent *evt)
 Wheel Event for zooming.
virtual void mouseMoveEvent (QMouseEvent *evt)
 Mouse Movement for Panning.
virtual void keyPressEvent (QKeyEvent *evt)
 Key Press for resetting Pan.
virtual void mousePressEvent (QMouseEvent *evt)
 Mouse press event.
virtual void mouseDoubleClickEvent (QMouseEvent *evt)
 Mouse double click.
virtual void initializeGL ()
 Initializes the OpenGL data.
virtual void paintGL ()
 Paint's the OpenGL Scene.
virtual void drawLines ()
 Draws the lines.
virtual void drawNodes ()
 Draws the nodes.
virtual void drawForwarderNodes ()
 Draws the forwarder nodes.
virtual void drawForwarderNode (DtNetworkMapNode *node, unsigned int index)
 Draws the forwarder nodes.
virtual void drawForwarderNodeLines ()
 Draws the forwarder node lines.
virtual void drawText ()
 Draws node text.
virtual QColor addFederationColor (const MAKRti::DtString &federationName)
 Adds a federation name -> color mapping.
virtual void drawWarning (int textIndex)
 Draws the warning/error/disconnect texture.

Protected Attributes

int myWidth
int myHeight
unsigned mySelectedId
unsigned myHoverId
float myCameraDelta
QPoint myOldMouse
QPoint myNewMouse
QPoint myDeltaMouse
DtNetworkMapCentralNodemyCentralNode
DtNetworkMapCameramyCamera
DtFederateIdentifierType myFedIdType
 The identifying text to be used to identify federates.
std::vector< QColor > myDefaultColors
 Available default colors.
bool myDisplayFederationColors
 Whether the federation colors are displayed.
bool myNodesAreMoving
 Whether nodes are currently moving.
unsigned myNextDefaultColor
 Index of next color to use.
std::set< QRgb > myInUseColors
 Colors currently in use.
QTimer * myHoverTimer
std::map< MAKRti::DtString,
QColor > 
myFederationColors
 map that holds federation names to colors
QMenu * myCurrentContextMenu
 The context menu to display for the current selected node, if requested.

Static Protected Attributes

static const int theStandardNodeRadius
 The standard radius for all nodes.
static const unsigned theInvalidMapNodeId
 Represents an invalid map node ID.
static const unsigned theInitialFwId
 The first forwarder node ID.
static const int theRtiexecId
 Standard IDs to use for non-federate nodes.
static const int theForwarderId
 Standard IDs to use for non-federate nodes.
static const int theLigthweightCenterId
 Standard IDs to use for non-federate nodes.
static const int theEmptyNodeId
 Standard IDs to use for non-federate nodes.
static const MAKRti::DtString theRtiexecName
 Standard names to use for non-federate nodes.
static const MAKRti::DtString theForwarderName
 Standard names to use for non-federate nodes.
static const MAKRti::DtString theLigthweightCenterName
 Standard names to use for non-federate nodes.
static const MAKRti::DtString theEmptyNodeName
 Standard names to use for non-federate nodes.

Detailed Description

Constructor & Destructor Documentation

DtNetworkMapWidget::DtNetworkMapWidget ( QWidget parent)

Constructor.

virtual DtNetworkMapWidget::~DtNetworkMapWidget ( )
virtual

Destructor.

Member Function Documentation

void DtNetworkMapWidget::addExecNode ( )
void DtNetworkMapWidget::addFederateNode ( int  fedHandle,
const MAKRti::DtString &  federationName,
const MAKRti::DtString &  processName,
const MAKRti::DtString &  fedType,
const MAKRti::DtString &  fedName,
bool  notJoined = false,
bool  isDropped = false 
)
virtual QColor DtNetworkMapWidget::addFederationColor ( const MAKRti::DtString &  federationName)
protectedvirtual

Adds a federation name -> color mapping.

void DtNetworkMapWidget::addPeerForwarderNode ( const MAKRti::DtString &  forwarderHostName,
int  port 
)

Adds a particular node.

virtual void DtNetworkMapWidget::changeFederationColor ( const MAKRti::DtString &  federationName,
const QColor &  newColor 
)
virtual

Changes the federation names color mapping.

void DtNetworkMapWidget::checkAndAddLightweight ( const MAKRti::DtString &  connName)
void DtNetworkMapWidget::checkAndAddMainForwarder ( const MAKRti::DtString &  forwarderHostName,
int  port 
)
void DtNetworkMapWidget::clearFederateFlags ( int  fedHandle,
const MAKRti::DtString &  federationName 
)

clear this federates flags

virtual void DtNetworkMapWidget::clearList ( )
virtual

Clears the nodes.

virtual void DtNetworkMapWidget::closeEvent ( QCloseEvent *  evt)
protectedvirtual

close event

bool DtNetworkMapWidget::doesFederateExist ( int  fedHandle,
const MAKRti::DtString &  federationName 
)

Does this federate exist?

virtual void DtNetworkMapWidget::drawForwarderNode ( DtNetworkMapNode node,
unsigned int  index 
)
protectedvirtual

Draws the forwarder nodes.

virtual void DtNetworkMapWidget::drawForwarderNodeLines ( )
protectedvirtual

Draws the forwarder node lines.

virtual void DtNetworkMapWidget::drawForwarderNodes ( )
protectedvirtual

Draws the forwarder nodes.

virtual void DtNetworkMapWidget::drawLines ( )
protectedvirtual

Draws the lines.

virtual void DtNetworkMapWidget::drawNodes ( )
protectedvirtual

Draws the nodes.

virtual void DtNetworkMapWidget::drawText ( )
protectedvirtual

Draws node text.

virtual void DtNetworkMapWidget::drawWarning ( int  textIndex)
protectedvirtual

Draws the warning/error/disconnect texture.

virtual void DtNetworkMapWidget::enableFederationColors ( bool  enable)
virtual

Enable or disable display of federation colors.

void DtNetworkMapWidget::federateSelected ( const MAKRti::DtString &  federationName,
int  federateHandle 
)
signal

Emitted when a federate node is selected.

void DtNetworkMapWidget::forceClearSelection ( )

For the widget to clear the current selection.

void DtNetworkMapWidget::forceFederateSelection ( int  fedHandle,
const MAKRti::DtString &  federationName 
)

For the widget to select the specified federate.

void DtNetworkMapWidget::forceForwarderSelection ( const MAKRti::DtString &  forwarderName,
int  port 
)

For the widget to select the central forwarder.

void DtNetworkMapWidget::forceRtiexecSelection ( )

For the widget to select the rtiexec.

void DtNetworkMapWidget::forwarderSelected ( const MAKRti::DtString &  forwarderName,
int  port 
)
signal

Emitted when the central forwarder node is selected.

virtual QColor DtNetworkMapWidget::getFederationColor ( const MAKRti::DtString &  federationName)
virtual

Gets the federation color.

virtual int DtNetworkMapWidget::getSelectedHandle ( )
inlinevirtual

Returns the selected index.

virtual void DtNetworkMapWidget::getSelectedNodeInfo ( MAKRti::DtString &  federationName,
int &  federateHandle,
bool &  isForwarder,
bool &  isExec,
bool &  isLightweightCenter 
)
virtual

Gets the selected node information.

virtual bool DtNetworkMapWidget::hasExec ( ) const
virtual

Return true if there is an rtiexec node.

virtual bool DtNetworkMapWidget::hasForwarder ( ) const
virtual

Return true if there is a forwarder node.

virtual bool DtNetworkMapWidget::hasSelection ( )
virtual

Checks for a selected node.

virtual void DtNetworkMapWidget::initializeGL ( )
protectedvirtual

Initializes the OpenGL data.

virtual bool DtNetworkMapWidget::isLightweight ( ) const
virtual

Return true if there is a lightweight node.

bool DtNetworkMapWidget::isPeerForwarder ( const MAKRti::DtString &  forwarderHostName,
int  port 
)
virtual void DtNetworkMapWidget::keyPressEvent ( QKeyEvent *  evt)
protectedvirtual

Key Press for resetting Pan.

void DtNetworkMapWidget::lightweightSelected ( )
signal

Emitted when the lightweight center node is selected.

virtual void DtNetworkMapWidget::mouseDoubleClickEvent ( QMouseEvent *  evt)
protectedvirtual

Mouse double click.

virtual void DtNetworkMapWidget::mouseMoveEvent ( QMouseEvent *  evt)
protectedvirtual

Mouse Movement for Panning.

virtual void DtNetworkMapWidget::mousePressEvent ( QMouseEvent *  evt)
protectedvirtual

Mouse press event.

void DtNetworkMapWidget::nothingSelected ( )
signal

Emitted when selection is cleared.

virtual void DtNetworkMapWidget::paintGL ( )
protectedvirtual

Paint's the OpenGL Scene.

void DtNetworkMapWidget::peerForwarderSelected ( const MAKRti::DtString &  forwarderName,
int  port 
)
signal

Emitted when a peer forwarder node is selected.

void DtNetworkMapWidget::refreshPositions ( )
void DtNetworkMapWidget::removeExecNode ( )
void DtNetworkMapWidget::removeFederateNode ( int  fedHandle,
const MAKRti::DtString &  federationName 
)
void DtNetworkMapWidget::removeForwarderNode ( const MAKRti::DtString &  forwarderHostName,
int  port 
)
virtual void DtNetworkMapWidget::resizeEvent ( QResizeEvent *  evt)
protectedvirtual

Resize event.

void DtNetworkMapWidget::rtiexecSelected ( )
signal

Emitted when the rtiexec node is selected.

void DtNetworkMapWidget::selectAndHoverText ( )
slot

SLOT: called when we need to select the hovered object.

virtual void DtNetworkMapWidget::selection ( int  x,
int  y,
bool  onHover = false 
)
virtual

checks for selection

virtual void DtNetworkMapWidget::setContextMenu ( QMenu *  contextMenu)
virtual

Set the context menu to use when activated.

virtual void DtNetworkMapWidget::setFederateIdentifierType ( DtFederateIdentifierType  fedIdType)
virtual

Choose type of text to be used to identify federates.

void DtNetworkMapWidget::showContextMenu ( const QPoint &  pos)
slot

Called when the user requests a context menu in the network map.

virtual QSize DtNetworkMapWidget::sizeHint ( ) const
virtual

Returns the recommended size for the widget.

void DtNetworkMapWidget::switchToPeerForwarder ( const MAKRti::DtString &  forwarderName,
int  port 
)
signal

Emitted when a connection should be switched to peer forwarder node.

virtual void DtNetworkMapWidget::tick ( float  delta)
virtual

Update.

void DtNetworkMapWidget::updateFederateInfo ( int  fedHandle,
const MAKRti::DtString &  federationName,
int  queueStatus,
bool  disconnected,
bool  reconnecting,
bool  inErrorState = false 
)
virtual void DtNetworkMapWidget::wheelEvent ( QWheelEvent *  evt)
protectedvirtual

Wheel Event for zooming.

Member Data Documentation

DtNetworkMapCamera* DtNetworkMapWidget::myCamera
protected
float DtNetworkMapWidget::myCameraDelta
protected
DtNetworkMapCentralNode* DtNetworkMapWidget::myCentralNode
protected
QMenu* DtNetworkMapWidget::myCurrentContextMenu
protected

The context menu to display for the current selected node, if requested.

std::vector<QColor> DtNetworkMapWidget::myDefaultColors
protected

Available default colors.

QPoint DtNetworkMapWidget::myDeltaMouse
protected
bool DtNetworkMapWidget::myDisplayFederationColors
protected

Whether the federation colors are displayed.

std::map< MAKRti::DtString, QColor > DtNetworkMapWidget::myFederationColors
protected

map that holds federation names to colors

DtFederateIdentifierType DtNetworkMapWidget::myFedIdType
protected

The identifying text to be used to identify federates.

int DtNetworkMapWidget::myHeight
protected
unsigned DtNetworkMapWidget::myHoverId
protected
QTimer* DtNetworkMapWidget::myHoverTimer
protected
std::set<QRgb> DtNetworkMapWidget::myInUseColors
protected

Colors currently in use.

QPoint DtNetworkMapWidget::myNewMouse
protected
unsigned DtNetworkMapWidget::myNextDefaultColor
protected

Index of next color to use.

bool DtNetworkMapWidget::myNodesAreMoving
protected

Whether nodes are currently moving.

QPoint DtNetworkMapWidget::myOldMouse
protected
unsigned DtNetworkMapWidget::mySelectedId
protected
int DtNetworkMapWidget::myWidth
protected
const int DtNetworkMapWidget::theEmptyNodeId
staticprotected

Standard IDs to use for non-federate nodes.

const MAKRti::DtString DtNetworkMapWidget::theEmptyNodeName
staticprotected

Standard names to use for non-federate nodes.

const int DtNetworkMapWidget::theForwarderId
staticprotected

Standard IDs to use for non-federate nodes.

const MAKRti::DtString DtNetworkMapWidget::theForwarderName
staticprotected

Standard names to use for non-federate nodes.

const unsigned DtNetworkMapWidget::theInitialFwId
staticprotected

The first forwarder node ID.

const unsigned DtNetworkMapWidget::theInvalidMapNodeId
staticprotected

Represents an invalid map node ID.

const int DtNetworkMapWidget::theLigthweightCenterId
staticprotected

Standard IDs to use for non-federate nodes.

const MAKRti::DtString DtNetworkMapWidget::theLigthweightCenterName
staticprotected

Standard names to use for non-federate nodes.

const int DtNetworkMapWidget::theRtiexecId
staticprotected

Standard IDs to use for non-federate nodes.

const MAKRti::DtString DtNetworkMapWidget::theRtiexecName
staticprotected

Standard names to use for non-federate nodes.

const int DtNetworkMapWidget::theStandardNodeRadius
staticprotected

The standard radius for all nodes.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)