##
## Prerequisites From GUI:
##
- # Qt4
- FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
+ # Qt
+ IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+ FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
+ ELSE()
+ FIND_PACKAGE(SalomeQt5 REQUIRED)
+ ENDIF()
# SIP
- FIND_PACKAGE(SalomeSIP REQUIRED) # should come after Python and before PyQt4
- # PyQt4
- FIND_PACKAGE(SalomePyQt4 REQUIRED)
+ FIND_PACKAGE(SalomeSIP REQUIRED) # should come after Python and before PyQt5
+ # PyQt
+ IF (NOT SALOME_GUI_BUILD_WITH_QT5)
+ FIND_PACKAGE(SalomePyQt4 REQUIRED)
+ ELSE()
+ FIND_PACKAGE(SalomePyQt5 REQUIRED)
+ ENDIF()
# Qwt
FIND_PACKAGE(SalomeQwt REQUIRED)
ELSE(EXISTS ${GUI_ROOT_DIR})
# 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 ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
# sources / static
SET(_other_SOURCES
INSTALL(FILES ${SMESH_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
myTable->hideColumn( COL_PUBLISHED );
myTable->hideColumn( COL_SHAPEID );
myTable->hideColumn( COL_BAD_MESH );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myTable->horizontalHeader()->setResizeMode( COL_ERROR, QHeaderView::Interactive );
+#else
+ myTable->horizontalHeader()->setSectionResizeMode( COL_ERROR, QHeaderView::Interactive );
+#endif
myTable->setWordWrap( true );
myTable->horizontalHeader()->setStretchLastSection( true );
myTable->setMinimumWidth( 500 );
myOrderMgr = new SMESHGUI_MeshOrderMgr( myDlg->getMeshOrderBox() );
myOrderMgr->SetMesh( myMesh );
bool isOrder = myOrderMgr->GetMeshOrder(myPrevOrder);
- myDlg->getMeshOrderBox()->setShown(isOrder);
+ myDlg->getMeshOrderBox()->setVisible(isOrder);
if ( !isOrder ) {
delete myOrderMgr;
myOrderMgr = 0;
SUIT_FileDlg* aDlg = new SUIT_FileDlg( this, false );
aDlg->setWindowTitle( tr( "SAVE_PATTERN" ) );
aDlg->setFileMode( QFileDialog::AnyFile );
- aDlg->setFilter( tr( "PATTERN_FILT" ) );
+ aDlg->setNameFilter( tr( "PATTERN_FILT" ) );
if ( myName->text() != "" )
aDlg->selectFile( myName->text() );
if ( QFileInfo( fName ).suffix().isEmpty() )
fName = autoExtension( fName );
- fName = QDir::convertSeparators( fName );
+ fName = QDir::toNativeSeparators( fName );
QString aData( myPattern->GetString() );
long aLen = aData.length();
//aDlg->setMode(myMode == COPY_FROM ? QFileDialogP::ExistingFile : QFileDialogP::AnyFile);
aDlg->setFileMode(myMode == COPY_FROM ? QFileDialog::ExistingFile : QFileDialog::AnyFile);
- aDlg->setFilters(prepareFilters());
+ aDlg->setNameFilters(prepareFilters());
aDlg->selectFile(getFileName());
QPushButton* anOkBtn = (QPushButton*)aDlg->findChild<QPushButton*>("OK");
if (QFileInfo(fName).suffix().isEmpty())
fName = autoExtension(fName);
- fName = QDir::convertSeparators(fName);
- QString prev = QDir::convertSeparators(getFileName());
+ fName = QDir::toNativeSeparators(fName);
+ QString prev = QDir::toNativeSeparators(getFileName());
if (prev == fName)
return;
if (QFileInfo(fName).suffix().isEmpty())
fName = autoExtension(fName);
- fName = QDir::convertSeparators(fName);
+ fName = QDir::toNativeSeparators(fName);
if (QFileInfo(fName).exists()) {
isWritable = QFileInfo(fName).isWritable();
" .. ... ... ",
" .. .. .. ",
" . . "};
- return iconFirst;
+ return QPixmap( iconFirst );
}
//=================================================================================
myInfo->setColumnCount( 2 );
myInfo->setHeaderLabels( QStringList() << tr( "PROPERTY" ) << tr( "VALUE" ) );
myInfo->header()->setStretchLastSection( true );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myInfo->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
+#else
+ myInfo->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+#endif
myInfo->setItemDelegate( new ItemDelegate( myInfo ) );
QVBoxLayout* l = new QVBoxLayout( frame() );
l->setMargin( 0 );
{
setColumnCount( 2 );
header()->setStretchLastSection( true );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
header()->setResizeMode( 0, QHeaderView::ResizeToContents );
+#else
+ header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+#endif
header()->hide();
}
DumpFileDlg fd( this );
fd.setWindowTitle( tr( "SAVE_INFO" ) );
- fd.setFilters( aFilters );
+ fd.setNameFilters( aFilters );
fd.myBaseChk->setChecked( anIsBase );
fd.myElemChk->setChecked( anIsElem );
fd.myAddChk ->setChecked( anIsAdd );
DumpFileDlg fd( this );
fd.setWindowTitle( tr( "SAVE_INFO" ) );
- fd.setFilters( aFilters );
+ fd.setNameFilters( aFilters );
fd.myBaseChk->hide();
fd.myElemChk->hide();
fd.myAddChk ->hide();
SUIT_FileDlg* aDlg = new SUIT_FileDlg (this, true);
aDlg->setWindowTitle(tr("LOAD_PATTERN"));
aDlg->setFileMode(QFileDialog::ExistingFile);
- aDlg->setFilters(prepareFilters());
+ aDlg->setNameFilters(prepareFilters());
if (!myName->text().isEmpty())
aDlg->selectFile(myName->text() + ".smp");
- QPushButton* anOkBtn = qFindChild<QPushButton*>( aDlg, "OK" );
+ QPushButton* anOkBtn = aDlg->findChild<QPushButton*>( "OK" );
if (anOkBtn != 0)
anOkBtn->setText(tr("SMESH_BUT_OK"));
if (QFileInfo(fName).suffix().isEmpty())
fName = autoExtension(fName);
- fName = QDir::convertSeparators(fName);
+ fName = QDir::toNativeSeparators(fName);
- QString prev = QDir::convertSeparators(myName->text());
+ QString prev = QDir::toNativeSeparators(myName->text());
if (prev == fName)
return;
# 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 ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
# sources / static
SET(_other_SOURCES
INSTALL(TARGETS StdMeshersGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES ${StdMeshersGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
void GridAxisTab::onMode(int isSpacing)
{
- mySpacingTreeWdg->setShown( isSpacing );
- myCoordList->setShown( !isSpacing );
- myStepSpin->setShown( !isSpacing );
- myStepLabel->setShown( !isSpacing );
+ mySpacingTreeWdg->setVisible( isSpacing );
+ myCoordList->setVisible( !isSpacing );
+ myStepSpin->setVisible( !isSpacing );
+ myStepLabel->setVisible( !isSpacing );
if ( isSpacing )
{
if ( mySpacingTreeWdg->topLevelItemCount() == 0 )
myTable->setData( arr ); //update data in table
}
- myScale->setShown( distr==1 );
- myLScale->setShown( distr==1 );
- myReversedEdgesBox->setShown( distr!=0 );
+ myScale->setVisible( distr==1 );
+ myLScale->setVisible( distr==1 );
+ myReversedEdgesBox->setVisible( distr!=0 );
if ( myReversedEdgesHelper ) {
myReversedEdgesHelper->Clear();
- myReversedEdgesHelper->setShown( distr!=0 );
+ myReversedEdgesHelper->setVisible( distr!=0 );
}
myDirectionWidget->ShowPreview( distr!=0 );
bool isFunc = distr==2 || distr==3;
#ifndef DISABLE_PLOT2DVIEWER
- myPreview->setShown( isFunc );
+ myPreview->setVisible( isFunc );
#endif
- myConvBox->setShown( isFunc );
+ myConvBox->setVisible( isFunc );
- myTable->setShown( distr==2 );
- myExpr->setShown( distr==3 );
- myLExpr->setShown( distr==3 );
- myInfo->setShown( distr==3);
+ myTable->setVisible( distr==2 );
+ myExpr->setVisible( distr==3 );
+ myLExpr->setVisible( distr==3 );
+ myInfo->setVisible( distr==3);
#ifndef DISABLE_PLOT2DVIEWER
//change of preview
ADD_SUBDIRECTORY(doc)
ENDIF(SALOME_BUILD_DOC)
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
# --- scripts ---
)
# scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
# --- rules ---
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UsePyQt4)
+ INCLUDE(UsePyQt)
ENDIF(SALOME_BUILD_GUI)
# --- options ---
)
# scripts / pyuic wrappings
- PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
ENDIF(SALOME_BUILD_GUI)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
# --- scripts ---
)
# scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
# --- rules ---
ADD_SUBDIRECTORY(doc)
ENDIF(SALOME_BUILD_DOC)
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
# --- scripts ---
)
# scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
# --- rules ---
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
# --- scripts ---
)
# scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
# --- rules ---
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
# --- scripts ---
)
# scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
# --- rules ---
SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)