![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2008 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: rtiNetworkComponentViewDialog.h,v $ $Revision: 1.19 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 00012 00013 #ifndef rtiNetworkComponentViewDialog_H_ 00014 #define rtiNetworkComponentViewDialog_H_ 00015 00016 #include "rtiMsConfig.h" 00017 #include "ui_networkComponentViewDialogUI.h" 00018 #include "assistantConnectionInfo.h" 00019 #include "federationInfo.h" 00020 #include <qtreewidget.h> 00021 #include <map> 00022 #include <vector> 00023 #include <list> 00024 00025 #include <vlutil/vlUtil.h> 00026 #include <vlutil/vlTime.h> 00027 00028 #include <qdir.h> 00029 #include <qcombobox.h> 00030 00031 #include <RIDparams.h> 00032 00033 #include "rtiFederationWidget.h" 00034 00035 class DtWidgetDialog; 00036 class DtExecConsoleWidget; 00037 class QSignalMapper; 00038 class QProcess; 00039 class DtAssistantForwarderInfo; 00040 class DtForwarderConfig; 00041 class QTextEdit; 00042 class QSplitter; 00043 class DtNCVTree; 00044 00045 00046 class DT_DLL_ASSISTANTAPP DtRtiNetworkComponentViewDialog : public QMainWindow 00047 { 00048 Q_OBJECT 00049 00050 public: 00051 enum DtNetworkComponentViewHeaderEnum 00052 { 00053 DtNetworkComponentViewProcess = 0, 00054 DtNetworkComponentViewIP, 00055 DtNetworkComponentViewHandle, 00056 DtNetworkComponentViewHostName, 00057 DtNetworkComponentViewQueueStatus, 00058 DtNetworkComponentViewName, 00059 DtNetworkComponentViewType, 00060 DtNetworkComponentViewPID, 00061 DtNetworkComponentViewCommandLine 00062 }; 00063 00065 DtRtiNetworkComponentViewDialog( 00066 const MAKRti::DtFilename& configDir, 00067 QWidget* parent = 0, 00068 Qt::WindowFlags flags = 0 ); 00069 00071 virtual ~DtRtiNetworkComponentViewDialog(); 00072 00074 virtual void tick(); 00075 00077 virtual void addRtiForwarder( const MAKRti::DtString& name, 00078 const DtRtiConnectionInfo& forwarderInfo, bool isLocal ); 00079 00081 virtual void removeRtiForwarder( const MAKRti::DtString& name ); 00082 00085 virtual void setConnectionIsLocal( const MAKRti::DtString& name, bool isLocal ); 00086 00090 virtual bool selectedRtiForwarder( DtRtiConnectionInfo& forwarderInfo ) const; 00091 00093 virtual int selectedRtiForwarder() const; 00094 00096 virtual void setData(const DtAssistantForwarderInfo& data); 00097 00099 virtual void clearData(); 00100 00101 virtual void setViewedConnectionDescription(const DtRtiConnectionInfo& conn); 00102 virtual MAKRti::DtString viewedConnectionDescription() const; 00103 00105 virtual void writeToConsole( const char* text, MAKRti::DtNotifyLevelType notifyLevel ); 00106 00108 virtual void clearConsole(); 00109 00111 virtual void clearConnectionTree(); 00112 00115 virtual unsigned consoleTextSize() const; 00116 00119 virtual void updateNotifyLevel( MAKRti::DtNotifyLevelType level ); 00120 00122 virtual void enableCommands( bool enable ); 00123 00125 virtual void enableRtiExecShutdownCommand( bool enable ); 00126 00128 virtual void enableRtiForwarderShutdownCommand( bool enable ); 00129 00130 //virtual void refreshCommandsEnabled(); 00131 00133 virtual void displayLoadingIndication(); 00134 00136 virtual void removeLoadingIndication(); 00137 00139 void saveGuiState(); 00140 00141 Ui::NetworkComponentViewDialog getUiImpl() const; 00142 public slots: 00143 00145 virtual void processRtiForwarderSelection( int index, bool ignoreVisibility = false ); 00146 00148 virtual void showHelpDialog(); 00149 00151 virtual void processHelpDialogClose(); 00152 00154 virtual void showEvent( QShowEvent* event ); 00155 00157 virtual void closeEvent(QCloseEvent* event); 00158 00160 virtual void keyPressEvent( QKeyEvent* event ); 00161 00163 virtual void showContextMenu( const QPoint& ); 00164 00166 virtual void shutdownCurrentRtiexec(); 00167 00169 virtual void shutdownCurrentRtiForwarder(); 00170 00171 signals: 00172 00174 void viewedRtiForwarderChanged( const DtRtiConnectionInfo& conn ); 00175 00177 void requestLog(); 00178 00180 void shutdownRtiexec(); 00181 00183 void shutdownForwarder(); 00184 00186 void aboutDialogRequested(); 00187 00189 void showPopup(const MAKRti::DtString&, const MAKRti::DtString&, const MAKRti::DtString&); 00190 00191 00192 protected: 00193 00195 00196 00197 00198 void setupUI(); 00199 00201 void setupMenus(); 00202 00204 void connectSignals(); 00206 00207 protected: 00208 00209 Ui::NetworkComponentViewDialog myUiImpl; 00210 00212 QProcess* myHelpAssistant; 00213 00215 QComboBox* myRtiForwarderComboBox; 00216 00218 std::map< QString, DtRtiConnectionInfo > myRtiForwarderConnsByName; 00219 00221 DtExecConsoleWidget* myConsoleWidget; 00222 QDockWidget* myConsoleDockWidget; 00223 00224 bool myRtiExecInCurrentViewedConn; 00225 //bool myCommandsEnabled; 00226 00227 00229 DtBoost::shared_ptr<DtForwarderConfig> myForwarderConfig; 00230 00231 QLabel* myRtiForwarderLabel; 00232 QHBoxLayout* myComboBoxLabelLayout; 00233 QVBoxLayout* myVLayout; 00234 QWidget* myVLayoutWidget; 00235 QGridLayout* myPropertiesAreaLayout; 00236 QWidget* myPropertiesAreaLayoutWidget; 00237 00238 QSplitter* myTopSplitter; 00239 QSplitter* myBottomSplitter; 00240 00242 00243 00244 QAction* myCloseAction; 00245 QAction* myShutdownAction; 00246 QAction* myShutdownForwarderAction; 00247 00248 QTreeWidgetItem* myExecItem; 00249 QTreeWidgetItem* myCurrentViewedItem; 00250 00251 00252 00254 QAction* myHelpAction; 00255 QAction* myAboutAction; 00256 00258 QAction* myConsoleAction; 00259 QMenu* myContextMenu; 00260 00262 QMenu* myCompColumnMenu; 00263 00264 QLabel* myDescriptionLabel; 00265 QLabel* myHostHeaderLabel; 00266 QLabel* myBEAddrHeaderLabel; 00267 QLabel* myBEPortHeaderLabel; 00268 QLabel* myRelPortHeaderLabel; 00269 QLabel* myNetworkInterfaceAddrHeaderLabel; 00270 QLabel* myForwarderPortHeaderLabel; 00271 00272 QLabel* myHostLabel; 00273 QLabel* myBEAddrLabel; 00274 QLabel* myBEPortLabel; 00275 QLabel* myRelPortLabel; 00276 QLabel* myNetworkInterfaceAddrLabel; 00277 QLabel* myForwarderPortLabel; 00279 00282 MAKRti::DtString myViewedHostName; 00283 00285 QTreeWidgetItem* myLoadingIndicationItem; 00286 00288 QString myLastViewedForwarder; 00289 00291 static QString theNoConnectionsAvailableText; 00292 00294 static const QString theLoadingText; 00295 00297 DtNCVTree* myTreeView; 00298 }; 00299 00300 #endif //! rtiNetworkComponentViewDialog_H_ 00301 00302