![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /***************************************************************************** 00002 * Copyright (c) 2011 MAK Technologies, Inc. 00003 * All rights reserved. 00004 *****************************************************************************/ 00005 /***************************************************************************** 00006 * $RCSfile: DtHla13ConnectionWidget.h,v $ $Revision: 1.13 $ $State: Exp $ 00007 *****************************************************************************/ 00008 00012 00013 #pragma once 00014 00015 #include <vrvHla13Qt/vrvHla13Qt.h> 00016 00017 #include <vrvHla13Qt/DtHla13ConnectionInterface.h> 00018 00019 #include <vrvHla13Qt/DtHlaConnectionConfigurationLayout.hpp> 00020 00021 #include <QtGui/QWidget> 00022 00023 class QPushButton; 00024 //class QGridLayout; 00025 //class QCheckBox; 00026 //class QComboBox; 00027 //class QGroupBox; 00028 //class QLineEdit; 00029 //class QLabel; 00030 00031 namespace makVrv 00032 { 00033 00034 class DtHla13ConnectionLogic; 00035 00038 class DT_DLL_VRVHLA13QT DtHla13ConnectionWidget : public QWidget, 00039 public DtHla13ConnectionInterface 00040 { Q_OBJECT; 00041 public: 00042 00044 DtHla13ConnectionWidget( DtDe& de, QWidget* parent ); 00045 00047 virtual ~DtHla13ConnectionWidget(); 00048 00050 virtual void setExerciseName( const std::string& exerciseName ); 00051 00053 virtual void setFederateType( const std::string& federateType ); 00054 00056 virtual void setFedFileName( const std::string& fedFileName ); 00057 00059 virtual void setRPRFomVersion( double rprFomVersion, int rprFomRevision = 1 ); 00060 00062 virtual void setFomMapperFileName( const std::string& fomMapperFileName ); 00063 00065 virtual void setFomMapperInitString( const std::string& fomMapperInitString ); 00066 00068 virtual void setAppNumber(int appNumber); 00069 00071 virtual void setSiteId(int siteId); 00072 00074 virtual void setDdmEnabled( bool enabled ); 00075 00077 virtual void setUseAdvisories( bool enabled ); 00078 00080 virtual void setPublishObserver( bool isPublished ); 00081 00083 virtual void setViewControl( bool isEnabled ); 00084 00086 virtual void setConnectionStatus( DtHla13ConnectionInterface::ConnectionStatus status ); 00087 00089 virtual void setAutoConnectEnabled( bool enabled ); 00090 00091 protected: 00092 00095 void setupGui(); 00096 00099 QVBoxLayout* createButtonLayout(); 00100 00103 void connectToWidgetSignals(); 00104 00115 virtual bool parseFomVerRev( const QString& verRevStr, 00116 double& version, int& revision ); 00117 00118 protected slots: 00119 00120 void onFederationNameString_textChanged( QString ); 00121 void onFedFileNameString_textChanged( QString ); 00122 void onFedFileBrowseButton_released(); 00123 void onFederateTypeString_textChanged( QString ); 00124 void onIgnoreAdvisoriesCheckBox_stateChanged( int ); 00125 void onImplicitGeographicDdmCheckBox_stateChanged( int ); 00126 void onRprFomRadioButton_toggled( bool ); 00127 void onRprFomVersionComboBox_activated( QString ); 00128 void onCustomFomRadioButton_toggled( bool ); 00129 void onFomMapperLibraryName_textChanged( QString ); 00130 void onFomMapperInitString_textChanged( QString ); 00131 void onPublishObserversCheckBox_stateChanged( int ); 00132 void onListenForViewControlsCheckBox_stateChanged( int ); 00133 00134 void onConnectButton_clicked(); 00135 void onMakeAutoButton_clicked(); 00136 void onAdvancedButton_checkChanged(bool checked); 00137 00138 void onSiteId_changed(int val); 00139 void onAppNumber_changed(int val); 00140 protected: 00141 00142 Ui::HlaConnectionConfigurationLayout myHlaConfigurationLayout; 00143 00144 DtHla13ConnectionInterface::ConnectionStatus myStatus; 00145 00146 DtHla13ConnectionLogic* myLogic; 00147 00148 DtDe& myDe; 00149 00150 QVBoxLayout* myDataLayout; 00151 QPushButton* myConnectButton; 00152 QPushButton* myMakeAutoButton; 00153 00154 }; 00155 }