##
IF(SALOME_BUILD_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 QtWebKit QtOpenGL QtNetwork)
+ INCLUDE(${QT_USE_FILE})
+ ELSE()
+ FIND_PACKAGE(SalomeQt5 REQUIRED)
+ ENDIF()
ENDIF(SALOME_BUILD_GUI)
##
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(AdvancedGUI_SOURCES
AdvancedGUI.cxx
TARGET_LINK_LIBRARIES(AdvancedGUI ${_link_LIBRARIES})
INSTALL(TARGETS AdvancedGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-QT4_INSTALL_TS_RESOURCES("${AdvancedGUI_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${AdvancedGUI_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UseQt4Ext)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF()
# --- options ---
IF(SALOME_BUILD_GUI)
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMGUI
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(BREPPluginGUI_SOURCES
BREPPlugin_GUI.cxx
TARGET_LINK_LIBRARIES(BREPPluginGUI ${_link_gui_LIBRARIES})
INSTALL(TARGETS BREPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- QT4_INSTALL_TS_RESOURCES("${BREPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ QT_INSTALL_TS_RESOURCES("${BREPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
ENDIF()
}
}
else if (id == GEOM_POINT_SURF) {
- GroupOnSurface->TextLabel2->setShown(isParam);
- GroupOnSurface->TextLabel3->setShown(isParam);
- GroupOnSurface->SpinBox_DX->setShown(isParam);
- GroupOnSurface->SpinBox_DY->setShown(isParam);
+ GroupOnSurface->TextLabel2->setVisible(isParam);
+ GroupOnSurface->TextLabel3->setVisible(isParam);
+ GroupOnSurface->SpinBox_DX->setVisible(isParam);
+ GroupOnSurface->SpinBox_DY->setVisible(isParam);
}
- GroupXYZ->setShown(!isParam && !isLength);
+ GroupXYZ->setVisible(!isParam && !isLength);
if (theIsUpdate)
QTimer::singleShot(50, this, SLOT(updateSize()));
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(BasicGUI_SOURCES
BasicGUI.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(BlocksGUI_SOURCES
BlocksGUI.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(BooleanGUI_SOURCES
BooleanGUI.cxx
columnNames.append( tr( "GEOM_EDGE" ));
columnNames.append( tr( "GEOM_FACE_CONSTRAINT" ) );
myTreeConstraints->setHeaderLabels( columnNames );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myTreeConstraints->header()->setMovable( false );
myTreeConstraints->header()->setResizeMode( QHeaderView::ResizeToContents );
+#else
+ myTreeConstraints->header()->setSectionsMovable( false );
+ myTreeConstraints->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
+#endif
myTreeConstraints->setMinimumHeight( 140 );
QHBoxLayout* l = new QHBoxLayout( myGroupWireConstraints->Box );
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(BuildGUI_SOURCES
BuildGUI.cxx
#
IF(SALOME_BUILD_GUI)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF(SALOME_BUILD_GUI)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${CAS_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
ENDIF(SALOME_BUILD_GUI)
# sources / static
TARGET_LINK_LIBRARIES(CurveCreator ${_link_LIBRARIES})
INSTALL(TARGETS CurveCreator EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-INSTALL(FILES ${CurveCreator_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-
+INSTALL(FILES ${CurveCreator_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
\ No newline at end of file
void CurveCreator_TreeViewModel::setCurve( CurveCreator_ICurve* theCurve )
{
myCurve = theCurve;
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
reset();
+#endif
}
/*****************************************************************************************/
QTreeView(parent)
{
header()->hide();
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
header()->setResizeMode(QHeaderView::ResizeToContents);
+#else
+ header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#endif
setUniformRowHeights(true);
setContextMenuPolicy( Qt::CustomContextMenu );
CurveCreator_TreeViewModel* aModel = new CurveCreator_TreeViewModel(theCurve, this);
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
# --- options ---
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(DependencyTree_SOURCES
DependencyTree_Arrow.cxx
INSTALL(FILES ${DependencyTree_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_res_files}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_res_files}" "${SALOME_GEOM_INSTALL_RES_DATA}")
DependencyTree_Arrow::DependencyTree_Arrow( DependencyTree_Object* theStartItem,
DependencyTree_Object* theEndItem,
QGraphicsItem* parent, QGraphicsScene* scene )
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
:QGraphicsLineItem( parent, scene ),
+#else
+:QGraphicsLineItem( parent ),
+#endif
myIsBiLink( false ),
myStartItem( theStartItem ),
myEndItem( theEndItem )
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
-
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
# --- options ---
SET(_moc_HEADERS DlgRef.h)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
# sources / to compile
SET(DlgRef_SOURCES DlgRef.cxx ${_moc_SOURCES} ${_uic_HEADERS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(EntityGUI_SOURCES
EntityGUI.cxx
TopoDS_Shape aSubShape = myShapeMap( index );
QString anEntry = QString( "TEMP_" ) + aMainEntry.in() + QString("_%1").arg(index);
Handle(SALOME_InteractiveObject) io =
- new SALOME_InteractiveObject(anEntry.toAscii(), "GEOM", "TEMP_IO");
+ new SALOME_InteractiveObject(anEntry.toLatin1(), "GEOM", "TEMP_IO");
aDisplayer->SetColor( aCol );
SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
if (aPrs) {
}
QString Command = myCommand.join( "" );
- Sketcher_Profile aProfile = Sketcher_Profile( Command.toAscii() );
+ Sketcher_Profile aProfile = Sketcher_Profile( Command.toLatin1() );
bool isDone = false;
TopoDS_Shape myShape = aProfile.GetShape( &isDone );
if ( isDone ) {
//Last Shape
QString Command1 = myCommand.join( "" );
- Sketcher_Profile aProfile1( Command1.toAscii() );
+ Sketcher_Profile aProfile1( Command1.toLatin1() );
myShape1 = aProfile1.GetShape();
//Current Shape
QString Command2 = Command1 + GetNewCommand( aParameters );
- Sketcher_Profile aProfile2( Command2.toAscii() );
+ Sketcher_Profile aProfile2( Command2.toLatin1() );
myShape2 = aProfile2.GetShape( &isDone, &error );
//Error Message
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
-
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(GEOMBase_SOURCES
GEOMBase.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
-
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${CAS_INCLUDE_DIRS}
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
# sources / rcc wrappings
-QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
+QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
SET(GEOMGUI_SOURCES
GeometryGUI.cxx
INSTALL(TARGETS GEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES ${GEOMGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
//=================================================================================
bool GEOMGUI::OnGUIEvent( int /*theCommandID*/, SUIT_Desktop* /*parent*/, const QVariant& /*theParam*/ )
{
- return TRUE;
+ return true;
}
//=================================================================================
//=================================================================================
bool GEOMGUI::OnGUIEvent( int /*theCommandID*/, SUIT_Desktop* /*parent*/ )
{
- return TRUE;
+ return true;
}
//=================================================================================
//=================================================================================
bool GEOMGUI::OnMousePress( QMouseEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* /*studyFrame*/ )
{
- return FALSE;
+ return false;
}
//=================================================================================
//=================================================================================
bool GEOMGUI::OnMouseMove( QMouseEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* /*studyFrame*/ )
{
- return TRUE;
+ return true;
}
//=================================================================================
//=================================================================================
bool GEOMGUI::OnMouseRelease( QMouseEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* /*studyFrame*/ )
{
- return TRUE;
+ return true;
}
//=================================================================================
//=================================================================================
bool GEOMGUI::OnKeyPress( QKeyEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* /*studyFrame*/ )
{
- return TRUE;
+ return true;
}
//=================================================================================
myParamsTreeWd->setColumnCount( 2 );
myParamsTreeWd->setHeaderLabels( QStringList() << tr( "PARAMETER" ) << tr( "VALUE" ) );
myParamsTreeWd->header()->setStretchLastSection( true );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myParamsTreeWd->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
+#else
+ myParamsTreeWd->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+#endif
QVBoxLayout* aLayout = new QVBoxLayout( this );
aLayout->addWidget( myParamsTreeWd );
headerItem->setIcon( 1, myVisibleIcon );
setHeaderItem ( headerItem );
header()->moveSection( 1, 0 );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
header()->setResizeMode( 1, QHeaderView::ResizeToContents );
-
+#else
+ header()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+#endif
QStringList rootNames;
rootNames << tr("GEOM_DIMENSIONS") << "";
myDimensionsItem = new QTreeWidgetItem( this, rootNames );
icon,
tr( actionName.toLatin1().constData() ),
tr( actionStat.toLatin1().constData() ),
- QKeySequence( tr( adata.accel.c_str() ) ),
+ QKeySequence( tr( adata.accel.c_str() ) )[0],
application()->desktop(),
false /*toggle*/,
this, SLOT( OnGUIEvent() ),
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
-
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(GEOMToolsGUI_SOURCES
GEOMToolsGUI.cxx
setModal(true);
setWindowTitle(tr("GEOM_DEFLECTION_TLT"));
- setSizeGripEnabled(TRUE);
+ setSizeGripEnabled(true);
QGridLayout* MyDialogLayout = new QGridLayout(this);
MyDialogLayout->setSpacing(6);
MyDialogLayout->setMargin(11);
QPushButton* buttonOk = new QPushButton (GroupButtons);
buttonOk->setObjectName("buttonOk");
buttonOk->setText(tr("GEOM_BUT_OK"));
- buttonOk->setAutoDefault(TRUE);
- buttonOk->setDefault(TRUE);
+ buttonOk->setAutoDefault(true);
+ buttonOk->setDefault(true);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
QPushButton* buttonCancel = new QPushButton (GroupButtons);
buttonCancel->setObjectName("buttonCancel");
buttonCancel->setText(tr("GEOM_BUT_CANCEL"));
- buttonCancel->setAutoDefault(TRUE);
+ buttonCancel->setAutoDefault(true);
GroupButtonsLayout->addWidget(buttonCancel, 0, 1);
QPushButton* buttonHelp = new QPushButton (GroupButtons);
buttonHelp->setObjectName("buttonHelp");
buttonHelp->setText(tr("GEOM_BUT_HELP"));
- buttonHelp->setAutoDefault(TRUE);
+ buttonHelp->setAutoDefault(true);
GroupButtonsLayout->addWidget(buttonHelp, 0, 2);
/***************************************************************/
setModal(true);
setWindowTitle(tr(title.toLatin1().constData()));
- setSizeGripEnabled(TRUE);
+ setSizeGripEnabled(true);
QGridLayout* MyDialogLayout = new QGridLayout(this);
MyDialogLayout->setSpacing(6);
MyDialogLayout->setMargin(11);
QPushButton* buttonOk = new QPushButton (GroupButtons);
buttonOk->setObjectName("buttonOk");
buttonOk->setText(tr("GEOM_BUT_OK"));
- buttonOk->setAutoDefault(TRUE);
- buttonOk->setDefault(TRUE);
+ buttonOk->setAutoDefault(true);
+ buttonOk->setDefault(true);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
QPushButton* buttonCancel = new QPushButton (GroupButtons);
buttonCancel->setObjectName("buttonCancel");
buttonCancel->setText(tr("GEOM_BUT_CANCEL"));
- buttonCancel->setAutoDefault(TRUE);
+ buttonCancel->setAutoDefault(true);
GroupButtonsLayout->addWidget(buttonCancel, 0, 1);
QPushButton* buttonHelp = new QPushButton (GroupButtons);
buttonHelp->setObjectName("buttonHelp");
buttonHelp->setText(tr("GEOM_BUT_HELP"));
- buttonHelp->setAutoDefault(TRUE);
+ buttonHelp->setAutoDefault(true);
GroupButtonsLayout->addWidget(buttonHelp, 0, 2);
/***************************************************************/
setModal( true );
setWindowTitle( tr( "GEOM_MEN_ISOS" ) );
- setSizeGripEnabled(TRUE);
+ setSizeGripEnabled(true);
QGridLayout* MyDialogLayout = new QGridLayout(this);
MyDialogLayout->setSpacing(6);
MyDialogLayout->setMargin(11);
QPushButton* buttonOk = new QPushButton( GroupButtons );
buttonOk->setObjectName( "buttonOk" );
buttonOk->setText( tr( "GEOM_BUT_OK" ) ) ;
- buttonOk->setAutoDefault( TRUE );
- buttonOk->setDefault( TRUE );
+ buttonOk->setAutoDefault( true );
+ buttonOk->setDefault( true );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
QPushButton* buttonCancel = new QPushButton( GroupButtons );
buttonCancel->setObjectName( "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CANCEL" ) ) ;
- buttonCancel->setAutoDefault( TRUE );
+ buttonCancel->setAutoDefault( true );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
QPushButton* buttonHelp = new QPushButton( GroupButtons );
buttonHelp->setObjectName( "buttonHelp" );
buttonHelp->setText( tr( "GEOM_BUT_HELP" ) ) ;
- buttonHelp->setAutoDefault( TRUE );
+ buttonHelp->setAutoDefault( true );
GroupButtonsLayout->addWidget( buttonHelp, 0, 2 );
/***************************************************************/
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
headerItem->setIcon( 2, QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) ) );
myTreeWidget->setHeaderItem ( headerItem );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myTreeWidget->header()->setClickable( true );
+#else
+ myTreeWidget->header()->setSectionsClickable( true );
+#endif
myTreeWidget->header()->setSortIndicatorShown( true );
myTreeWidget->header()->moveSection( 2, 0 );
myTreeWidget->setSortingEnabled( true );
QTreeWidgetItem * headerItem = new QTreeWidgetItem( columnNames );
theTreeWidget->setHeaderItem ( headerItem );
theTreeWidget->header()->moveSection( 1, 0 );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
theTreeWidget->header()->setClickable( true );
theTreeWidget->header()->setMovable( false );
theTreeWidget->header()->setResizeMode( 1, QHeaderView::ResizeToContents );
+#else
+ theTreeWidget->header()->setSectionsClickable( true );
+ theTreeWidget->header()->setSectionsMovable( false );
+ theTreeWidget->header()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+#endif
theTreeWidget->setSelectionMode( QAbstractItemView::ExtendedSelection );
}
#
INCLUDE(${SWIG_USE_FILE})
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(GenerationGUI_SOURCES
GenerationGUI.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(GroupGUI_SOURCES
GroupGUI.cxx
int index = aSubShapesMap.FindIndex(aSubShape);
QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index);
Handle(SALOME_InteractiveObject) io =
- new SALOME_InteractiveObject(anEntry.toAscii(), "GEOM", "TEMP_IO");
+ new SALOME_InteractiveObject(anEntry.toLatin1(), "GEOM", "TEMP_IO");
if ( myGroupIdList.contains( index ) ) {
aDisplayer->SetColor( aCol );
}
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UseQt4Ext)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF()
# --- options ---
IF(SALOME_BUILD_GUI)
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMGUI
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(IGESPluginGUI_SOURCES
IGESPlugin_GUI.cxx
TARGET_LINK_LIBRARIES(IGESPluginGUI ${_link_gui_LIBRARIES})
INSTALL(TARGETS IGESPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- QT4_INSTALL_TS_RESOURCES("${IGESPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ QT_INSTALL_TS_RESOURCES("${IGESPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
ENDIF()
IGESPlugin_ExportDlg fd( parent );
fd.setFileMode( AnyFile );
- fd.setFilters( fls );
+ fd.setNameFilters( fls );
fd.setWindowTitle( caption );
if ( !tmpfilename.isEmpty() )
fd.processPath( tmpfilename );
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
-
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${CAS_INCLUDE_DIRS}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(Material_SOURCES
Material_Model.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
ENDIF()
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(MeasureGUI_SOURCES
MeasureGUI.cxx
ADD_LIBRARY(MeasureGUI ${MeasureGUI_SOURCES})
TARGET_LINK_LIBRARIES(MeasureGUI ${_link_LIBRARIES})
INSTALL(TARGETS MeasureGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
INCLUDE(${VTK_USE_FILE})
# --- options ---
INCLUDE_DIRECTORIES(
${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${QT_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${CAS_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(OperationGUI_SOURCES
OperationGUI.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${QT_USE_FILE})
-
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(PrimitiveGUI_SOURCES
PrimitiveGUI.cxx
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(RepairGUI_SOURCES
RepairGUI.cxx
const int nbCols = 2;
QTableWidget* table = new QTableWidget( nbRows, nbCols, this );
table->setEditTriggers( QAbstractItemView::NoEditTriggers );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
table->horizontalHeader()->setResizeMode( 1, QHeaderView::Interactive );
+#else
+ table->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::Interactive );
+#endif
table->horizontalHeader()->setStretchLastSection( true );
QStringList headers;
//=======================================================================
void RepairGUI_DivideEdgeDlg::ConstructorsClicked( int constructorId )
{
- myIsParameterGr->button( 0 )->setShown( constructorId == BY_PARAM );
- myIsParameterGr->button( 1 )->setShown( constructorId == BY_PARAM );
- myValEdt ->setShown( constructorId == BY_PARAM );
- myValLbl ->setShown( constructorId == BY_PARAM );
- GroupPoints->TextLabel2 ->setShown( constructorId == BY_POINT_PROJ );
- GroupPoints->PushButton2 ->setShown( constructorId == BY_POINT_PROJ );
- GroupPoints->LineEdit2 ->setShown( constructorId == BY_POINT_PROJ );
+ myIsParameterGr->button( 0 )->setVisible( constructorId == BY_PARAM );
+ myIsParameterGr->button( 1 )->setVisible( constructorId == BY_PARAM );
+ myValEdt ->setVisible( constructorId == BY_PARAM );
+ myValLbl ->setVisible( constructorId == BY_PARAM );
+ GroupPoints->TextLabel2 ->setVisible( constructorId == BY_POINT_PROJ );
+ GroupPoints->PushButton2 ->setVisible( constructorId == BY_POINT_PROJ );
+ GroupPoints->LineEdit2 ->setVisible( constructorId == BY_POINT_PROJ );
initSelection();
GroupVertexes->LineEdit1->setReadOnly(true);
GroupVertexes->LineEdit2->setReadOnly(true);
- GroupVertexes->TextLabel3->setShown(false);
- GroupVertexes->SpinBox_DX->setShown(false);
+ GroupVertexes->TextLabel3->setVisible(false);
+ GroupVertexes->SpinBox_DX->setVisible(false);
QVBoxLayout* layout = new QVBoxLayout (centralWidget());
layout->setMargin(0);
myShape( shape ),
myTolerance (theTolerance)
{
- myIO = new SALOME_InteractiveObject( entry.toAscii(), "GEOM", "TEMP_IO" );
+ myIO = new SALOME_InteractiveObject( entry.toLatin1(), "GEOM", "TEMP_IO" );
setFlags( flags() | Qt::ItemIsEditable );
}
headerItem->setIcon(1, myInvisible);
theTreeObjects->setHeaderItem(headerItem);
theTreeObjects->header()->moveSection(1, 0);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
theTreeObjects->header()->setClickable(true);
theTreeObjects->header()->setMovable(false);
theTreeObjects->header()->setResizeMode( 1, QHeaderView::ResizeToContents);
+#else
+ theTreeObjects->header()->setSectionsClickable(true);
+ theTreeObjects->header()->setSectionsMovable(false);
+ theTreeObjects->header()->setSectionResizeMode( 1, QHeaderView::ResizeToContents);
+#endif
theTreeObjects->setSelectionMode(QAbstractItemView::ExtendedSelection);
theTreeObjects->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed);
// set custom item delegate
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UseQt4Ext)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF()
# --- options ---
IF(SALOME_BUILD_GUI)
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMGUI
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(STEPPluginGUI_SOURCES
STEPPlugin_GUI.cxx
TARGET_LINK_LIBRARIES(STEPPluginGUI ${_link_gui_LIBRARIES})
INSTALL(TARGETS STEPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- QT4_INSTALL_TS_RESOURCES("${STEPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ QT_INSTALL_TS_RESOURCES("${STEPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
ENDIF()
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UseQt4Ext)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF()
# --- options ---
IF(SALOME_BUILD_GUI)
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMGUI
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(STLPluginGUI_SOURCES
STLPlugin_GUI.cxx
TARGET_LINK_LIBRARIES(STLPluginGUI ${_link_gui_LIBRARIES})
INSTALL(TARGETS STLPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- QT4_INSTALL_TS_RESOURCES("${STLPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ QT_INSTALL_TS_RESOURCES("${STLPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
ENDIF()
STLPlugin_ExportDlg fd( io, parent );
fd.setFileMode( AnyFile );
- fd.setFilters( fls );
+ fd.setNameFilters( fls );
fd.setWindowTitle( caption );
if ( !tmpfilename.isEmpty() )
fd.processPath( tmpfilename );
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE( ${QT_USE_FILE} )
# --- options ---
INSTALL(TARGETS GEOMShapeRec EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
#INSTALL(FILES ${ShapeRecognition_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-
-
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#INCLUDE(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
)
# header files / uic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_uic_files})
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(TransformationGUI_SOURCES
TransformationGUI.cxx
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UseQt4Ext)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF()
# --- options ---
IF(SALOME_BUILD_GUI)
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMGUI
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(VTKPluginGUI_SOURCES
VTKPlugin_GUI.cxx
TARGET_LINK_LIBRARIES(VTKPluginGUI ${_link_gui_LIBRARIES})
INSTALL(TARGETS VTKPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- QT4_INSTALL_TS_RESOURCES("${VTKPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ QT_INSTALL_TS_RESOURCES("${VTKPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
ENDIF()
VTKPlugin_ExportDlg fd( io, parent );
fd.setFileMode( AnyFile );
- fd.setFilters( fls );
+ fd.setNameFilters( fls );
fd.setWindowTitle( caption );
if ( !tmpfilename.isEmpty() )
fd.processPath( tmpfilename );
#
IF(SALOME_BUILD_GUI)
- INCLUDE(UseQt4Ext)
- INCLUDE(${QT_USE_FILE})
+ INCLUDE(UseQtExt)
ENDIF()
# --- options ---
IF(SALOME_BUILD_GUI)
INCLUDE_DIRECTORIES(
- ${QT_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMGUI
IF(SALOME_BUILD_GUI)
# sources / moc wrappings
- QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
SET(XAOPluginGUI_SOURCES
XAOPlugin_GUI.cxx
TARGET_LINK_LIBRARIES(XAOPluginGUI ${_link_gui_LIBRARIES})
INSTALL(TARGETS XAOPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- QT4_INSTALL_TS_RESOURCES("${XAOPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ QT_INSTALL_TS_RESOURCES("${XAOPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
ENDIF()