From: mpa Date: Thu, 11 Jun 2015 11:45:43 +0000 (+0300) Subject: CMake improvement: usage of SALOME_GUI_MODE() macro X-Git-Tag: V7_7_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f1a3d47119b293a62cfc18225493cee1d6df5e7;p=modules%2Fhexablock.git CMake improvement: usage of SALOME_GUI_MODE() macro --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2caf173..2c08616 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx index 977c616..63692c5 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx @@ -538,7 +538,9 @@ void HEXABLOCKGUI::windows( QMap& 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 diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx index 212e53b..76cfb96 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx @@ -30,7 +30,9 @@ #include #include +#ifndef DISABLE_PYCONSOLE #include +#endif #include #include @@ -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; }