]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' of newgeom:newgeom.git into BR_PORTING_CENTOS_6_3
authorSergey BELASH <belash.sergey@opencascade.com>
Fri, 11 Apr 2014 16:11:45 +0000 (20:11 +0400)
committerSergey BELASH <belash.sergey@opencascade.com>
Fri, 11 Apr 2014 16:11:45 +0000 (20:11 +0400)
Conflicts:
CMakeCommon/FindPython.cmake
CMakeCommon/XMLProcessing.cmake

12 files changed:
1  2 
CMakeCommon/FindPython.cmake
CMakeCommon/XMLProcessing.cmake
linux_env.sh
src/Config/Config_FeatureReader.cpp
src/Config/Config_ModuleReader.cpp
src/Model/Model_Document.cxx
src/ModelAPI/ModelAPI_PluginManager.h
src/XGUI/CMakeLists.txt
src/XGUI/XGUI_PartDataModel.cpp
src/XGUI/XGUI_SelectionMgr.h
src/XGUI/XGUI_Workbench.h
src/XGUI/XGUI_Workshop.cpp

Simple merge
index f54729b865d60666258599a92723526329b2926a,5e38c02ec11bba25b3e3a0716796954a36059a00..a1dbefe0ad1534fa369d63680cd0396742b4cecb
@@@ -1,21 -1,33 +1,27 @@@
- CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
 -SET(LIBXMLDIR $ENV{LIBXML2_ROOT_DIR})
  
- SET(LIBXMLDIR $ENV{LIBXML2_ROOT_DIR})
+ IF(WIN32)
+   INCLUDE_DIRECTORIES(${LIBXMLDIR}/include)
+ ELSE()
+   INCLUDE_DIRECTORIES(${LIBXMLDIR}/include/libxml2)
+ ENDIF(WIN32)
+ LINK_DIRECTORIES (${LIBXMLDIR}/lib)
++
  IF(WIN32)
      SET(LIBXML2_LIBRARIES ${LIBXMLDIR}/lib/libxml2.lib)
 +    INCLUDE_DIRECTORIES(${LIBXMLDIR}/include/libxml2)
  ELSE()
      SET(LIBXML2_LIBRARIES ${LIBXMLDIR}/lib/libxml2.so)
 +    SET(LIBXML2_INCLUDE_DIR ${LIBXMLDIR}/include/libxml2)
 +      FIND_PACKAGE(LibXml2 REQUIRED)
 +      if(LIBXML2_FOUND)
 +          message(STATUS "Found libxml2 ver. " ${LIBXML2_VERSION_STRING})
 +          message(STATUS "LIBXML2_LIBRARIES " ${LIBXML2_LIBRARIES})
 +          message(STATUS "LIBXML2_INCLUDE_DIR " ${LIBXML2_INCLUDE_DIR})
 +      endif(LIBXML2_FOUND)
 +      
 +      INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
 +      ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
  ENDIF()
 +LINK_DIRECTORIES (${LIBXMLDIR}/lib)
  
 -
 -#set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${LIBXMLDIR}/lib/libxml2.lib)
 -
 -#FILE(TO_CMAKE_PATH $ENV{PC_LIBXML_INCLUDEDIR} PC_LIBXML_INCLUDEDIR)
 -#FILE(TO_CMAKE_PATH $ENV{PC_LIBXML_INCLUDEDIR} PC_LIBXML_INCLUDEDIR)
 -#FILE(TO_CMAKE_PATH $ENV{PC_LIBXML_LIBDIR} PC_LIBXML_LIBDIR)
 -#message(STATUS "PC_LIBXML_INCLUDEDIR " ${PC_LIBXML_INCLUDEDIR})
 -#message(STATUS "PC_LIBXML_LIBDIR " ${PC_LIBXML_LIBDIR})
 - 
 -#FIND_PACKAGE(LibXml2 REQUIRED)
 -#if(LIBXML2_FOUND)
 -#    message(STATUS "Found libxml2 ver. " ${LIBXML2_VERSION_STRING})
 -#    message(STATUS "LIBXML2_LIBRARIES " ${LIBXML2_LIBRARIES})
 -#    message(STATUS "LIBXML2_INCLUDE_DIR " ${LIBXML2_INCLUDE_DIR})
 -#endif(LIBXML2_FOUND)
 -
 -#INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
 -#ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
diff --cc linux_env.sh
index 0000000000000000000000000000000000000000,889f5e402ff8d79bfcfd6b8592ec0e4c1b023ac4..a84ae8b7ca51e6880cee841296366197e483b741
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,85 +1,87 @@@
 -
+ #------ Setting products installation directory ------
+ export INST_ROOT=/misc/dn21/hdfeditor/sbh/NewGeom/products
+ #------ Python ------
+ export PYTHON_ROOT_DIR=${INST_ROOT}/Python-2.7.3
+ export PYTHONHOME=${PYTHON_ROOT_DIR}
+ export PYTHON_INCLUDE=${PYTHON_ROOT_DIR}/include/python2.7
+ export PYTHON_VERSION=2.7
+ export PATH=${PYTHON_ROOT_DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${PYTHON_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+ export PYTHONPATH=${PYTHON_ROOT_DIR}/lib/python2.7
+ #For cmake
+ export PYTHON_LIB_DIR=${PYTHON_ROOT_DIR}/lib
+ export PYTHON_INC_DIR=${PYTHON_INCLUDE}
+ ##
+ #------ Qt ------
+ export QT4_ROOT_DIR=${INST_ROOT}/qt-4.8.4
+ export QT_PLUGIN_PATH=${QT4_ROOT_DIR}/plugins
+ export PATH=${QT4_ROOT_DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${QT4_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+ ##
+ #------ boost ------
+ #export BOOST_ROOT_DIR=${INST_ROOT}/boost-1.52.0
+ #export LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib
+ ##
+ #------ swig ------
+ export SWIG_ROOT_DIR=${INST_ROOT}/swig-2.0.8
+ export SWIG_LIB=${SWIG_ROOT_DIR}/share/swig/2.0.8
+ export PATH=${SWIG_ROOT_DIR}/bin:${PATH}
+ ##
+ #------ cmake ------
+ export CMAKE_ROOT_DIR=${INST_ROOT}/cmake-2.8.10.2
+ export PATH=${CMAKE_ROOT_DIR}/bin:${PATH}
+ ##
+ #------ freetype ------
+ export FREETYPE_ROOT_DIR=${INST_ROOT}/freetype-2.4.11
+ export LD_LIBRARY_PATH=${FREETYPE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+ ##
+ #------ freeimage ------
+ export FREEIMAGE_ROOT_DIR=${INST_ROOT}/freeimage-3.15.4
+ export PATH=${FREEIMAGE_ROOT_DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${FREEIMAGE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+ ##
+ #------ gl2ps ------
+ export GL2PS_ROOT_DIR=${INST_ROOT}/gl2ps-1.3.8
+ export PATH=${GL2PS_ROOT_DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${GL2PS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+ ##
+ #------ tbb ------
+ export TBB_ROOT_DIR=${INST_ROOT}/tbb-30_018oss
+ export PATH=${TBB_ROOT_DIR}/bin/intel64/cc4.1.0_libc2.4_kernel2.6.16.21:${PATH}
+ export LD_LIBRARY_PATH=${TBB_ROOT_DIR}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21:${LD_LIBRARY_PATH}
+ ##
+ #------ libxml2 ------
+ export LIBXML2_ROOT_DIR=${INST_ROOT}/libxml2-2.9.0
+ export PATH=${LIBXML2_ROOT_DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${LIBXML2_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+ # DO NOT rename following 3 variables, 
+ # they are required by CMake "find(Libxml2)" procedure
+ export LIBXML2_INCLUDE_DIR=${LIBXML2_ROOT_DIR}/include/libxml2
+ export LIBXML2_LIB_DIR=${LIBXML2_ROOT_DIR}/lib
+ export LIBXML2_BIN_DIR=${LIBXML2_ROOT_DIR}/bin
+ ##
+ #------ OCCT ------
+ export CAS_ROOT_DIR=${INST_ROOT}/OCCT-6.7.0
+ export PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
++export CSF_GraphicShr=${CAS_ROOT_DIR}/lib/libTKOpenGl.so
+ # Variable for Foundation Classes : 
+ export CSF_UnitsLexicon=${CAS_ROOT_DIR}/src/UnitsAPI/Lexi_Expr.dat 
+ export CSF_UnitsDefinition=${CAS_ROOT_DIR}/src/UnitsAPI/Units.dat 
+ # Variable for DataExchange : 
+ export CSF_SHMessage=${CAS_ROOT_DIR}/src/SHMessage
+ export CSF_XSMessage=${CAS_ROOT_DIR}/src/XSMessage 
+ # Variable for Font : 
+ export CSF_MDTVFontDirectory=${CAS_ROOT_DIR}/src/FontMFT 
+ export CSF_MDTVTexturesDirectory=${CAS_ROOT_DIR}/src/Textures 
+ # Activation of OCCT Kernel multithreading :
+ export MMGT_REENTRANT=1
+ # this variable only needed for DRAWEXE
+ export CASROOT=${CAS_ROOT_DIR}
+ ##
+ export LIB=${LD_LIBRARY_PATH}
++export PATH=${INST_ROOT}/../install/bin:${PATH}
++export LD_LIBRARY_PATH=${INST_ROOT}/../install/bin:${INST_ROOT}/../install/swig:${LD_LIBRARY_PATH}
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 1e79322ca2afcd871885938b10fc4c86051268dc,f0e1d9f4b7c0d8fc4d7e0c40f5148be514c0a995..40f4671db277b9c204dc6da0ad184043f3f83b8f
@@@ -292,5 -318,31 +318,31 @@@ FeaturePtr XGUI_PartDataModel::feature(
    case ConstructObject:
      return featureDocument()->feature(CONSTRUCTIONS_GROUP, theIndex.row());
    }
 -  return 0;
 +  return FeaturePtr();
  }
 -}
+ bool XGUI_PartDataModel::hasDocument(const std::shared_ptr<ModelAPI_Document>& theDoc) const
+ {
+   return (featureDocument() == theDoc);
+ }
+ QModelIndex XGUI_PartDataModel::findParent(const std::shared_ptr<ModelAPI_Feature>& theFeature) const
+ {
+   QString aGroup(theFeature->getGroup().c_str());
+   if (theFeature->getGroup().compare(PARAMETERS_GROUP) == 0)
+     return createIndex(0, 0, (quintptr) ParamsFolder);
+   if (theFeature->getGroup().compare(CONSTRUCTIONS_GROUP) == 0)
+     return createIndex(1, 0, (quintptr) ConstructFolder);
+   return QModelIndex();
+ }
+ QModelIndex XGUI_PartDataModel::findGroup(const std::string& theGroup) const
+ {
+   if (theGroup.compare(PARAMETERS_GROUP) == 0)
+     return createIndex(0, 0, (quintptr) ParamsFolder);
+   if (theGroup.compare(CONSTRUCTIONS_GROUP) == 0)
+     return createIndex(1, 0, (quintptr) ConstructFolder);
+   return QModelIndex();
++}
Simple merge
Simple merge
index 1a1f7382dc25522e745ffb81c72455c91de0c9e3,0aac474da326408d2dbfde354e49283c7af0734a..02a02ec868276213c3114f6f0e49207787a96b63
@@@ -340,3 -373,38 +373,38 @@@ bool XGUI_Workshop::activateModule(
    myPartSetModule->createFeatures();
    return true;
  }
 -}
+ //******************************************************
+ void XGUI_Workshop::updateCommandStatus()
+ {
+   XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
+   QList<XGUI_Command*> aCommands = aMenuBar->features();
+   QList<XGUI_Command*>::const_iterator aIt;
+   std::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
+   if (aMgr->hasRootDocument()) {
+     XGUI_Command* aUndoCmd;
+     XGUI_Command* aRedoCmd;
+     for (aIt = aCommands.constBegin(); aIt != aCommands.constEnd(); ++aIt) {
+       if ((*aIt)->id() == "UNDO_CMD")
+         aUndoCmd = (*aIt);
+       else if ((*aIt)->id() == "REDO_CMD")
+         aRedoCmd = (*aIt);
+       else // Enable all commands
+         (*aIt)->enable();
+     }
+     std::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
+     aUndoCmd->setEnabled(aDoc->canUndo());
+     aRedoCmd->setEnabled(aDoc->canRedo());
+   } else {
+     for (aIt = aCommands.constBegin(); aIt != aCommands.constEnd(); ++aIt) {
+       if ((*aIt)->id() == "NEW_CMD")
+         (*aIt)->enable();
+       else if ((*aIt)->id() == "EXIT_CMD")
+         (*aIt)->enable();
+       else 
+         (*aIt)->disable();
+     }
+   }
++}