]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
Merge Qt5 porting. V8_0_0a1
authorimn <imn@opencascade.com>
Thu, 26 Nov 2015 14:47:18 +0000 (17:47 +0300)
committerrnv <rnv@opencascade.com>
Wed, 23 Dec 2015 15:39:20 +0000 (18:39 +0300)
17 files changed:
CMakeLists.txt
src/genericgui/BL_Buttons.hxx
src/genericgui/BL_CreateJobWizard.hxx
src/genericgui/BL_GenericGui.hxx
src/genericgui/BL_JobTab.hxx
src/genericgui/BL_JobsManager_QT.cxx
src/genericgui/BL_JobsManager_QT.hxx
src/genericgui/BL_JobsTable.cxx
src/genericgui/BL_JobsTable.hxx
src/genericgui/BL_Summary.hxx
src/genericgui/CMakeLists.txt
src/genericgui/JM_EditSalomeResource.hxx
src/genericgui/JM_ResourceCatalog.hxx
src/genericgui/JM_SalomeResource.hxx
src/salomegui/CMakeLists.txt
src/standalone/main.cxx
src/wrappers/BL_MainWindows_Wrap.hxx

index 3316b89e534d6f37dfa7fa967ce0d4b94a357f3f..d340b4cd3b7435fb6484599a07fa6b248bef1a54 100755 (executable)
@@ -94,9 +94,12 @@ ELSE(EXISTS ${GUI_ROOT_DIR})
   MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
 ENDIF(EXISTS ${GUI_ROOT_DIR})
 
-# Qt4
-FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
-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()
 
 # Detection summary:
 SALOME_PACKAGE_REPORT_AND_CHECK()
index 632942237cf637b8be6f38f0897b7650381e611c..815214f9503777ed2e654bedcd2983fc91ed7d9f 100644 (file)
 #ifndef _BL_BUTTONS_HXX_
 #define _BL_BUTTONS_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 #include "BL_Traces.hxx"
 
index ee6a34afb89df32f43adb49b3b28d1582ae860df..39d2ea0e0809ed0ce3c3eb3051421e42f6b79e65 100644 (file)
 #ifndef _BL_CREATEJOBWIZARD_HXX_
 #define _BL_CREATEJOBWIZARD_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 #include "BL_Traces.hxx"
 #include "BL_SALOMEServices.hxx"
index 513030234b8a5e15b3a21f97f85e66ee2bf57c4f..2e78812c72ee99bdb0618457e4c08e0a912eddda 100644 (file)
 #ifndef _BL_GENERICGUI_HXX_
 #define _BL_GENERICGUI_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 #include "BL_GenericGuiDefines.hxx"
 
index 46e8a810d0a9f0815277db86feb6ddc9654af8f1..89e86cbdc0d46423282ad2478a96e7812e851ee1 100644 (file)
 #ifndef _BL_JOBTAB_HXX_
 #define _BL_JOBTAB_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 #include "BL_JobsManager_QT.hxx"
 
index d2f3e01744c20fe218aa0b61b504d4d4e1b1fd63..cb8d7ddd8f887259b8d02adf4b287099602ae0df 100644 (file)
@@ -132,8 +132,8 @@ BL::JobsManager_QT::save_jobs_button()
   filters << "XML files (*.xml)"
           << "Any files (*)";
   dialog.setFileMode(QFileDialog::AnyFile);
-  dialog.setFilters(filters);
-  dialog.selectFilter("(*.xml)");
+  dialog.setNameFilters(filters);
+  dialog.selectNameFilter("(*.xml)");
   dialog.setDefaultSuffix("xml");
   dialog.setConfirmOverwrite(true);
   dialog.setAcceptMode(QFileDialog::AcceptSave);
index c2155ca7461a9944ddc38ab80e3b16f8d50337d0..88fb54f2d598b53bd5e1d3c7a696346f20cd14f4 100644 (file)
 #ifndef _BL_JOBSMANAGER_QT_HXX_
 #define _BL_JOBSMANAGER_QT_HXX_
 
-#include <QObject>
+#include <QtGlobal>
+#include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 #include "BL_Traces.hxx"
 #include "BL_JobsManager.hxx"
index 1579a3998ae512ac975f3b1025b2107229941ba1..e8f439171a8cd7fd091d6b1dd105a6152e3a40a0 100644 (file)
@@ -39,7 +39,11 @@ BL::JobsTable::JobsTable(QWidget *parent) : QTableView(parent)
   setSelectionMode(QAbstractItemView::ExtendedSelection);
 
   QHeaderView * header_view = verticalHeader();
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   header_view->setClickable(false);
+#else
+  header_view->setSectionsClickable(false);
+#endif
 }
 
 BL::JobsTable::~JobsTable()
index 23875e25bf29b5fe405a6c1b1497be73ca162d37..a30c202ecf4714d3982cc3666ffc368d3e741ecb 100644 (file)
 #ifndef _BL_JOBSTABLE_HXX_
 #define _BL_JOBSTABLE_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 namespace BL
 {
index 11285086134c146d2c3b44fb92f87e03d95ae448..f16bc746abb1faa2af2954e5d75d4747e616a731 100644 (file)
 #ifndef _BL_SUMMARY_HXX_
 #define _BL_SUMMARY_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
+
 #include "BL_JobsManager_QT.hxx"
 
 namespace BL 
index 1472154d1795f5b7cfef225ef70199f059bb4c67..ce8e14007b51da1dddabb6f0aaefa45a8156ff48 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
@@ -65,7 +65,7 @@ SET(BL_GenericGui_HEADERS
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${BL_GenericGui_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${BL_GenericGui_HEADERS})
 
 # sources / static
 SET(_other_SOURCES 
@@ -92,7 +92,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(BL_GenericGui_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_uic_HEADERS})
index f80b51d5b9fb09dcba88bef622c986bcb8462029..b95afe521ac50f4611771ad66dcfb37aa59abac0 100644 (file)
 #ifndef _JM_EDITSALOMERESOURCE_HXX_
 #define _JM_EDITSALOMERESOURCE_HXX_
 
-#include <string>
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
+
+#include <string>
+
 #include "BL_SALOMEServices.hxx"
 
 namespace JM 
index 9acce2516d703d60bce64a2166f98d0d30446866..078afbbf4e5f79143b573ed0619c00275904e6de 100644 (file)
 #ifndef _JM_RESOURCECATALOG_HXX_
 #define _JM_RESOURCECATALOG_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
 
 #include "BL_SALOMEServices.hxx"
 
index 62f26d3c35136104b15025e508ade398aa3d00d6..fbd95f9b2c14f62fee2ae2319e1897fec2d7ed2c 100644 (file)
 #ifndef _JM_SALOMERESOURCE_HXX_
 #define _JM_SALOMERESOURCE_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
+
 #include "BL_SALOMEServices.hxx"
 
 #include <string>
index a3bf912d08e115151a9b6d53f18d0b7f97e5342a..1f656c23aa2400978f0136f5580d0b7fb3949e6f 100644 (file)
@@ -17,6 +17,8 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQtExt)
+
 # --- options ---
 # additional include directories
 INCLUDE_DIRECTORIES(
@@ -58,7 +60,7 @@ SET(JOBMANAGER_HEADERS
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${JOBMANAGER_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${JOBMANAGER_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
index 94960f5e2b7b9fce585d8dbb85f4398c3bbb70d1..cef72e30533bfe969dfc00e7eb0255f511ee5bab 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
+
 #include "BL_GenericGui.hxx"
 #include "BL_MainWindows_Qt.hxx"
 
index f00efd2a94f9fa9d70b4de824105d9209f4c6767..74ce42a6c9f644b2c48eb54eb6631ac5750a1b3c 100644 (file)
 #ifndef _BL_MAINWINDOWS_WRAP_HXX_
 #define _BL_MAINWINDOWS_WRAP_HXX_
 
+#include <QtGlobal>
 #include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
+
 #include "BL_Traces.hxx"
 
 namespace BL