diff --git a/EVENTS/MPM/MPM.cpp b/EVENTS/MPM/MPM.cpp index 12b5d03..42f8acc 100644 --- a/EVENTS/MPM/MPM.cpp +++ b/EVENTS/MPM/MPM.cpp @@ -129,6 +129,8 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS. // #include // #include +// #include + MPM::MPM(RandomVariablesContainer *theRandomVariableIW, QWidget *parent) : SimCenterAppWidget(parent), theRandomVariablesContainer(theRandomVariableIW) { @@ -411,11 +413,11 @@ MPM::MPM(RandomVariablesContainer *theRandomVariableIW, QWidget *parent) // theTabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); -#ifdef _WIN32 +#if defined(Q_OS_WIN) || defined(Q_OS_WIN32) || defined(Q_OS_LINUX) || defined(Q_OS_UNIX) // ----------------------------------------------------------------------------------- // Create a 3D window and container widget and set the 3D window as its layout // Based on code by Alex44, 2018; https://stackoverflow.com/questions/23231012/how-to-render-in-qt3d-in-standard-gui-application) -#ifdef _WIN32 + auto rootEntity = new Qt3DCore::QEntity(); auto view = new Qt3DExtras::Qt3DWindow(); QWidget *container = QWidget::createWindowContainer(view); @@ -1167,17 +1169,27 @@ MPM::MPM(RandomVariablesContainer *theRandomVariableIW, QWidget *parent) horizontalPanelLayout->addWidget(scrollArea); // horizontalPanelLayout->addWidget(visualizationGroup); -#ifdef _WIN32 +// #ifdef _WIN32 +#if defined(Q_OS_WIN) || defined(Q_OS_WIN32) || defined(Q_OS_LINUX) || defined(Q_OS_UNIX) horizontalPanelLayout->addWidget(container); +#endif + // QVBoxLayout *layout = new QVBoxLayout(); + // mainWindowLayout->addWidget(scrollArea); + // mainWindowLayout->addWidget(updateBodiesButton); + // mainWindowLayout->addWidget(container); + mainWindowLayout->addWidget(horizontalPanels); + this->setLayout(mainWindowLayout); connect(stackedWidget, &SlidingStackedWidget::animationFinished, [=](void){ int index = stackedWidget->currentIndex(); mpmBodies->setDigitalTwin(index); mpmBoundaries->setDigitalTwin(index); +// #ifdef _WIN32 +#if defined(Q_OS_WIN) || defined(Q_OS_WIN32) || defined(Q_OS_LINUX) || defined(Q_OS_UNIX) updateDigitalTwin(index); +#endif }); -#endif // QVBoxLayout *layout = new QVBoxLayout(); // mainWindowLayout->addWidget(scrollArea); diff --git a/Hydro-UQ.pro b/Hydro-UQ.pro index b4a79cb..919d3ec 100644 --- a/Hydro-UQ.pro +++ b/Hydro-UQ.pro @@ -42,33 +42,33 @@ win32 { # Windows LIBS += -lAdvapi32 RC_ICONS = icons/NHERI-HydroUQ-Icon.ico - DEPENDPATH += $$PWD/../VTK/bin - INCLUDEPATH += $$PWD/../VTK/include/vtk-9.2 - LIBS += -L$$PWD/../VTK/lib \ - -lvtkViewsCore-9.2 \ - -lvtkFiltersCore-9.2 \ - -lvtkFiltersSources-9.2 \ - -lvtkCommonCore-9.2 \ - -lvtkCommonColor-9.2 \ - -lvtkFiltersGeometry-9.2 \ - -lvtkRenderingCore-9.2 \ - -lvtkInteractionStyle-9.2\ - -lvtkCommonTransforms-9.2\ - -lvtkInteractionWidgets-9.2\ - -lvtkRenderingContextOpenGL2-9.2 \ - -lvtkRenderingFreeType-9.2 \ - -lvtkRenderingGL2PSOpenGL2-9.2 \ - -lvtkRenderingAnnotation-9.2 \ - -lvtkCommonExecutionModel-9.2 \ - -lvtkCommonDataModel-9.2 \ - -lvtkGUISupportQt-9.2 \ - -lvtkRenderingOpenGL2-9.2 \ - -lvtkIOGeometry-9.2 \ - -lvtkViewsQt-9.2 \ - -lvtkImagingCore-9.2 \ - -lvtkIOImage-9.2 \ - -lvtkIOLegacy-9.2 \ - -lvtksys-9.2 + # DEPENDPATH += $$PWD/../VTK/bin + # INCLUDEPATH += $$PWD/../VTK/include/vtk-9.2 + # LIBS += -L$$PWD/../VTK/lib \ + # -lvtkViewsCore-9.2 \ + # -lvtkFiltersCore-9.2 \ + # -lvtkFiltersSources-9.2 \ + # -lvtkCommonCore-9.2 \ + # -lvtkCommonColor-9.2 \ + # -lvtkFiltersGeometry-9.2 \ + # -lvtkRenderingCore-9.2 \ + # -lvtkInteractionStyle-9.2\ + # -lvtkCommonTransforms-9.2\ + # -lvtkInteractionWidgets-9.2\ + # -lvtkRenderingContextOpenGL2-9.2 \ + # -lvtkRenderingFreeType-9.2 \ + # -lvtkRenderingGL2PSOpenGL2-9.2 \ + # -lvtkRenderingAnnotation-9.2 \ + # -lvtkCommonExecutionModel-9.2 \ + # -lvtkCommonDataModel-9.2 \ + # -lvtkGUISupportQt-9.2 \ + # -lvtkRenderingOpenGL2-9.2 \ + # -lvtkIOGeometry-9.2 \ + # -lvtkViewsQt-9.2 \ + # -lvtkImagingCore-9.2 \ + # -lvtkIOImage-9.2 \ + # -lvtkIOLegacy-9.2 \ + # -lvtksys-9.2 } else { @@ -76,41 +76,41 @@ win32 { # Mac ICON = icons/NHERI-HydroUQ-Icon.icns QMAKE_INFO_PLIST=$$PWD/Info.plist + LIBS += -L/usr/local/lib # DEPENDPATH += $$PWD/../VTK/lib # DEPENDPATH += $$PWD/../VTK/Release/bin # INCLUDEPATH += $$PWD/../VTK/Release/include/vtk-9.2 - INCLUDEPATH += $$PWD/../VTK/include/vtk-9.2 - INCLUDEPATH += /usr/local/include/vtk-9.2 - LIBS += -L$$PWD/../VTK/lib - LIBS += -L/usr/local/lib \ - -lvtkViewsCore-9.2 \ - -lvtkFiltersCore-9.2 \ - -lvtkFiltersSources-9.2 \ - -lvtkCommonCore-9.2 \ - -lvtkCommonColor-9.2 \ - -lvtkFiltersGeometry-9.2 \ - -lvtkRenderingCore-9.2 \ - -lvtkInteractionStyle-9.2\ - -lvtkCommonTransforms-9.2\ - -lvtkInteractionWidgets-9.2\ - -lvtkRenderingContextOpenGL2-9.2 \ - -lvtkRenderingFreeType-9.2 \ - -lvtkRenderingGL2PSOpenGL2-9.2 \ - -lvtkRenderingAnnotation-9.2 \ - -lvtkCommonExecutionModel-9.2 \ - -lvtkCommonDataModel-9.2 \ - -lvtkGUISupportQt-9.2 \ - -lvtkRenderingOpenGL2-9.2 \ - -lvtkIOGeometry-9.2 \ - -lvtkViewsQt-9.2 \ - -lvtkImagingCore-9.2 \ - -lvtkIOImage-9.2 \ - -lvtkIOLegacy-9.2 \ - -lvtksys-9.2 + # INCLUDEPATH += $$PWD/../VTK/include/vtk-9.2 + # INCLUDEPATH += /usr/local/include/vtk-9.2 + # LIBS += -L$$PWD/../VTK/lib \ + # -lvtkViewsCore-9.2 \ + # -lvtkFiltersCore-9.2 \ + # -lvtkFiltersSources-9.2 \ + # -lvtkCommonCore-9.2 \ + # -lvtkCommonColor-9.2 \ + # -lvtkFiltersGeometry-9.2 \ + # -lvtkRenderingCore-9.2 \ + # -lvtkInteractionStyle-9.2\ + # -lvtkCommonTransforms-9.2\ + # -lvtkInteractionWidgets-9.2\ + # -lvtkRenderingContextOpenGL2-9.2 \ + # -lvtkRenderingFreeType-9.2 \ + # -lvtkRenderingGL2PSOpenGL2-9.2 \ + # -lvtkRenderingAnnotation-9.2 \ + # -lvtkCommonExecutionModel-9.2 \ + # -lvtkCommonDataModel-9.2 \ + # -lvtkGUISupportQt-9.2 \ + # -lvtkRenderingOpenGL2-9.2 \ + # -lvtkIOGeometry-9.2 \ + # -lvtkViewsQt-9.2 \ + # -lvtkImagingCore-9.2 \ + # -lvtkIOImage-9.2 \ + # -lvtkIOLegacy-9.2 \ + # -lvtksys-9.2 } else { # Presumably Ubuntu 18.04 LTS - # INCLUDEPATH += /usr/local/include/vtk-9.2 LIBS += -L/usr/local/lib \ + # INCLUDEPATH += /usr/local/include/vtk-9.2 #-lvtkViewsCore-9.2 \ #-lvtkFiltersCore-9.2 \ #-lvtkCommonColor-9.2 \