]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Merge Qt5 porting. V8_0_0a1
authorimn <imn@opencascade.com>
Thu, 26 Nov 2015 14:46:02 +0000 (17:46 +0300)
committerrnv <rnv@opencascade.com>
Wed, 23 Dec 2015 15:32:03 +0000 (18:32 +0300)
CMakeLists.txt
src/GUI/CMakeLists.txt
src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx

index 6a25c1d4415bb57a8d1328fd39750da5590ecd9f..6477fdbb67f10f2cdf9a0302f3fa8b3187b62376 100755 (executable)
@@ -108,9 +108,12 @@ ENDIF(SALOME_BUILD_GUI)
 ## From GUI:
 ##
 IF(SALOME_BUILD_GUI)
-  # Qt4
-  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
-  INCLUDE(${QT_USE_FILE})
+  # Qt
+  IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+    FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
+  ELSE()
+    FIND_PACKAGE(SalomeQt5 REQUIRED)
+  ENDIF()
 ENDIF(SALOME_BUILD_GUI)
 
 # VTK
index a902602e0dd51bc0f316a021acd0881ab568b67b..22b7b409eff5ed83b0ebebdc443562461d09a9a3 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 # --- options ---
 # additional include directories
@@ -78,7 +78,7 @@ SET(HYBRIDPluginGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
@@ -103,7 +103,7 @@ SET(_uic_files
 )
 
 # header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
 
 # sources / to compile
 SET(HYBRIDPluginGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_uic_HEADERS})
@@ -115,4 +115,4 @@ TARGET_LINK_LIBRARIES(HYBRIDPluginGUI ${_link_LIBRARIES} )
 INSTALL(TARGETS HYBRIDPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
 INSTALL(FILES ${HYBRIDPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HYBRIDPLUGIN_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HYBRIDPLUGIN_INSTALL_RES_DATA}")
index 072659b5a937c931d7a982e5c6461047c271fd11..747263e8b3af97ac4a23119a1eef5419f277848c 100644 (file)
@@ -526,7 +526,11 @@ QFrame* HYBRIDPluginGUI_HypothesisCreator::buildFrame()
   myEnforcedTableWidget->setAlternatingRowColors(true);
   myEnforcedTableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
   myEnforcedTableWidget->setSelectionBehavior(QAbstractItemView::SelectItems);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myEnforcedTableWidget->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+#else
+  myEnforcedTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+#endif
   myEnforcedTableWidget->resizeColumnsToContents();
   myEnforcedTableWidget->hideColumn(ENF_VER_ENTRY_COLUMN);
   myEnforcedTableWidget->hideColumn(ENF_VER_COMPOUND_COLUMN);
@@ -613,7 +617,11 @@ QFrame* HYBRIDPluginGUI_HypothesisCreator::buildFrame()
                       << tr( "HYBRID_ENF_GROUP_COLUMN" );
   myEnforcedMeshTableWidget->setHorizontalHeaderLabels(enforcedMeshHeaders);
   myEnforcedMeshTableWidget->horizontalHeader()->setStretchLastSection(true);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myEnforcedMeshTableWidget->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+#else
+  myEnforcedMeshTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+#endif
   myEnforcedMeshTableWidget->setAlternatingRowColors(true);
   myEnforcedMeshTableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
   myEnforcedMeshTableWidget->setSelectionBehavior(QAbstractItemView::SelectItems);