MAK RTIspy API Documentation for HLA 1516
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtAssistantLrcConnQueryWidget Class Reference

Widget used to request the user to provide new connection parameters when an LRC cannot establish a connection. More...

+ Inheritance diagram for DtAssistantLrcConnQueryWidget:
+ Collaboration diagram for DtAssistantLrcConnQueryWidget:

List of all members.

Public Slots

virtual void processStartRtiexec ()
 Processes the pressing of the start rtiexec button by the user.

Signals

void startRtiexec (const DtRtiConnectionInfoDataPair &conn, const DtRtiConnectionConfigurationInfo &config)
 Signal emitted when user chooses to start an rtiexec.
void updateWindowTitle (const QString &)
 Signal emitted when the window title should be changed.
void requestStartRtiexecEnable (const DtRtiConnectionInfoDataPair &)
 Signal emitted when we think we may want to enable the "Start rtiexec" option, but need to be told if its ok (could be disabled by remote assistant for this connection)

Public Member Functions

 DtAssistantLrcConnQueryWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructor.
virtual ~DtAssistantLrcConnQueryWidget ()
 Destructor.
virtual void addKnownAssistant (const DtAssistantInfo &assistant)
 Adds an assistant to the list of known remote assistants.
virtual void removeKnownAssistant (const DtAssistantInfo &assistant)
 Removes an assistant to the list of known remote assistants.
virtual const DtAssistantInfoSetknownAssistants () const
virtual void displayErrorText (bool error)
 Set the variation of widget text based on whether or not it is being displayed due to an error.
virtual void setStartRtiexecEnabled (bool enable, const QString &reason)
 Sets whether or not the "Start rtiexec" button is enabled.

Protected Member Functions

virtual bool addConnection (const DtRtiConnectionInfoDataPair &conn, const DtRtiConfigurationInfoDataPair &config, DtNameToConnInfoMap::iterator &connIter)
 Adds an available connection to the list.
virtual void removeConnection (const DtRtiConnectionInfoDataPair &conn)
 Removes an available connection from the list.
virtual void clearAllConnections ()
 Clears the entire connection list.
virtual void updateDisplayedConnection (const QString &name, const DtRtiConnectionInfoDataPair &updatedConn, QTreeWidgetItem *connItem)
 Depending on the type of our current query connection, we update connItem based on updatedConn.
virtual QTreeWidgetItem * findConnInTree (const DtRtiConnectionInfo &conn, DtNameToConnInfoMap::iterator &connIter)
 Finds the connection item in the tree.
virtual void getConnStatusText (const QTreeWidgetItem *item, const DtRtiConnectionInfoDataPair &conn, const DtRtiConfigurationInfoDataPair &, QString &text)
 Gets the connection status text for the given connection.
virtual void loadLocalInterfaceList ()
 Reloads the list of local interfaces which can be selected for new connections.
virtual bool isKnownAssistant (const DtRtiConnectionInfo &conn)
 Determine if this connection is an rtiexec connection on the same host as one of the known assistants.
virtual bool checkForValidAddrAndHost (const QString &addrStr, const MAKRti::DtInetAddr &ifAddr, MAKRti::DtInetAddr &addr, MAKRti::DtString &hostName)
 Check if the string is a valid address, as well as valid for the specified interface.
virtual void setHostNameFromKnownAssistants (const MAKRti::DtInetAddr &ip, const MAKRti::DtInetAddr &interfaceAddr, MAKRti::DtString &hostName)
 Attempts to set the host name of the connection by matching the IP address and network interface address with a known assistant.
virtual bool setReliableIpFromKnownAssistants (const MAKRti::DtString &hostName, const MAKRti::DtInetAddr &interfaceAddr, MAKRti::DtInetAddr &ip)
 Attempts to set the reliable IP address of the connection by matching the host name and network interface address with a known assistant.
virtual void showEvent (QShowEvent *event)
 Prepare the widget to be shown.
virtual bool promptUserForNewConnInfo (DtRtiConnectionInfoDataPair &conn)
 Prompts the user for new connection info.
virtual bool promptUserToEditConnInfo (DtRtiConnectionInfoDataPair &conn)
 Prompts the user to edit connection info.
virtual bool promptUserForConnInfo (DtRtiConnectionInfoDataPair &conn, const QString &dialogTitle, bool useNameOfGivenConn)
 Prompts the user for connection info.
virtual void setAcceptEnabledBasedOnConn (const DtRtiConnectionInfoDataPair *conn)
 Enables or disables the accept button based on the state of the given currently selected connection.
virtual void updateDialogBasedOnConn (const DtRtiConnectionInfoDataPair *conn, const DtRtiConfigurationInfoDataPair *config, bool isDisabled)
 Updates the LRC connection query dialog specific items based on the state of the given currently selected connection and configuration.

Protected Attributes

DtAssistantInfoSet myRemoteAssistants
 The set of known remote assistants.
DtAssistantAddLrcConnDialogmyAddConnDialog
 Dialog used to set information for a new connection.
QTreeWidgetItem * myLightweightItem
 Top level item for the lightweight connection type.
QTreeWidgetItem * myRtiexecItem
 Top level item for the rtiexec connection type.

Static Protected Attributes

static const QString theErrorText
 Text to be displayed when there was a connection error.
static const QString theNormalText
 Text to be displayed when there was no error.
static const QString theErrorTitle
 Title to be displayed when there was a connection error.
static const QString theNormalTitle
 Title to be displayed when there was no error.
static const QString theVerifiedText
 Text descriptions for each possible connection status.
static const QString theVerifiedForwarderText
 Text descriptions for each possible connection status.
static const QString theUnknownText
 Text descriptions for each possible connection status.
static const QString theConflictingText
 Text descriptions for each possible connection status.
static const QString theUnknownNetworkInterfaceText
 Text descriptions for each possible connection status.
static const QString theNoNetworkInterfaceText
 Text descriptions for each possible connection status.
static const QString theLightweightBranchHeaderText
 Connection tree branch headers and tool tips.
static const QString theLightweightBranchToolTipText
 Connection tree branch headers and tool tips.
static const QString theRtiexecBranchHeaderText
 Connection tree branch headers and tool tips.
static const QString theRtiexecBranchToolTipText
 Connection tree branch headers and tool tips.

Private Member Functions

 DtAssistantLrcConnQueryWidget (DtAssistantLrcConnQueryWidget const &)
 Copy constructor not implemented.
DtAssistantLrcConnQueryWidgetoperator= (DtAssistantLrcConnQueryWidget const &)
 Assignment operator not implemented.

Detailed Description

Widget used to request the user to provide new connection parameters when an LRC cannot establish a connection.


Constructor & Destructor Documentation

DtAssistantLrcConnQueryWidget::DtAssistantLrcConnQueryWidget ( QWidget parent = 0,
Qt::WindowFlags  f = 0 
)

Destructor.

Copy constructor not implemented.


Member Function Documentation

bool DtAssistantLrcConnQueryWidget::addConnection ( const DtRtiConnectionInfoDataPair conn,
const DtRtiConfigurationInfoDataPair config,
DtNameToConnInfoMap::iterator &  connIter 
) [protected, virtual]

Adds an assistant to the list of known remote assistants.

References myRemoteAssistants.

Referenced by DtAssistantConnQueryMgr::DtAssistantConnQueryMgr(), and DtAssistantConnQueryMgr::processAssistantFound().

bool DtAssistantLrcConnQueryWidget::checkForValidAddrAndHost ( const QString &  addrStr,
const MAKRti::DtInetAddr &  ifAddr,
MAKRti::DtInetAddr &  addr,
MAKRti::DtString &  hostName 
) [protected, virtual]

Check if the string is a valid address, as well as valid for the specified interface.

Return the constructed DtInetAddr and the host name of the machine if it can be determined.

References DtGetLocalHostName(), DtAssistantConnQueryWidget::isAddressNotation(), setHostNameFromKnownAssistants(), and setReliableIpFromKnownAssistants().

Referenced by promptUserForConnInfo().

Set the variation of widget text based on whether or not it is being displayed due to an error.

References DtAssistantConnQueryWidget::myUiImpl, theErrorText, theErrorTitle, theNormalText, theNormalTitle, and updateWindowTitle().

Referenced by DtAssistantConnQueryMgr::processConnQueryMsg().

QTreeWidgetItem * DtAssistantLrcConnQueryWidget::findConnInTree ( const DtRtiConnectionInfo conn,
DtNameToConnInfoMap::iterator &  connIter 
) [protected, virtual]

Finds the connection item in the tree.

Returns a pointer to the tree item as well as an iterator to its location in the map.

References DtAssistantConnQueryWidget::ConnectionNameCol, DtAssistantConnQueryWidget::myConnectionInfo, myLightweightItem, myRtiexecItem, and DtRtiConnectionInfo::useRtiexec().

Referenced by addConnection(), and removeConnection().

void DtAssistantLrcConnQueryWidget::getConnStatusText ( const QTreeWidgetItem *  item,
const DtRtiConnectionInfoDataPair conn,
const DtRtiConfigurationInfoDataPair ,
QString &  text 
) [protected, virtual]

Determine if this connection is an rtiexec connection on the same host as one of the known assistants.

References DtAssistantInfo::findMatchingHostInfo(), DtRtiConnectionInfo::hostName(), myRemoteAssistants, DtRtiConnectionInfo::networkInterfaceAddr(), and DtRtiConnectionInfo::reliableIp().

Referenced by updateDialogBasedOnConn().

References myRemoteAssistants.

DtAssistantLrcConnQueryWidget& DtAssistantLrcConnQueryWidget::operator= ( DtAssistantLrcConnQueryWidget const &  ) [private]

Assignment operator not implemented.

bool DtAssistantLrcConnQueryWidget::promptUserForConnInfo ( DtRtiConnectionInfoDataPair conn,
const QString &  dialogTitle,
bool  useNameOfGivenConn 
) [protected, virtual]

Prompts the user for new connection info.

Implements DtAssistantConnQueryWidget.

References promptUserForConnInfo().

Prompts the user to edit connection info.

Implements DtAssistantConnQueryWidget.

References promptUserForConnInfo().

Removes an assistant to the list of known remote assistants.

References myRemoteAssistants.

Referenced by DtAssistantConnQueryMgr::processAssistantLost().

Signal emitted when we think we may want to enable the "Start rtiexec" option, but need to be told if its ok (could be disabled by remote assistant for this connection)

Referenced by updateDialogBasedOnConn().

Enables or disables the accept button based on the state of the given currently selected connection.

Implements DtAssistantConnQueryWidget.

References DtAssistantConnQueryWidget::setAcceptEnabled().

void DtAssistantLrcConnQueryWidget::setHostNameFromKnownAssistants ( const MAKRti::DtInetAddr &  ip,
const MAKRti::DtInetAddr &  interfaceAddr,
MAKRti::DtString &  hostName 
) [protected, virtual]

Attempts to set the host name of the connection by matching the IP address and network interface address with a known assistant.

Will set the host name to a null string if it could not be determined.

References DtAssistantInfo::findMatchingHostInfo(), and myRemoteAssistants.

Referenced by checkForValidAddrAndHost().

bool DtAssistantLrcConnQueryWidget::setReliableIpFromKnownAssistants ( const MAKRti::DtString &  hostName,
const MAKRti::DtInetAddr &  interfaceAddr,
MAKRti::DtInetAddr &  ip 
) [protected, virtual]

Attempts to set the reliable IP address of the connection by matching the host name and network interface address with a known assistant.

Will set and return false if the IP to the invalid value if it could not be determined.

References DtAssistantInfo::findMatchingHostInfo(), and myRemoteAssistants.

Referenced by checkForValidAddrAndHost().

void DtAssistantLrcConnQueryWidget::setStartRtiexecEnabled ( bool  enable,
const QString &  reason 
) [virtual]

Sets whether or not the "Start rtiexec" button is enabled.

If button is to be disabled, reason will be used as a tool tip for the user.

References DtAssistantConnQueryWidget::myStartRtiexecAction, and DtAssistantConnQueryWidget::myUiImpl.

Referenced by DtAssistantConnQueryMgr::setStartRtiexecEnableBasedOnConn(), and updateDialogBasedOnConn().

void DtAssistantLrcConnQueryWidget::showEvent ( QShowEvent *  event) [protected, virtual]

Signal emitted when user chooses to start an rtiexec.

Referenced by processStartRtiexec().

void DtAssistantLrcConnQueryWidget::updateDialogBasedOnConn ( const DtRtiConnectionInfoDataPair conn,
const DtRtiConfigurationInfoDataPair config,
bool  isDisabled 
) [protected, virtual]

Updates the LRC connection query dialog specific items based on the state of the given currently selected connection and configuration.

Reimplemented from DtAssistantConnQueryWidget.

References isKnownAssistant(), requestStartRtiexecEnable(), and setStartRtiexecEnabled().

void DtAssistantLrcConnQueryWidget::updateDisplayedConnection ( const QString &  name,
const DtRtiConnectionInfoDataPair updatedConn,
QTreeWidgetItem *  connItem 
) [protected, virtual]
void DtAssistantLrcConnQueryWidget::updateWindowTitle ( const QString &  ) [signal]

Signal emitted when the window title should be changed.

Referenced by displayErrorText().


Member Data Documentation

Dialog used to set information for a new connection.

Referenced by loadLocalInterfaceList(), and promptUserForConnInfo().

QTreeWidgetItem* DtAssistantLrcConnQueryWidget::myRtiexecItem [protected]
const QString DtAssistantLrcConnQueryWidget::theConflictingText [static, protected]
Initial value:
   tr( "This connection cannot be active because a conflicting connection is active." )

Text descriptions for each possible connection status.

Referenced by getConnStatusText(), and DtAssistantConnConfigWidget::updateDisplayedConnection().

const QString DtAssistantLrcConnQueryWidget::theErrorText [static, protected]
Initial value:
   tr( "The RTI is configured to connect to an rtiexec or RTI Forwarder but "
   "a connection could not be made.  Please verify that the rtiexec is "
   "running, and then choose or add the correct connection information below." )

Text to be displayed when there was a connection error.

Referenced by displayErrorText().

const QString DtAssistantLrcConnQueryWidget::theErrorTitle [static, protected]
Initial value:
   tr( "Connection Failed" )

Title to be displayed when there was a connection error.

Referenced by displayErrorText().

Initial value:
   tr("Lightweight connections")

Connection tree branch headers and tool tips.

Referenced by DtAssistantLrcConnQueryWidget(), and promptUserForConnInfo().

Initial value:
   tr("Connections that don't use rtiexecs. Connections may be faster, but\n"
      "they offer fewer features and only best effort message exchanges.")

Connection tree branch headers and tool tips.

Referenced by DtAssistantLrcConnQueryWidget().

Initial value:
   tr( "This connection has no configured network interface." )

Text descriptions for each possible connection status.

Referenced by getConnStatusText().

const QString DtAssistantLrcConnQueryWidget::theNormalText [static, protected]
Initial value:
 
   tr( "Please choose the RTI connection you would like to use." )

Text to be displayed when there was no error.

Referenced by displayErrorText().

const QString DtAssistantLrcConnQueryWidget::theNormalTitle [static, protected]
Initial value:
 
   tr( "Choose RTI Connection" )

Title to be displayed when there was no error.

Referenced by displayErrorText().

Initial value:
   tr("rtiexec connections")

Connection tree branch headers and tool tips.

Referenced by DtAssistantLrcConnQueryWidget().

Initial value:
   tr("Connections that use rtiexecs. These connections support\n"
      "reliable messages and full RTI compilance.")

Connection tree branch headers and tool tips.

Referenced by DtAssistantLrcConnQueryWidget().

Initial value:
   tr( "This connection is configured to use a network interface that cannot be found." )

Text descriptions for each possible connection status.

Referenced by getConnStatusText(), and DtAssistantConnConfigWidget::updateDisplayedConnection().

const QString DtAssistantLrcConnQueryWidget::theUnknownText [static, protected]
Initial value:
   tr( "Unable to determine if this connection is active." )

Text descriptions for each possible connection status.

Referenced by getConnStatusText(), and DtAssistantConnConfigWidget::updateDisplayedConnection().

Initial value:
   tr( "The RTI Forwarder is active, but rtiexec is not." )

Text descriptions for each possible connection status.

Referenced by getConnStatusText(), and DtAssistantConnConfigWidget::updateDisplayedConnection().

const QString DtAssistantLrcConnQueryWidget::theVerifiedText [static, protected]
Initial value:
   tr( "This connection is active" )

Text descriptions for each possible connection status.

Referenced by getConnStatusText(), and DtAssistantConnConfigWidget::updateDisplayedConnection().


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

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)