]> SALOME platform Git repositories - modules/hexablock.git/commitdiff
Salome HOME
CMake improvement: usage of SALOME_GUI_MODE() macro cbr/crowdin_V7_7_BR V7_7_0a1 V7_7_0b1
authormpa <mpa@opencascade.com>
Thu, 11 Jun 2015 11:45:43 +0000 (14:45 +0300)
committermpa <mpa@opencascade.com>
Thu, 11 Jun 2015 11:45:43 +0000 (14:45 +0300)
CMakeLists.txt
src/HEXABLOCKGUI/HEXABLOCKGUI.cxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx

index 2caf1730e3e23daf5389472b83fc100f251335db..2c08616ac251fa0a29bbbf287e5b907bc67ad18d 100755 (executable)
@@ -99,6 +99,9 @@ IF(SALOME_BUILD_GUI)
   IF(EXISTS ${GUI_ROOT_DIR})
     LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
     FIND_PACKAGE(SalomeGUI)
+    SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER 
+                    OPTIONAL SALOME_USE_PYCONSOLE)
+    ADD_DEFINITIONS(${GUI_DEFINITIONS})
     # Various
     # Qt4
     FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
index 977c6162e20bc923ebb3644cfb88851b61b0179b..63692c5241c52af06fe778ed2263a93c1edd3e5d 100755 (executable)
@@ -538,7 +538,9 @@ void HEXABLOCKGUI::windows( QMap<int, int>& theMap ) const
     DEBTRACE("HEXABLOCKGUI::windows");
     theMap.clear();
     theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+#ifndef DISABLE_PYCONSOLE
     theMap.insert( SalomeApp_Application::WT_PyConsole,     Qt::BottomDockWidgetArea );
+#endif
 }
 
 QString  HEXABLOCKGUI::engineIOR() const
index 212e53b5e6c28ee280ae7d24a50827657b181915..76cfb961131249c7062a77b3a4f5b875bdbe0dc8 100755 (executable)
@@ -30,7 +30,9 @@
 
 #include <SalomeApp_Application.h>
 #include <SalomeApp_Study.h>
+#ifndef DISABLE_PYCONSOLE
 #include <PyConsole_Console.h>
+#endif
 #include <SalomeApp_Tools.h>
 
 #include <Standard_GUID.hxx>
@@ -5876,6 +5878,7 @@ bool ComputeMeshDialog::apply(QModelIndex& result)
     _currentObj = NULL;
 
     if (getDocumentModel() == NULL) return false;
+#ifndef DISABLE_PYCONSOLE
     QString command = QString("import hexablock ; %1 = hexablock.mesh(\"%2\", \"%1\", %3, \"%4\")")
                                                                                                          .arg( _name->text() )
                                                                                                          .arg( getDocumentModel()->getName() )
@@ -5889,6 +5892,9 @@ bool ComputeMeshDialog::apply(QModelIndex& result)
         pyConsole->exec( command );
     else
         return false;
+#else
+    return false;
+#endif
 
     return true;
 }