]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Remove QT4 compatibility.
authorrnv <rnv@opencascade.com>
Thu, 30 May 2019 11:57:29 +0000 (14:57 +0300)
committerrnv <rnv@opencascade.com>
Thu, 30 May 2019 11:57:29 +0000 (14:57 +0300)
src/BuildGUI/BuildGUI_FaceDlg.cxx
src/CurveCreator/CurveCreator_TreeView.cxx
src/DependencyTree/DependencyTree_Arrow.cxx
src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx
src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
src/RepairGUI/RepairGUI.cxx
src/RepairGUI/RepairGUI_InspectObjectDlg.cxx

index 8356275296d1f99fbeed18456d5dac38fb803dcf..b512c2926b9fccd552b60bf8bb1a0ac90e1f5435 100644 (file)
@@ -156,13 +156,8 @@ BuildGUI_FaceDlg::BuildGUI_FaceDlg( GeometryGUI* theGeometryGUI, QWidget* parent
   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 );
index b9b62d909d8ef9142e99fac465b9ef2508f6f83a..77010c3491878c85298dea868b376ab047df7550 100644 (file)
@@ -212,14 +212,9 @@ int CurveCreator_TreeViewModel::getPoint( const QModelIndex& theIndx ) const
 
 void CurveCreator_TreeViewModel::setCurve( CurveCreator_ICurve* theCurve )
 {
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-  myCurve = theCurve;
-  reset();
-#else
   beginResetModel();
   myCurve = theCurve;
   endResetModel();
-#endif
 }
 
 /*****************************************************************************************/
@@ -227,11 +222,7 @@ CurveCreator_TreeView::CurveCreator_TreeView( CurveCreator_ICurve* theCurve, QWi
   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);
index 7abaf685331aa2c9cbae20078ae25ab9571a62b2..179672d16202b02d8be5c4604d84831a0b374182 100644 (file)
@@ -39,11 +39,7 @@ const qreal arrowSize = 20;
 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 )
index 5b3800267f785e3b7db06b34d883c1efd6ad9753..5b36aee23393b47a0960cbf8bc7ebee7d5123105 100644 (file)
@@ -47,11 +47,7 @@ GEOMGUI_CreationInfoWdg::GEOMGUI_CreationInfoWdg( SalomeApp_Application* app )
   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 );
index f1fb475a003d7df9622845974c48f1eaca052b0b..9c35641d6c17cb49129aff87bdda1902a61ed40e 100644 (file)
@@ -175,11 +175,8 @@ GEOMGUI_TextTreeWdg::GEOMGUI_TextTreeWdg( SalomeApp_Application* app )
   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 );
index 8de043d28cac2fb40d4647af523815c94631f35a..8e688938cbb7aaec0d2a81eb74daf09d87054292 100644 (file)
@@ -78,11 +78,7 @@ GEOMToolsGUI_PublishDlg::GEOMToolsGUI_PublishDlg(QWidget* parent):
    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 );
index 41f35f48b1c883ca736caedcab452ab5ec83a012..feb742897c7169cfe6bc7295bb37f0fe44412602 100644 (file)
@@ -219,15 +219,10 @@ void GEOMToolsGUI_ReduceStudyDlg::createTreeWidget( QTreeWidget* theTreeWidget )
   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 );
 }
 
index 2d0e91f98f9b8c3bfdb404f6f92fad6377b5c301..522ec667db81d6da91a14aaf8ea0560f2d3a0d3a 100644 (file)
@@ -158,11 +158,8 @@ namespace
     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;
index 78d9375805558be761ccea04edc7e6d42aae9e05..b59e84017d7f6f816d5719de7afe389c69d13d82 100644 (file)
@@ -417,15 +417,10 @@ void RepairGUI_InspectObjectDlg::createTreeWidget(QTreeWidget *&theTreeObjects)
   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