## From GUI:
##
IF(SALOME_BUILD_GUI)
- # Qt4
- FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ # Qt
+ IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+ FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ ELSE()
+ FIND_PACKAGE(SalomeQt5 REQUIRED)
+ ENDIF()
ENDIF(SALOME_BUILD_GUI)
# OCCT
myEnforcedTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
myEnforcedTreeWidget->setSelectionBehavior(QAbstractItemView::SelectItems);
for (int column = 0; column < ENF_VER_NB_COLUMNS; ++column) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myEnforcedTreeWidget->header()->setResizeMode(column,QHeaderView::Interactive);
+#else
+ myEnforcedTreeWidget->header()->setSectionResizeMode(column,QHeaderView::Interactive);
+#endif
myEnforcedTreeWidget->resizeColumnToContents(column);
}
myEnforcedTreeWidget->hideColumn(ENF_VER_FACE_ENTRY_COLUMN);
int periodicityVisibleColumns = 2;
for (size_t column = 0; column < periodicityVisibleColumns; ++column) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myPeriodicityTreeWidget->header()->setResizeMode(column,QHeaderView::Interactive);
+#else
+ myPeriodicityTreeWidget->header()->setSectionResizeMode(column,QHeaderView::Interactive);
+#endif
myPeriodicityTreeWidget->resizeColumnToContents(column);
}
myPeriodicityTreeWidget->header()->setStretchLastSection(true);
myMinSize->setMinimumWidth( max_width+50 );
myMaxSize->setMinimumWidth( max_width+50 );
// Geometrical parameters
- metrics1 = myAngleMesh->font();
- metrics2 = myChordalError->font();
+ metrics1 = QFontMetrics(myAngleMesh->font());
+ metrics2 = QFontMetrics(myChordalError->font());
width1 = metrics1.width(myAngleMesh->GetString());
width2 = metrics2.width(myChordalError->GetString());
max_width = max(width1,width2);
myAngleMesh->setMinimumWidth( max_width+50 );
myChordalError->setMinimumWidth( max_width+50 );
// Other parameters
- metrics1 = myAnisotropicRatio->font();
- metrics2 = myTinyEdgeLength->font();
- metrics3 = myBadElementAspectRatio->font();
+ metrics1 = QFontMetrics(myAnisotropicRatio->font());
+ metrics2 = QFontMetrics(myTinyEdgeLength->font());
+ metrics3 = QFontMetrics(myBadElementAspectRatio->font());
width1 = metrics1.width(myAnisotropicRatio->GetString());
width2 = metrics2.width(myTinyEdgeLength->GetString());
width3 = metrics3.width(myBadElementAspectRatio->GetString());
# 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 ${BLSURFPluginGUI_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${BLSURFPluginGUI_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(BLSURFPluginGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_uic_HEADERS})
INSTALL(FILES ${BLSURFPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_BLSURFPLUGIN_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_BLSURFPLUGIN_INSTALL_RES_DATA}")