]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
Migrate to Qt 5
authorimn <imn@opencascade.com>
Thu, 26 Nov 2015 14:47:18 +0000 (17:47 +0300)
committerimn <imn@opencascade.com>
Thu, 26 Nov 2015 14:47:18 +0000 (17:47 +0300)
25 files changed:
CMakeLists.txt
src/genericgui/BL_Buttons.cxx
src/genericgui/BL_Buttons.hxx
src/genericgui/BL_CreateJobWizard.cxx
src/genericgui/BL_CreateJobWizard.hxx
src/genericgui/BL_GenericGui.cxx
src/genericgui/BL_JobTab.cxx
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.cxx
src/genericgui/CMakeLists.txt
src/genericgui/JM_EditSalomeResource.cxx
src/genericgui/JM_EditSalomeResource.hxx
src/genericgui/JM_ResourceCatalog.cxx
src/genericgui/JM_ResourceCatalog.hxx
src/genericgui/JM_SalomeResource.cxx
src/genericgui/JM_SalomeResource.hxx
src/salomegui/CMakeLists.txt
src/standalone/main.cxx
src/wrappers/BL_MainWindows_Qt.cxx
src/wrappers/BL_MainWindows_SALOME.cxx
src/wrappers/BL_MainWindows_Wrap.hxx

index 3316b89e534d6f37dfa7fa967ce0d4b94a357f3f..89d8eadc244093f70dcb43412ec646ec3d2dc674 100755 (executable)
@@ -94,9 +94,13 @@ 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)
+  INCLUDE(${QT_USE_FILE})
+ELSE()
+  FIND_PACKAGE(SalomeQt5 REQUIRED)
+ENDIF()
 
 # Detection summary:
 SALOME_PACKAGE_REPORT_AND_CHECK()
index 39218c3358aa2e9bce944ea735cc7c1a4897b406..9a581444bbe858c1ca48519c0adaae0a13f0b5c8 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QGroupBox>
+#include <QHBoxLayout>
+#include <QGridLayout>
+
 #include "BL_Buttons.hxx"
 
 BL::Buttons::Buttons(QWidget * parent) : QWidget(parent)
index 632942237cf637b8be6f38f0897b7650381e611c..83cf45316394c1c073c1eb22fcf547d679866fae 100644 (file)
@@ -21,6 +21,8 @@
 #define _BL_BUTTONS_HXX_
 
 #include <QtGui>
+#include <QWidget>
+#include <QPushButton>
 
 #include "BL_Traces.hxx"
 
index 03679503c5600a73898b30c23b7265c21470b5d6..6c7ddd6523ab0d7df252fadec5f91fdcd302be9b 100644 (file)
@@ -17,6 +17,9 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QFileDialog>
+#include <QMessageBox>
+
 #include "BL_CreateJobWizard.hxx"
 #include "BL_JobsManager_QT.hxx"
 #ifndef WNT
index ee6a34afb89df32f43adb49b3b28d1582ae860df..8e319530da420ca5ac1abc4d846a055732328477 100644 (file)
@@ -21,6 +21,9 @@
 #define _BL_CREATEJOBWIZARD_HXX_
 
 #include <QtGui>
+#include <QWizard>
+#include <QLabel>
+#include <QGridLayout>
 
 #include "BL_Traces.hxx"
 #include "BL_SALOMEServices.hxx"
index 2f773bee75b8e8e6f7c3e7061056ea94c05d8247..a0bc816152c2aa2cf8a86953807bebcfd11722a6 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QAction>
+#include <QMessageBox>
+#include <QScrollArea>
+#include <QSplitter>
+
 #include "BL_GenericGui.hxx"
 
 #ifdef WNT
index c92f5c9a31012d591347a6e27640faa5017b46d1..981d99be534d57fc743e6cd9a05f5ec803f23d32 100644 (file)
@@ -17,6 +17,8 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QGroupBox>
+
 #include "BL_JobTab.hxx"
 #include "BL_Traces.hxx"
 
index 46e8a810d0a9f0815277db86feb6ddc9654af8f1..2ed75a9dac8f20ddc2763ba28b43d289bdf09414 100644 (file)
@@ -21,6 +21,7 @@
 #define _BL_JOBTAB_HXX_
 
 #include <QtGui>
+#include <QFormLayout>
 
 #include "BL_JobsManager_QT.hxx"
 
index d2f3e01744c20fe218aa0b61b504d4d4e1b1fd63..888c6aa0055cc23dfb02cdc9281ba763a2f6df98 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QApplication>
+#include <QFileDialog>
+#include <QGroupBox>
+#include <QMenu>
+#include <QScrollArea>
+
 #include "BL_JobsManager_QT.hxx"
 #include "BL_GenericGui.hxx"
 #include <vector>
@@ -132,8 +138,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..956815c8ffef7cb692395e87806699b85cabfc4a 100644 (file)
@@ -21,6 +21,8 @@
 #define _BL_JOBSMANAGER_QT_HXX_
 
 #include <QObject>
+#include <QDockWidget>
+#include <QTextEdit>
 
 #include "BL_Traces.hxx"
 #include "BL_JobsManager.hxx"
index 1579a3998ae512ac975f3b1025b2107229941ba1..303f512b6557d9802ca5e8582d0b0c3674ce3891 100644 (file)
@@ -17,6 +17,8 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QHeaderView>
+
 #include "BL_JobsTable.hxx"
 #include "BL_Traces.hxx"
 #include "BL_GenericGui.hxx"
@@ -39,7 +41,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..7e6cad7c938dd048c5d3756686bc673cebdd3e62 100644 (file)
@@ -21,6 +21,7 @@
 #define _BL_JOBSTABLE_HXX_
 
 #include <QtGui>
+#include <QTableView>
 
 namespace BL
 {
index cc87af337c0c1bd56473c6c456a0e8e5c1c7ab50..6c7dfea61ce75a749ffb0dd8c2feeeb988c2ccd0 100644 (file)
@@ -17,6 +17,8 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QFormLayout>
+
 #include "BL_Summary.hxx"
 #include "BL_Traces.hxx"
 
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 edc568ecf48bd64e8fcf378510bd4189b88b4260..2c912d20503cbeb95942d68ac283f9982fed3a7f 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QDialogButtonBox>
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QInputDialog>
+#include <QMessageBox>
+#include <QLabel>
+#include <QVBoxLayout>
+
 #include "JM_EditSalomeResource.hxx"
 #include "BL_Traces.hxx"
 
index f80b51d5b9fb09dcba88bef622c986bcb8462029..4256ce8abb97a9cbeb4512aa83f25b54602f8012 100644 (file)
 
 #include <string>
 #include <QtGui>
+#include <QDialog>
+#include <QComboBox>
+#include <QCheckBox>
+#include <QLineEdit>
+#include <QListWidget>
+#include <QPushButton>
+#include <QSpinBox>
+#include <QWidget>
+
 #include "BL_SALOMEServices.hxx"
 
 namespace JM 
index 4d2ded906e7ff6bd791845ce929f34234294a391..8190744a3cbbb998893af893521e93e5af279d56 100644 (file)
@@ -17,6 +17,9 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+
 #include "JM_ResourceCatalog.hxx"
 #include "BL_Traces.hxx"
 #include "JM_SalomeResource.hxx"
index 9acce2516d703d60bce64a2166f98d0d30446866..d32c37d531abb78033560b7f517ab80d959a010b 100644 (file)
@@ -21,6 +21,8 @@
 #define _JM_RESOURCECATALOG_HXX_
 
 #include <QtGui>
+#include <QListWidget>
+#include <QPushButton>
 
 #include "BL_SALOMEServices.hxx"
 
index 43398b9272d63e00e214924efafff46fc837af69..1e5a59b42da006a90adca9a7080e23edd58bfaab 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QLabel>
+#include <QVBoxLayout>
+
 #include "JM_SalomeResource.hxx"
 #include "BL_Traces.hxx"
 
index 62f26d3c35136104b15025e508ade398aa3d00d6..df53fa41c0717cc26fb4c0f4ff893cf5f4d7dd5c 100644 (file)
 #define _JM_SALOMERESOURCE_HXX_
 
 #include <QtGui>
+#include <QDialog>
+#include <QCheckBox>
+#include <QLineEdit>
+#include <QListWidget>
+
 #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..3d9ed5689836d6bd08e48ba6ec14b6eb45ed7705 100644 (file)
@@ -18,6 +18,8 @@
 //
 
 #include <QtGui>
+#include <QApplication>
+
 #include "BL_GenericGui.hxx"
 #include "BL_MainWindows_Qt.hxx"
 
index 86a0403c9bcd7960e884947647090b353f06246e..9c41b3a81ec8389756d83130dc09b0ca4c525e35 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QAction>
+#include <QMenu>
+#include <QMenuBar>
+
 #include "BL_MainWindows_Qt.hxx"
 
 BL::MainWindows_Qt::MainWindows_Qt(QMainWindow * main_window)
index 2486601223ae07d3d4f979d212625506db8ebf39..06f1c77c1603b400ae8bece92303234296520ba0 100644 (file)
@@ -17,6 +17,8 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include <QTextEdit>
+
 #include "BL_MainWindows_SALOME.hxx"
 #include <SalomeApp_Engine_i.h>
 
index f00efd2a94f9fa9d70b4de824105d9209f4c6767..7cdfe1fe44defdd4b99f3c8fec169411cf37e069 100644 (file)
@@ -22,6 +22,7 @@
 #define _BL_MAINWINDOWS_WRAP_HXX_
 
 #include <QtGui>
+#include <QMainWindow>
 #include "BL_Traces.hxx"
 
 namespace BL