MAK RTIspy API Documentation for HLA 1.3
Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions

Responsible for maintaining the assistant tray icon, its menu, and the notifications displayed by it. More...

+ Inheritance diagram for DtAssistantTrayIconMgr:
+ Collaboration diagram for DtAssistantTrayIconMgr:

List of all members.

Public Slots

void addComponent (int id)
 Processes the addition of a new component.
void renameComponent (int id)
 Renames an existing component.
void removeComponent (int id)
 Removes an existing component from the menu.
void processComponentUpdate (int id)
 Handles a component update.
void sendComponentUpdateNotifyLevel (int id, MAKRti::DtNotifyLevelType level)
 Processes an update to a component notify level from the menu.
void sendComponentEnableLogging (int id)
 Processes a component logging enable command from the menu.
void sendComponentExit (int id)
 Processes a component exit request.
void showNotifyConsole ()
 Displays the notification console with the full history of notifications which have been displayed.
void showComponentConsole (int id)
 Displays the component's console.
void showVersionsWebpage ()
 Opens a browser to display the RTI versions web page.
void showAboutDialog ()
 Opens the RTI about dialog.
void showHelpDialog ()
 Opens the RTI help dialog.
void processHelpDialogClose ()
 Cleans up after the help dialog when it is closed.
void showComponentWebSpy (int id)
 Opens a browser to display the web spy page for the component.
void showComponentWebSpy (const MAKRti::DtString &host, int port, int webSpyId)
 Opens a browser to display the web spy page for the component with the given information.
void notification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId=-1, bool logOnly=false, bool forward=true)
 Displays a notification for the component with the given ID.
void notification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source, bool logOnly=false, bool forward=true)
 Displays a notification with the given component name.
void showNotifyIcon ()
 Changes the tray icon to show that a notification message has been received but not acknowledged by the user, just in case they missed it.
void clearNotifyIcon ()
 Clears the notify icon if displayed.
void showWarningIcon ()
 Changes the tray icon to show that a popup dialog has been activated that needs attention by the user.
void clearWarningIcon ()
 Registers that a popup dialog has been dismissed and clears the warning icon if all popup warnings have been dismissed.
void processTrayIconActivation (QSystemTrayIcon::ActivationReason reason)
 Processes an activation event by the tray icon.
void setLogUpdateInterval (unsigned int interval)
 Updates all of the existing log consoles to update at the specified update interval (in msecs).
void setShowViewLogPrompt (bool viewPrompt)
 Updates whether the view log prompt should be shown when logging is enabled.
void setAlwaysViewLog (bool alwaysView)
 Updates whether the log should automatically be shown if show view log prompt is disabled.
void setEnableNotifications (bool enable)
 Updates whether notifications should be enabled.
void disableComponentLog (int compId)
 Disable the menu option to view the component log for the given component.
void setObservingNotifications (bool isObserving)
 Updates whether this Assistant is observing notifications from other Assistants on the network.
void sendNotifyObserveMsg ()
 Sends the notification observe message.
void pruneStaleNotifyObservers ()
 Removes old observers who have not sent a message in a while.

Signals

void shutdown ()
 Emitted when the user chooses to shutdown the assistant.
void displayActiveWarningDialogs ()
 Emitted if active warning dialogs should be brought to the front.
void showLatencyTestDialog (int)
 Emitted when a latency dialog should be shown for a given component.
void displayFederateInfoDialog (int)
 Emitted when a display federate dialog should be shown for a given component.
void showConfigDialog ()
 Emitted when the configuration dialog should be shown.
void showFederationsDialog ()
 Emitted when the federations view dialog should be shown.
void showNetworkComponentsDialog ()
 Emitted when the rtiNetworkComponent view dialog should be shown.
void showConnectionsConfiguration (int pageNum)
 Emitted when the connections configuration should be shown.

Public Member Functions

 DtAssistantTrayIconMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr > prefMgr, DtBoost::shared_ptr< DtAssistantComponentMgr > compMgr, DtBoost::shared_ptr< DtAssistantConnectionInfoMgr > connInfoMgr)
 Constructor.
virtual ~DtAssistantTrayIconMgr ()
 Destructor.
virtual void startShutdown ()
 Hides the tray icon at the start of shutdown.
void setConnectionsPage (int pageNum)
 Informs this manager what the page number in the preferences dialog of the connection configuration page.
void enableComponentLatencyTest (int id)
 Enable the menu option to run a latency test.
void disableComponentLatencyTest (int id)
 Disable the menu option to run a latency test.

Protected Types

typedef std::map< int,
DtAssistantComponentMenu * > 
DtIdToMenuMap
typedef std::map< int,
DtConsoleDialog * > 
DtIdToFileConsoleMap
typedef std::map< int, QString > DtIdToWebSpyUrlMap

Protected Member Functions

virtual void loadBrowserPage (const QString &page)
 Load the given URL into the default browser.
virtual QString createWebSpyUrl (const MAKRti::DtString &host, int port, int id=-1)
 Constructs the URL for a web spy page.
void enableComponentWebSpy (DtAssistantComponentMenu *menu, const MAKRti::DtString &host, int port, int webSpyId=-1)
 Enables the menu option to open the web spy page for the component.
void disableComponentWebSpy (DtAssistantComponentMenu *menu)
 Disables the menu option to open the web spy page for the component.
void enableComponentLog (DtAssistantComponentMenu *menu, const MAKRti::DtString &logName, MAKRti::DtNotifyLevelType level)
 Enable the menu option to view the component log.
void disableComponentLog (DtAssistantComponentMenu *menu)
 Disable the menu option to view the component log.

Protected Attributes

DtBoost::shared_ptr
< DtAssistantPreferencesInfoMgr
myPrefMgr
 The manager that keeps track of Assistant preferences.
DtBoost::shared_ptr
< DtAssistantComponentMgr
myCompMgr
 The manager that keeps track of all local RTI components.
DtBoost::shared_ptr
< DtAssistantConnectionInfoMgr
myConnInfoMgr
 The manager that keeps track of all RTI connections.
QSystemTrayIcon * myTrayIcon
 The tray icon.
QMenumyMenu
 The tray icon context menu.
QAction * myShowNotifyHistoryAction
 Context menu action to show the notification console.
QAction * myVersionsWebSiteAction
 Context menu action to show the RTI versions web site.
QAction * myShowPreferencesAction
 Context menu action to show the Assistant configuration preferences dialog.
QAction * myShowFederationsAction
 Context menu action to show the Assistant federations view dialog.
QAction * myShowAboutAction
 Context menu action to show the RTI about dialog.
QAction * myShowRtiNetworkComponentAction
 Context Menu action to show the Assistant rtiNetworkComponent view dialog.
QAction * myShowHelpAction
 Context menu action to show the help dialog.
DtIdToMenuMap myCompMenus
 Context menu sub-menus for the RTI components.
QAction * myLrcSeparator
 Separator for the LRC section.
QAction * myShutdownAllAction
 Action to exit all RTI applications on this machine.
DtAssistantNotifyDialogmyNotifyDialog
 The dialog which displays brief notification messages.
DtConsoleDialogmyNotifyConsole
 The dialog for the console widget which displays the full notification history.
DtIdToFileConsoleMap myComponentConsoles
 Map from component IDs to console widgets.
DtAssistantViewLogNowDialogmyViewLogNowDialog
 The dialog that asks users if they would like to view the log immediately upon enabling.
DtAboutBoxmyAboutDialog
 The dialog that displays information about this version of the RTI.
QProcess * myHelpAssistant
 Help application.
QString myWebSpyUrl
 The URL for the web spy network map.
DtIdToWebSpyUrlMap myCompWebSpyUrl
 Map from component IDs to web spy URLs.
std::set< int > myViewLogCompIds
 The set of component IDs whose logs should immediately be opened once log viewing is enabled.
bool myDisplayNotifyIcon
 Indicates that the notification icon should be displayed in the tray.
unsigned myDisplayWarningCount
 The count of the number of dialogs currently displayed which cause a warning icon to be displayed in the tray.
unsigned int myLogUpdateInterval
 Interval at which log consoles will be updated.
bool myShowViewLogPrompt
 Whether a prompt should be shown asking the user if they want to view the log immediately upon enabling it.
bool myAlwaysViewLog
 Whether, if myShowViewLogPrompt is false, the log should automatically be shown.
bool myEnableNotifications
 Whether or not notifications are disabled.
int myConnectionsPage
 The preferences page for connection configuration.
std::map< int, MAKRti::DtString > myLastNotifyNames
 Map of names previously displayed in a notification for a given component ID.
bool myObservingNotifications
 Whether notifications from other assistants are being observed.
std::map< DtAssistantInfo, boolmyNotifyObservers
 The list of remote Assistants that are observing notifications.

Private Member Functions

 DtAssistantTrayIconMgr (DtAssistantTrayIconMgr const &)
 Copy Constructor not implemented -- Copy Not Allowed!
DtAssistantTrayIconMgroperator= (DtAssistantTrayIconMgr const &)
 Assignment not implemented -- Assignment Not Allowed!

Message Callbacks

static void processNotifyMsg (const DtAssistantNotifyMsg &msg, void *usr)
 Callback to process a notification message from a component.
static void processShowDialogMsg (const DtAssistantShowDialogMsg &msg, void *usr)
 Callback to process a show dialog message from a client assistant.
static void processNotifyObserveMsg (const DtAssistantNotifyObserveMsg &msg, void *usr)
 Callback to process a notification observation message.
virtual void processNotifyMsg (const DtAssistantNotifyMsg &msg)
 Called by the callback function to process notification messages.
virtual void processShowDialogMsg (const DtAssistantShowDialogMsg &msg)
 Called by the callback function to process show dialog messages.
virtual void processNotifyObserveMsg (const DtAssistantNotifyObserveMsg &msg)
 Called by the callback function to process notification observation messages.

Detailed Description

Responsible for maintaining the assistant tray icon, its menu, and the notifications displayed by it.

Begins processing commands received from the user's interaction with the menu.


Member Typedef Documentation

typedef std::map< int, DtConsoleDialog*> DtAssistantTrayIconMgr::DtIdToFileConsoleMap [protected]
typedef std::map< int, QString> DtAssistantTrayIconMgr::DtIdToWebSpyUrlMap [protected]

Constructor & Destructor Documentation

DtAssistantTrayIconMgr::DtAssistantTrayIconMgr ( DtBoost::shared_ptr< DtRtiAssistantServer server,
DtBoost::shared_ptr< DtRtiAssistantPeer peer,
DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr prefMgr,
DtBoost::shared_ptr< DtAssistantComponentMgr compMgr,
DtBoost::shared_ptr< DtAssistantConnectionInfoMgr connInfoMgr 
)

Copy Constructor not implemented -- Copy Not Allowed!


Member Function Documentation

void DtAssistantTrayIconMgr::addComponent ( int  id) [slot]

Clears the notify icon if displayed.

References myDisplayNotifyIcon, myDisplayWarningCount, myTrayIcon, and DtAssistantMgr::theRtiIcon.

Referenced by DtAssistantTrayIconMgr(), and showNotifyConsole().

Registers that a popup dialog has been dismissed and clears the warning icon if all popup warnings have been dismissed.

References myDisplayNotifyIcon, myDisplayWarningCount, myTrayIcon, DtAssistantMgr::theNotifyRtiIcon, and DtAssistantMgr::theRtiIcon.

QString DtAssistantTrayIconMgr::createWebSpyUrl ( const MAKRti::DtString &  host,
int  port,
int  id = -1 
) [protected, virtual]

Constructs the URL for a web spy page.

Referenced by enableComponentWebSpy(), and showComponentWebSpy().

Disable the menu option to run a latency test.

References myCompMenus.

void DtAssistantTrayIconMgr::disableComponentLog ( int  compId) [slot]

Disable the menu option to view the component log for the given component.

References disableComponentLog(), and myCompMenus.

Disables the menu option to open the web spy page for the component.

References DtAssistantComponentMenu::enableWebSpy(), DtAssistantComponentMenu::id(), and myCompWebSpyUrl.

Referenced by processComponentUpdate().

Emitted if active warning dialogs should be brought to the front.

Emitted when a display federate dialog should be shown for a given component.

Referenced by addComponent().

Enable the menu option to run a latency test.

References myCompMenus.

void DtAssistantTrayIconMgr::enableComponentLog ( DtAssistantComponentMenu menu,
const MAKRti::DtString &  logName,
MAKRti::DtNotifyLevelType  level 
) [protected]
void DtAssistantTrayIconMgr::enableComponentWebSpy ( DtAssistantComponentMenu menu,
const MAKRti::DtString &  host,
int  port,
int  webSpyId = -1 
) [protected]

Enables the menu option to open the web spy page for the component.

References createWebSpyUrl(), DtAssistantComponentMenu::enableWebSpy(), DtAssistantComponentMenu::id(), and myCompWebSpyUrl.

Referenced by processComponentUpdate().

void DtAssistantTrayIconMgr::loadBrowserPage ( const QString &  page) [protected, virtual]

Load the given URL into the default browser.

Referenced by showComponentWebSpy(), and showVersionsWebpage().

void DtAssistantTrayIconMgr::notification ( const MAKRti::DtString &  message,
MAKRti::DtNotifyLevelType  notifyLevel,
int  sourceCompId = -1,
bool  logOnly = false,
bool  forward = true 
) [slot]

Displays a notification for the component with the given ID.

Referenced by processNotifyMsg().

void DtAssistantTrayIconMgr::notification ( const MAKRti::DtString &  message,
MAKRti::DtNotifyLevelType  notifyLevel,
const MAKRti::DtString &  source,
bool  logOnly = false,
bool  forward = true 
) [slot]

Displays a notification with the given component name.

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

Assignment not implemented -- Assignment Not Allowed!

Cleans up after the help dialog when it is closed.

References myHelpAssistant.

Referenced by showHelpDialog().

void DtAssistantTrayIconMgr::processNotifyMsg ( const DtAssistantNotifyMsg msg,
void *  usr 
) [static, protected]

Callback to process a notification message from a component.

Referenced by DtAssistantTrayIconMgr(), and ~DtAssistantTrayIconMgr().

void DtAssistantTrayIconMgr::processNotifyMsg ( const DtAssistantNotifyMsg msg) [protected, virtual]
void DtAssistantTrayIconMgr::processNotifyObserveMsg ( const DtAssistantNotifyObserveMsg msg,
void *  usr 
) [static, protected]

Callback to process a notification observation message.

Referenced by DtAssistantTrayIconMgr().

void DtAssistantTrayIconMgr::processShowDialogMsg ( const DtAssistantShowDialogMsg msg,
void *  usr 
) [static, protected]

Callback to process a show dialog message from a client assistant.

Referenced by DtAssistantTrayIconMgr(), and ~DtAssistantTrayIconMgr().

void DtAssistantTrayIconMgr::processShowDialogMsg ( const DtAssistantShowDialogMsg msg) [protected, virtual]
void DtAssistantTrayIconMgr::processTrayIconActivation ( QSystemTrayIcon::ActivationReason  reason) [slot]

Processes an activation event by the tray icon.

References showFederationsDialog().

Referenced by DtAssistantTrayIconMgr().

Removes old observers who have not sent a message in a while.

References myNotifyObservers.

Referenced by DtAssistantTrayIconMgr().

void DtAssistantTrayIconMgr::removeComponent ( int  id) [slot]

Removes an existing component from the menu.

References myCompMenus, myCompWebSpyUrl, and myMenu.

Referenced by DtAssistantTrayIconMgr().

void DtAssistantTrayIconMgr::renameComponent ( int  id) [slot]

Processes a component exit request.

References myCompMgr, and DtAssistantMgr::myServer.

Referenced by addComponent().

void DtAssistantTrayIconMgr::sendComponentUpdateNotifyLevel ( int  id,
MAKRti::DtNotifyLevelType  level 
) [slot]

Processes an update to a component notify level from the menu.

References myCompMgr, and DtAssistantMgr::myServer.

Referenced by enableComponentLog().

Sends the notification observe message.

References myObservingNotifications, and DtAssistantMgr::myPeer.

Referenced by setObservingNotifications().

void DtAssistantTrayIconMgr::setAlwaysViewLog ( bool  alwaysView) [slot]

Updates whether the log should automatically be shown if show view log prompt is disabled.

References myAlwaysViewLog.

Referenced by DtAssistantTrayIconMgr().

Informs this manager what the page number in the preferences dialog of the connection configuration page.

References myConnectionsPage.

Updates whether notifications should be enabled.

References myEnableNotifications.

Referenced by DtAssistantTrayIconMgr().

void DtAssistantTrayIconMgr::setLogUpdateInterval ( unsigned int  interval) [slot]

Updates all of the existing log consoles to update at the specified update interval (in msecs).

References myComponentConsoles, myLogUpdateInterval, and DtFileConsoleWidget::setUpdateInterval().

Referenced by DtAssistantTrayIconMgr().

Updates whether this Assistant is observing notifications from other Assistants on the network.

References connect(), myConnInfoMgr, myObservingNotifications, and sendNotifyObserveMsg().

Referenced by DtAssistantTrayIconMgr().

Updates whether the view log prompt should be shown when logging is enabled.

References myShowViewLogPrompt.

Referenced by DtAssistantTrayIconMgr().

Opens the RTI about dialog.

References myAboutDialog, and DtAssistantMgr::showDialog().

Referenced by DtAssistantTrayIconMgr().

Displays the component's console.

References myComponentConsoles, and DtAssistantMgr::showDialog().

Referenced by addComponent(), and enableComponentLog().

Opens a browser to display the web spy page for the component.

References loadBrowserPage(), and myCompWebSpyUrl.

Referenced by addComponent().

void DtAssistantTrayIconMgr::showComponentWebSpy ( const MAKRti::DtString &  host,
int  port,
int  webSpyId 
) [slot]

Opens a browser to display the web spy page for the component with the given information.

References createWebSpyUrl(), and loadBrowserPage().

Emitted when the configuration dialog should be shown.

Referenced by DtAssistantTrayIconMgr().

Emitted when the connections configuration should be shown.

Referenced by processShowDialogMsg().

Emitted when the federations view dialog should be shown.

Referenced by DtAssistantTrayIconMgr(), processShowDialogMsg(), and processTrayIconActivation().

Opens the RTI help dialog.

References connect(), DtRtiLibPath(), myHelpAssistant, and processHelpDialogClose().

Referenced by DtAssistantTrayIconMgr().

Emitted when a latency dialog should be shown for a given component.

Referenced by addComponent().

Emitted when the rtiNetworkComponent view dialog should be shown.

Referenced by DtAssistantTrayIconMgr(), and processShowDialogMsg().

Displays the notification console with the full history of notifications which have been displayed.

References clearNotifyIcon(), myNotifyConsole, and DtAssistantMgr::showDialog().

Referenced by DtAssistantTrayIconMgr(), and processShowDialogMsg().

Changes the tray icon to show that a notification message has been received but not acknowledged by the user, just in case they missed it.

References myDisplayNotifyIcon, myDisplayWarningCount, myNotifyConsole, myTrayIcon, and DtAssistantMgr::theNotifyRtiIcon.

Referenced by DtAssistantTrayIconMgr().

Opens a browser to display the RTI versions web page.

References loadBrowserPage().

Referenced by DtAssistantTrayIconMgr().

Changes the tray icon to show that a popup dialog has been activated that needs attention by the user.

References myDisplayWarningCount, myTrayIcon, and DtAssistantMgr::theWarningRtiIcon.

Emitted when the user chooses to shutdown the assistant.

Referenced by DtAssistantTrayIconMgr().

Hides the tray icon at the start of shutdown.

Reimplemented from DtAssistantMgr.

References myTrayIcon.


Member Data Documentation

The dialog that displays information about this version of the RTI.

Referenced by DtAssistantTrayIconMgr(), and showAboutDialog().

Whether, if myShowViewLogPrompt is false, the log should automatically be shown.

Referenced by sendComponentEnableLogging(), and setAlwaysViewLog().

Map from component IDs to console widgets.

Referenced by disableComponentLog(), enableComponentLog(), renameComponent(), setLogUpdateInterval(), and showComponentConsole().

Map from component IDs to web spy URLs.

Referenced by disableComponentWebSpy(), enableComponentWebSpy(), removeComponent(), and showComponentWebSpy().

The preferences page for connection configuration.

Referenced by processShowDialogMsg(), and setConnectionsPage().

The manager that keeps track of all RTI connections.

Referenced by DtAssistantTrayIconMgr(), and setObservingNotifications().

Indicates that the notification icon should be displayed in the tray.

Referenced by clearNotifyIcon(), clearWarningIcon(), and showNotifyIcon().

The count of the number of dialogs currently displayed which cause a warning icon to be displayed in the tray.

Referenced by clearNotifyIcon(), clearWarningIcon(), showNotifyIcon(), and showWarningIcon().

Whether or not notifications are disabled.

Referenced by setEnableNotifications().

std::map<int, MAKRti::DtString> DtAssistantTrayIconMgr::myLastNotifyNames [protected]

Map of names previously displayed in a notification for a given component ID.

Interval at which log consoles will be updated.

Referenced by enableComponentLog(), and setLogUpdateInterval().

Separator for the LRC section.

Referenced by addComponent(), and DtAssistantTrayIconMgr().

The tray icon context menu.

Referenced by addComponent(), DtAssistantTrayIconMgr(), and removeComponent().

The dialog for the console widget which displays the full notification history.

Referenced by DtAssistantTrayIconMgr(), showNotifyConsole(), and showNotifyIcon().

The dialog which displays brief notification messages.

Referenced by DtAssistantTrayIconMgr().

The list of remote Assistants that are observing notifications.

Referenced by processNotifyObserveMsg(), and pruneStaleNotifyObservers().

Whether notifications from other assistants are being observed.

Referenced by processNotifyMsg(), sendNotifyObserveMsg(), and setObservingNotifications().

The manager that keeps track of Assistant preferences.

Referenced by DtAssistantTrayIconMgr(), and sendComponentEnableLogging().

Context menu action to show the RTI about dialog.

Referenced by DtAssistantTrayIconMgr().

Context menu action to show the Assistant federations view dialog.

Referenced by DtAssistantTrayIconMgr().

Context menu action to show the help dialog.

Referenced by DtAssistantTrayIconMgr().

Context menu action to show the notification console.

Referenced by DtAssistantTrayIconMgr().

Context menu action to show the Assistant configuration preferences dialog.

Referenced by DtAssistantTrayIconMgr().

Context Menu action to show the Assistant rtiNetworkComponent view dialog.

Referenced by DtAssistantTrayIconMgr().

Whether a prompt should be shown asking the user if they want to view the log immediately upon enabling it.

Referenced by sendComponentEnableLogging(), and setShowViewLogPrompt().

Action to exit all RTI applications on this machine.

Referenced by DtAssistantTrayIconMgr().

QSystemTrayIcon* DtAssistantTrayIconMgr::myTrayIcon [protected]

Context menu action to show the RTI versions web site.

Referenced by DtAssistantTrayIconMgr().

std::set< int > DtAssistantTrayIconMgr::myViewLogCompIds [protected]

The set of component IDs whose logs should immediately be opened once log viewing is enabled.

Referenced by enableComponentLog(), and sendComponentEnableLogging().

The dialog that asks users if they would like to view the log immediately upon enabling.

Referenced by DtAssistantTrayIconMgr(), and sendComponentEnableLogging().

The URL for the web spy network map.


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)