13 #include "ui_federationsViewDialogUI.h"
19 #include <QTreeWidget>
21 #include <QtCore/QDir>
23 #include <vlutil/vlUtil.h>
24 #include <vlutil/vlTime.h>
52 DtFederationsViewProcess = 0,
60 DtFederationsViewCommandLine
77 QWidget* parent = 0, Qt::WindowFlags flags = 0 );
83 virtual QSize sizeHint()
const;
90 virtual void setConnectionIsLocal(
const MAKRti::DtString& name,
bool isLocal );
93 virtual void checkAndAddMainForwarder(
const MAKRti::DtString& hostname,
int port );
96 virtual void checkAndAddLightweight(
const MAKRti::DtString& hostname );
99 virtual void addNetworkMapForwarderNode(
const MAKRti::DtString& forwarderName,
int port );
102 virtual void removeNetworkMapForwarderNode(
const MAKRti::DtString& forwarderName,
int port );
105 virtual void addNetworkMapRtiexecNode();
108 virtual void removeNetworkMapRtiexecNode();
111 virtual void addNetworkMapFederateNode(
int fedHandle,
112 const MAKRti::DtString& federationName,
113 const MAKRti::DtString& processName,
const MAKRti::DtString& fedType,
114 const MAKRti::DtString& fedName,
bool notJoined =
false,
115 bool isDropped =
false );
118 virtual void removeNetworkMapFederateNode(
int fedHandle,
119 const MAKRti::DtString& federationName );
122 virtual void updateNetworkMapFederateNode(
int fedHandle,
123 const MAKRti::DtString& federationName,
int queueStatus,
124 bool disconnected,
bool reconnecting,
bool inErrorState =
false );
127 virtual void refreshNetworkMap();
130 virtual void clearData();
136 virtual void clearNetworkMap();
139 virtual void enableCommands(
bool enable );
142 virtual void enableRtiExecShutdownCommand(
bool enable );
145 virtual void enableRtiForwarderShutdownCommand(
bool enable );
148 virtual void displayLoadingIndication();
151 virtual void removeLoadingIndication();
154 virtual void saveGuiConfiguration();
156 virtual Ui::FederationsViewDialog getUiImpl()
const;
163 virtual int addConnection(
const MAKRti::DtString& name,
167 virtual void removeConnection(
const MAKRti::DtString& name );
180 virtual void removeFederation(
const MAKRti::DtString& federationName );
183 virtual void removeAllFederations();
189 const MAKRti::DtString& federationName,
const std::vector<DtAssistantForwarderInfo>& peerInfos);
193 virtual void removeFederate(
int federateHandle,
const MAKRti::DtString& federationName );
197 virtual void setupFederateTree();
203 virtual void selectFederate(
const MAKRti::DtString& federation,
int federateHandle,
207 virtual void selectDeadFederate(
const MAKRti::DtString& federation,
214 virtual void selectForwarder(
const MAKRti::DtString& name,
int port );
226 virtual void selectLightweight();
229 virtual void initializeQtToolTips();
232 virtual DtSelectedNodeType selectedNodeType()
const;
235 virtual void addForeignAssistant(
const DtAssistantInfo& assistantHost );
237 virtual void addAndUpdateRtiAssociatedConnectionData(
const DtRtiConnectionInfo& connectionInfo,
244 void processConnectionSelection(
int index,
bool ignoreVisibility =
false );
247 void showHelpDialog();
250 void processHelpDialogClose();
253 void showEvent( QShowEvent* event );
256 virtual void hideEvent( QHideEvent* event );
259 void closeEvent( QCloseEvent* event );
262 void keyPressEvent( QKeyEvent* event );
265 void shutdownCurrentRtiexec();
268 void shutdownCurrentRtiForwarder();
271 void updateNetworkMap();
277 void changeFederationColor(
const QString& federationName,
278 const QColor& newColor );
281 void enableFederationColors(
bool enable );
284 void setFederateIdentifierType(
unsigned int fedIdType );
287 void showSyncPointDialog();
290 void showFederateStatsDialog();
293 void showFomDialog();
299 void updateFederateRemovalTime(
float period );
302 void clearSelection();
305 void updateFederateIcon();
308 void showSelectedFederateRidParams();
311 void showSelectedFederateLog();
314 void showForiegnAssistantConnectionsDialog();
317 void showConnectForwarderDialog();
320 void forwarderConnectionSelected(
const QString& connectionName );
323 virtual void noMapNodeSelected();
326 virtual void noTreeNodeSelected();
329 virtual void switchToPeerForwarder(
const MAKRti::DtString& hostName,
int port );
338 void processForeignConnectionAdded(
const QString& hostNameIp,
const QString& hostIpString,
339 const QString& localInterfaceAddr );
342 void processForeignConnectionRemoved(
const QString& hostNameIp,
const QString& hostIpString,
343 const QString& localInterfaceAddr );
351 void startupRtiexec();
354 void shutdownRtiexec();
357 void startupRtiForwarder();
364 void shutdownForwarder();
367 void aboutDialogRequested();
370 void showPopup(
const MAKRti::DtString&,
const MAKRti::DtString&,
const MAKRti::DtString& );
373 void forceFederateResign(
int,
const QString& );
376 void forceFederationDestroy(
const QString& );
379 void showRtiexecRidParams();
382 void showForwarderRidParams();
385 void showFederateRidParams(
const MAKRti::DtString& federation,
int federateHandle );
388 void showRtiexecLog();
391 void showForwarderLog();
394 void showFederateLog(
const MAKRti::DtString& federation,
int federateHandle );
397 void showLatencyTestDialog(
const QString& fedexName,
int fedHandle );
400 void enableNetworkTesting(
const QString& fedexName );
403 void disableNetworkTesting(
const QString& fedexName );
410 void showFederationsViewPreferences();
413 void federateSelected(
const MAKRti::DtString& federation,
int federateHandle );
416 void rtiexecSelected();
419 void forwarderSelected(
const MAKRti::DtString& name,
int port );
422 void peerForwarderSelected(
const MAKRti::DtString& name,
int port );
425 void federationSelected(
const MAKRti::DtString& name );
428 void lightweightSelected();
431 void showSyncPointDialog(
const MAKRti::DtString& name );
434 void showFederateStatsDialog(
const MAKRti::DtString& federation,
int federateHandle );
437 void defunctFederateRemoved(
const MAKRti::DtString& federation,
int federateHandle );
440 void showFomDialog(
const MAKRti::DtString& federation,
int federateHandle );
443 void refreshFederationsView();
452 void makeForeignConnection(
const QString& hostNameIp,
const QString& hostIpString,
453 const QString& localInterfaceAddr );
456 void breakForeignConnection(
const QString& hostNameIp,
const QString& hostIpString,
457 const QString& localInterfaceAddr );
468 virtual void showFederateInfo(
const MAKRti::DtString& federation,
int federateHandle,
472 virtual void showDeadFederateInfo(
const MAKRti::DtString& federation,
493 virtual MAKRti::DtString selectedFederateId()
const;
499 virtual void setupUI();
502 virtual void setupMenus();
505 virtual void connectSignals();
510 virtual void loadGuiConfiguration();
512 virtual QAction* createMenuAction( QString itemText, QIcon icon,
bool enabled =
true );