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()
#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"
#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"
#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"
#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"
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);
#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"
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()
#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
{
#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
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
# --- 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
)
# 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})
#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
#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"
#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>
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(UseQtExt)
+
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${JOBMANAGER_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${JOBMANAGER_HEADERS})
# sources / static
SET(_other_SOURCES
// 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"
#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