mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Remove QT4 compatibility.
This commit is contained in:
parent
3256455164
commit
9157430337
@ -139,17 +139,10 @@ ENDIF(SALOME_BUILD_GUI)
|
||||
##
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
IF(NOT SALOME_GUI_BUILD_WITH_QT5)
|
||||
# Qt
|
||||
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL QtNetwork)
|
||||
# PyQt
|
||||
FIND_PACKAGE(SalomePyQt4 REQUIRED)
|
||||
ELSE()
|
||||
# Qt
|
||||
FIND_PACKAGE(SalomeQt5 REQUIRED)
|
||||
# PyQt
|
||||
FIND_PACKAGE(SalomePyQt5 REQUIRED)
|
||||
ENDIF()
|
||||
# Qt
|
||||
FIND_PACKAGE(SalomeQt5 REQUIRED)
|
||||
# PyQt
|
||||
FIND_PACKAGE(SalomePyQt5 REQUIRED)
|
||||
ENDIF(SALOME_BUILD_GUI)
|
||||
|
||||
##
|
||||
|
@ -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 );
|
||||
|
@ -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);
|
||||
|
@ -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 )
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user