10 #ifndef federationsViewDialog_H_
11 #define federationsViewDialog_H_
14 #include "ui_federationsViewDialogUI.h"
19 #include <QtGui/QTreeWidget>
24 #include <vlutil/vlUtil.h>
25 #include <vlutil/vlTime.h>
27 #include <QtCore/QDir>
28 #include <QtGui/QComboBox>
51 DtFederationsViewProcess = 0,
59 DtFederationsViewCommandLine
64 const MAKRti::DtFilename& configDir,
66 Qt::WindowFlags flags = 0 );
72 virtual QSize sizeHint()
const;
79 virtual void setConnectionIsLocal(
const MAKRti::DtString& name,
bool isLocal );
82 virtual void checkAndAddMainForwarder(
const MAKRti::DtString& hostname);
85 virtual void checkAndAddLightweight(
const MAKRti::DtString& hostname);
88 virtual void addNetworkMapForwarderNode(
const MAKRti::DtString& forwarderName);
91 virtual void removeNetworkMapForwarderNode(
const MAKRti::DtString& forwarderName);
94 virtual void addNetworkMapRtiexecNode();
97 virtual void removeNetworkMapRtiexecNode();
100 virtual void addNetworkMapFederateNode(
int fedHandle,
102 const MAKRti::DtString& processName,
const MAKRti::DtString& fedType,
103 const MAKRti::DtString& fedName,
bool notJoined =
false,
104 bool isDropped =
false);
107 virtual void removeNetworkMapFederateNode(
int fedHandle,
111 void updateNetworkMapFederateNode(
int fedHandle,
113 bool disconnected,
bool reconnecting,
bool inErrorState =
false );
116 void refreshNetworkMap();
119 virtual void clearData();
125 virtual void clearNetworkMap();
128 virtual void enableCommands(
bool enable );
131 virtual void enableRtiExecShutdownCommand(
bool enable );
134 virtual void enableRtiForwarderShutdownCommand(
bool enable );
139 virtual void displayLoadingIndication();
142 virtual void removeLoadingIndication();
145 void saveGuiConfiguration();
147 Ui::FederationsViewDialog getUiImpl()
const;
154 virtual int addConnection(
const MAKRti::DtString& name,
158 virtual void removeConnection(
const MAKRti::DtString& name );
171 virtual void removeFederation(
const MAKRti::DtString&
federationName );
174 virtual void removeAllFederations();
184 virtual void removeFederate(
int federateHandle,
const MAKRti::DtString&
federationName);
188 void setupFederateTree();
194 void selectFederate(
const MAKRti::DtString& federation,
int federateHandle,
199 void selectDeadFederate(
const MAKRti::DtString& federation,
206 void selectForwarder(
const MAKRti::DtString& name);
215 void selectLightweight();
217 virtual void initializeQtToolTips();
223 void processConnectionSelection(
int index,
bool ignoreVisibility =
false );
226 void showHelpDialog();
229 void processHelpDialogClose();
232 void showEvent( QShowEvent* event );
235 virtual void hideEvent( QHideEvent* event );
238 void closeEvent(QCloseEvent* event);
241 void keyPressEvent( QKeyEvent* event );
244 void shutdownCurrentRtiexec();
247 void shutdownCurrentRtiForwarder();
250 void updateNetworkMap();
254 const QColor & newColor );
257 void enableFederationColors(
bool enable );
260 void setFederateIdentifierType(
unsigned int fedIdType );
263 void showSyncPointDialog();
266 void showFederateStatsDialog();
269 void showFomDialog();
275 void updateFederateRemovalTime(
float period );
278 void clearSelection();
281 void updateFederateIcon();
284 void showSelectedFederateRidParams();
287 void showSelectedFederateLog();
294 void shutdownRtiexec();
297 void shutdownForwarder();
300 void aboutDialogRequested();
303 void showPopup(
const MAKRti::DtString&,
const MAKRti::DtString&,
const MAKRti::DtString&);
306 void forceFederateResign(
int,
const QString& );
309 void forceFederationDestroy(
const QString& );
312 void showRtiexecRidParams();
315 void showForwarderRidParams();
318 void showFederateRidParams(
const MAKRti::DtString& federation,
int federateHandle);
321 void showRtiexecLog();
324 void showForwarderLog();
327 void showFederateLog(
const MAKRti::DtString& federation,
int federateHandle);
330 void showLatencyTestDialog(
const QString& fedexName,
int fedHandle );
336 void disableNetworkTesting(
const QString& fedexName );
343 void showFederationsViewPreferences();
346 void federateSelected(
const MAKRti::DtString& federation,
int federateHandle);
349 void rtiexecSelected();
352 void forwarderSelected(
const MAKRti::DtString& name);
355 void peerForwarderSelected(
const MAKRti::DtString& name);
358 void federationSelected(
const MAKRti::DtString& name);
361 void lightweightSelected();
364 void showSyncPointDialog(
const MAKRti::DtString& name);
367 void showFederateStatsDialog(
const MAKRti::DtString& federation,
371 void defunctFederateRemoved(
const MAKRti::DtString& federation,
375 void showFomDialog(
const MAKRti::DtString& federation,
int federateHandle);
380 void showFederateInfo(
const MAKRti::DtString& federation,
int federateHandle,
384 void showDeadFederateInfo(
const MAKRti::DtString& federation,
405 MAKRti::DtString selectedFederateId()
const;
416 void connectSignals();
420 void loadGuiConfiguration();