void VoxCad::SetupPhysicsWindow(void) { PhysicsDockWidget = new QDockWidget(this); PhysicsDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); PhysicsDlg = new Dlg_Physics(&MainSim, PhysicsDockWidget); PhysicsDockWidget->setWidget(PhysicsDlg); PhysicsDockWidget->setWindowTitle("Physics Settings"); PhysicsDockWidget->setVisible(false); connect(PhysicsDockWidget->toggleViewAction(), SIGNAL(triggered(bool)), this, SLOT(PhysicsMode(bool))); connect(&MainSim, SIGNAL(UpdateText(QString)), PhysicsDlg, SLOT(SetStatusText(QString))); connect(&MainSim, SIGNAL(ReqGLUpdate()), this, SLOT(ReqGLUpdateAll())); connect(&MainSim, SIGNAL(ReqAddPlotPoint(double)), PhysicsDlg, SLOT(AddPlotPoint(double)), Qt::DirectConnection); connect(&MainSim, SIGNAL(StartExternalGLUpdate()), GLWindow, SLOT(StartAutoRedraw())); connect(&MainSim, SIGNAL(StopExternalGLUpdate()), GLWindow, SLOT(StopAutoRedraw())); //connect(FEAInfoDlg, SIGNAL(RequestUpdateGL()), this, SLOT(ReqGLUpdateAll())); //connect(FEAInfoDlg, SIGNAL(GetCurIndex(int*)), this, SLOT(GetCurGLSelected(int*))); //connect(FEAInfoDlg, SIGNAL(GetFEAInfoString(QString*)), &MainFEA, SLOT(GetFEAInfoString(QString*))); //connect(FEAInfoDlg, SIGNAL(GetFEAInfoString(int, QString*)), &MainFEA, SLOT(GetFEAInfoString(int, QString*))); //connect(FEAInfoDlg, SIGNAL(DoneAnalyzing()), this, SLOT(ForceViewMode(void))); addDockWidget(Qt::RightDockWidgetArea, PhysicsDockWidget); }
void VoxCad::SetupTensileWindow(void) { TensileDockWidget = new QDockWidget(this); TensileDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); TensileDlg = new Dlg_Tensile(&MainEnv, PhysicsDockWidget); TensileDockWidget->setWidget(TensileDlg); TensileDockWidget->setWindowTitle("Tensile Testing"); TensileDockWidget->setVisible(false); connect(TensileDlg, SIGNAL(DoneTensileTesting()), this, SLOT(ViewMode())); connect(&TensileDlg->Tester, SIGNAL(StartExternalGLUpdate(int)), GLWindow, SLOT(StartAutoRedraw(int))); connect(&TensileDlg->Tester, SIGNAL(StopExternalGLUpdate()), GLWindow, SLOT(StopAutoRedraw())); addDockWidget(Qt::RightDockWidgetArea, TensileDockWidget); }
void VoxCad::SetupPhysicsWindow(void) { PhysicsDockWidget = new QDockWidget(this); PhysicsDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); PhysicsDlg = new Dlg_Physics(&MainSim, PhysicsDockWidget); PhysicsDockWidget->setWidget(PhysicsDlg); PhysicsDockWidget->setWindowTitle("Physics Settings"); PhysicsDockWidget->setVisible(false); connect(PhysicsDockWidget->toggleViewAction(), SIGNAL(triggered(bool)), this, SLOT(PhysicsMode(bool))); connect(&MainSim, SIGNAL(UpdateText(QString)), PhysicsDlg, SLOT(SetStatusText(QString))); connect(&MainSim, SIGNAL(ReqGLUpdate()), this, SLOT(ReqGLUpdateAll())); connect(&MainSim, SIGNAL(ReqUiUpdate()), PhysicsDlg, SLOT(UpdateUI())); connect(&MainSim, SIGNAL(ReqGLDrawingStatus(bool*)), GLWindow, SLOT(IsDrawing(bool*))); connect(&MainSim, SIGNAL(IsStatusTextVisible(bool*)), PhysicsDlg, SLOT(IsOutputVisible(bool*)), Qt::DirectConnection); connect(&MainSim, SIGNAL(IsPlotVisible(bool*)), PhysicsDlg, SLOT(IsPlotVisible(bool*)), Qt::DirectConnection); connect(&MainSim, SIGNAL(GetPlotRqdStats(char*)), this, SLOT(GetPlotRqdDataType(char*)), Qt::DirectConnection); connect(&MainSim, SIGNAL(ReqAddPlotPoint(double)), PhysicsDlg, SLOT(AddPlotPoint(double)), Qt::DirectConnection); connect(&MainSim, SIGNAL(SimEndedInternally(QString)), PhysicsDlg, SLOT(UpdateUI())); // connect(&MainSim, SIGNAL(SimEndedInternally(QString)), this, SLOT(ReqGLUpdateAll())); connect(&MainSim, SIGNAL(StartExternalGLUpdate(int)), GLWindow, SLOT(StartAutoRedraw(int))); connect(&MainSim, SIGNAL(StopExternalGLUpdate()), GLWindow, SLOT(StopAutoRedraw())); connect(GLWindow, SIGNAL(FindCamTarget(Vec3D<>*)), &MainSim, SLOT(GetCoM(Vec3D<>*))); connect(GLWindow, SIGNAL(WantAutoSaveFrames(bool*)), &MainSim, SLOT(WantFramesAutoSaved(bool*))); connect(GLWindow, SIGNAL(GetFrameFilePath(QString*)), &MainSim, SLOT(AutoSavePath(QString*))); connect(&MainSim, SIGNAL(ResizeGLWindow(int, int)), this, SLOT(ResizeGlWindowArea(int, int))); connect(&MainSim, SIGNAL(ResetGLWindow()), this, SLOT(ResetGlWindowArea())); //connect(FEAInfoDlg, SIGNAL(RequestUpdateGL()), this, SLOT(ReqGLUpdateAll())); //connect(FEAInfoDlg, SIGNAL(GetCurIndex(int*)), this, SLOT(GetCurGLSelected(int*))); //connect(FEAInfoDlg, SIGNAL(GetFEAInfoString(QString*)), &MainFEA, SLOT(GetFEAInfoString(QString*))); //connect(FEAInfoDlg, SIGNAL(GetFEAInfoString(int, QString*)), &MainFEA, SLOT(GetFEAInfoString(int, QString*))); //connect(FEAInfoDlg, SIGNAL(DoneAnalyzing()), this, SLOT(ForceViewMode(void))); addDockWidget(Qt::RightDockWidgetArea, PhysicsDockWidget); }