From: mkr Date: Wed, 11 Jul 2007 06:23:48 +0000 (+0000) Subject: Porting to Qt4. X-Git-Tag: snapshot_171207~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=49047f7d298f22733ce9bb55676486c1e7115855;p=modules%2Fgeom.git Porting to Qt4. --- diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index c9278dcc2..0334bc5c0 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -169,7 +169,7 @@ void BasicGUI_ArcDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_ARC" ).toStdString().c_str() ); + initName( tr( "GEOM_ARC" ).toLatin1().constData() ); ConstructorsClicked( 0 ); diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index f42e8cce1..40ebbf4de 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -157,7 +157,7 @@ void BasicGUI_CircleDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_CIRCLE" ).toStdString().c_str() ); + initName( tr( "GEOM_CIRCLE" ).toLatin1().constData() ); ::qobject_cast( Group3Pnts->gridLayout->parent() )->hide(); ConstructorsClicked( 0 ); diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index 5ca054c9e..9c4cc8367 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -125,7 +125,7 @@ void BasicGUI_CurveDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_CURVE" ).toStdString().c_str() ); + initName( tr( "GEOM_CURVE" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 7e85536e0..e97abf429 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -144,7 +144,7 @@ void BasicGUI_EllipseDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_ELLIPSE" ).toStdString().c_str() ); + initName( tr( "GEOM_ELLIPSE" ).toLatin1().constData() ); } diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index 099bfbeed..ed38628ce 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -127,7 +127,7 @@ void BasicGUI_LineDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr("GEOM_LINE").toStdString().c_str() ); + initName( tr("GEOM_LINE").toLatin1().constData() ); } diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index d77a68a95..ab50fb33b 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -200,7 +200,7 @@ void BasicGUI_MarkerDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) ); - initName( tr( "LCS_NAME" ).toStdString().c_str() ); + initName( tr( "LCS_NAME" ).toLatin1().constData() ); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 6db4f8a9a..f2b53a75e 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -182,7 +182,7 @@ void BasicGUI_PlaneDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_PLANE" ).toStdString().c_str() ); + initName( tr( "GEOM_PLANE" ).toLatin1().constData() ); Group3Pnts->hide(); GroupFace->hide(); diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index abc0b4193..41ff3e7f8 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -220,7 +220,7 @@ void BasicGUI_PointDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr("GEOM_VERTEX").toStdString().c_str() ); + initName( tr("GEOM_VERTEX").toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index c8acfeb52..b47d71d82 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -163,7 +163,7 @@ void BasicGUI_VectorDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr("GEOM_VECTOR").toStdString().c_str() ); + initName( tr("GEOM_VECTOR").toLatin1().constData() ); GroupDimensions->hide(); ConstructorsClicked( 0 ); diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx index 35eba3f63..b0e866449 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx @@ -183,7 +183,7 @@ void BasicGUI_WorkingPlaneDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_WPLANE" ).toStdString().c_str() ); + initName( tr( "GEOM_WPLANE" ).toLatin1().constData() ); ConstructorsClicked(0); } diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx index df4cdde36..d8a7743d8 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -152,7 +152,7 @@ void BooleanGUI_Dialog::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( GroupConstructors->title().toStdString().c_str() ); + initName( GroupConstructors->title().toLatin1().constData() ); globalSelection( GEOM_ALLSHAPES ); } diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index d0b3ebb81..1a682e5fa 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -112,7 +112,7 @@ void BuildGUI_CompoundDlg::Init() globalSelection( GEOM_ALLSHAPES ); - initName( tr( "GEOM_COMPOUND" ).toStdString().c_str() ); + initName( tr( "GEOM_COMPOUND" ).toLatin1().constData() ); } diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index 1a124b8c6..255e447d5 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -124,7 +124,7 @@ void BuildGUI_EdgeDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_EDGE").toStdString().c_str() ); + initName( tr( "GEOM_EDGE").toLatin1().constData() ); } diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index 1bd391fa4..e6108a1b4 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -119,7 +119,7 @@ void BuildGUI_FaceDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_FACE").toStdString().c_str()); + initName(tr("GEOM_FACE").toLatin1().constData()); } diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index c6b5ded16..946233c2a 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -119,7 +119,7 @@ void BuildGUI_ShellDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_SHELL").toStdString().c_str()); + initName(tr("GEOM_SHELL").toLatin1().constData()); } diff --git a/src/BuildGUI/BuildGUI_SolidDlg.cxx b/src/BuildGUI/BuildGUI_SolidDlg.cxx index a254586f4..a09936816 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.cxx +++ b/src/BuildGUI/BuildGUI_SolidDlg.cxx @@ -117,7 +117,7 @@ void BuildGUI_SolidDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_SOLID").toStdString().c_str()); + initName(tr("GEOM_SOLID").toLatin1().constData()); } diff --git a/src/BuildGUI/BuildGUI_WireDlg.cxx b/src/BuildGUI/BuildGUI_WireDlg.cxx index 232ced8d4..c1844bf21 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.cxx +++ b/src/BuildGUI/BuildGUI_WireDlg.cxx @@ -117,7 +117,7 @@ void BuildGUI_WireDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_WIRE").toStdString().c_str()); + initName(tr("GEOM_WIRE").toLatin1().constData()); } diff --git a/src/GEOMBase/GEOMBase.cxx b/src/GEOMBase/GEOMBase.cxx index 757f212d7..af97da382 100644 --- a/src/GEOMBase/GEOMBase.cxx +++ b/src/GEOMBase/GEOMBase.cxx @@ -209,55 +209,55 @@ bool GEOMBase::GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& { case TopAbs_COMPOUND: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_COMPOUND").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_COMPOUND").toLatin1().constData()); return true; } case TopAbs_COMPSOLID: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_COMPOUNDSOLID").toStdString().c_str()) ; + aTypeString = CORBA::string_dup(QObject::tr("GEOM_COMPOUNDSOLID").toLatin1().constData()) ; return true ; } case TopAbs_SOLID: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SOLID").toStdString().c_str()) ; + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SOLID").toLatin1().constData()) ; return true ; } case TopAbs_SHELL: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SHELL").toStdString().c_str()) ; + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SHELL").toLatin1().constData()) ; return true ; } case TopAbs_FACE: { BRepAdaptor_Surface surf(TopoDS::Face(aShape)); if(surf.GetType() == GeomAbs_Plane) { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_PLANE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_PLANE").toLatin1().constData()); return true; } else if(surf.GetType() == GeomAbs_Cylinder) { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFCYLINDER").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFCYLINDER").toLatin1().constData()); return true; } else if(surf.GetType() == GeomAbs_Sphere) { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFSPHERE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFSPHERE").toLatin1().constData()); return true ; } else if(surf.GetType() == GeomAbs_Torus) { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFTORUS").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFTORUS").toLatin1().constData()); return true ; } else if(surf.GetType() == GeomAbs_Cone) { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFCONE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFCONE").toLatin1().constData()); return true ; } else { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_FACE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_FACE").toLatin1().constData()); return true; } } case TopAbs_WIRE: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_WIRE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_WIRE").toLatin1().constData()); return true; } case TopAbs_EDGE: @@ -265,31 +265,31 @@ bool GEOMBase::GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& BRepAdaptor_Curve curv(TopoDS::Edge(aShape)); if(curv.GetType() == GeomAbs_Line) { if((Abs(curv.FirstParameter()) >= 1E6) || (Abs(curv.LastParameter()) >= 1E6)) - aTypeString = CORBA::string_dup(QObject::tr("GEOM_LINE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_LINE").toLatin1().constData()); else - aTypeString = CORBA::string_dup(QObject::tr("GEOM_EDGE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_EDGE").toLatin1().constData()); return true; } else if(curv.GetType() == GeomAbs_Circle) { if(curv.IsClosed()) - aTypeString = CORBA::string_dup(QObject::tr("GEOM_CIRCLE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_CIRCLE").toLatin1().constData()); else - aTypeString = CORBA::string_dup(QObject::tr("GEOM_ARC").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_ARC").toLatin1().constData()); return true; } else { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_EDGE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_EDGE").toLatin1().constData()); return true; } } case TopAbs_VERTEX: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_VERTEX").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_VERTEX").toLatin1().constData()); return true; } case TopAbs_SHAPE: { - aTypeString = CORBA::string_dup(QObject::tr("GEOM_SHAPE").toStdString().c_str()); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SHAPE").toLatin1().constData()); return true; } } @@ -806,7 +806,7 @@ bool GEOMBase::SelectionByNameInDialogs(QWidget* aWidget, const QString& objectU _PTR(SObject) theObj ( listSO[0] ); /* Create a SALOME_InteractiveObject with a SALOME::SObject */ - char* aCopyobjectUserName = CORBA::string_dup(objectUserName.toStdString().c_str()); + char* aCopyobjectUserName = CORBA::string_dup(objectUserName.toLatin1().constData()); Handle(SALOME_InteractiveObject) SI = new SALOME_InteractiveObject(theObj->GetID().c_str(), "GEOM", aCopyobjectUserName); delete(aCopyobjectUserName); @@ -881,7 +881,7 @@ void GEOMBase::ShowErrorMessage(const char* theErrorCode, const char* theComment QString aText = ""; if (!anErrorCode.isEmpty()) - aText.append("\n" + QObject::tr(anErrorCode.toStdString().c_str())); + aText.append("\n" + QObject::tr(anErrorCode.toLatin1().constData())); if (!aComment.isEmpty()) aText.append("\n" + QString(theComment)); diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 89117dceb..e800880f6 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -169,7 +169,7 @@ void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView if ( !object->_is_nil() ) { string entry = getEntry( object ); getDisplayer()->Erase( new SALOME_InteractiveObject( - entry.c_str(), "GEOM", strdup( GEOMBase::GetName( object ).toStdString().c_str() ) ), true, updateView ); + entry.c_str(), "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView ); } } @@ -208,7 +208,7 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, string entry = getEntry( object ); getDisplayer()->Redisplay(new SALOME_InteractiveObject - (entry.c_str(), "GEOM", strdup(GEOMBase::GetName(object).toStdString().c_str())), false); + (entry.c_str(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false); } if ( withChildren ) { @@ -226,7 +226,7 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, if ( !aChild->_is_nil() ) { string entry = getEntry( aChild ); getDisplayer()->Redisplay( new SALOME_InteractiveObject( - entry.c_str(), "GEOM", strdup( GEOMBase::GetName( aChild ).toStdString().c_str() ) ), false ); + entry.c_str(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false ); } } } @@ -448,7 +448,7 @@ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const int theMo string aEntry = getEntry( anObj ); if ( aEntry != "" ) aListOfIO.Append( new SALOME_InteractiveObject( - aEntry.c_str(), "GEOM", strdup( GEOMBase::GetName( anObj ).toStdString().c_str() ) ) ); + aEntry.c_str(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) ); } getDisplayer()->LocalSelection( aListOfIO, theMode ); diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 87ff614d4..16633bcbd 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -227,7 +227,7 @@ void GEOMBase_Skeleton::initName( const char* thePrefix ) //================================================================================= const char* GEOMBase_Skeleton::getNewObjectName() const { - return ResultName->text().toStdString().c_str(); + return ResultName->text().toLatin1().constData(); } //================================================================================= diff --git a/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx b/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx index 1bd2e4ad4..eec1ebbff 100644 --- a/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx @@ -45,6 +45,6 @@ GEOM_PreviewFilter::~GEOM_PreviewFilter() bool GEOM_PreviewFilter::isOk( const SUIT_DataOwner* sOwner ) const { const LightApp_DataOwner* owner = dynamic_cast ( sOwner ); - return ( owner && strstr( owner->entry().toStdString().c_str(), "TEMP" ) ); + return ( owner && strstr( owner->entry().toLatin1().constData(), "TEMP" ) ); } diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index bede49864..14158e390 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -112,7 +112,7 @@ QString GEOMGUI_Selection::displayMode( const int index ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); QString viewType = activeViewType(); if ( view /*fix for 9320==>*/&& ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) { - SALOME_Prs* prs = view->CreatePrs( entry( index ).toStdString().c_str() ); + SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 6c3db6071..3f462d90d 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -710,15 +710,15 @@ void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QS SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); QPixmap pix; if ( icon_id.length() ) - pix = resMgr->loadPixmap( "GEOM", tr( icon_id.toStdString().c_str() ) ); + pix = resMgr->loadPixmap( "GEOM", tr( icon_id.toLatin1().constData() ) ); else - pix = resMgr->loadPixmap( "GEOM", tr( (QString( "ICO_" )+po_id).toStdString().c_str() ), false ); + pix = resMgr->loadPixmap( "GEOM", tr( (QString( "ICO_" )+po_id).toLatin1().constData() ), false ); if ( !pix.isNull() ) icon = QIcon( pix ); - QString tooltip = tr( (QString( "TOP_" )+po_id).toStdString().c_str() ), - menu = tr( (QString( "MEN_" )+po_id).toStdString().c_str() ), - status_bar = tr( (QString( "STB_" )+po_id).toStdString().c_str() ); + QString tooltip = tr( (QString( "TOP_" )+po_id).toLatin1().constData() ), + menu = tr( (QString( "MEN_" )+po_id).toLatin1().constData() ), + status_bar = tr( (QString( "STB_" )+po_id).toLatin1().constData() ); createAction( id, tooltip, icon, menu, status_bar, key, parent, toggle, this, SLOT( OnGUIEvent() ) ); } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 466c34682..a72755cb1 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -140,9 +140,9 @@ void GEOMToolsGUI::OnSettingsStep() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100. ); Standard_Boolean res = false; - double dd = GEOMBase::Parameter( res, QString("%1").arg(step).toStdString().c_str(), - tr("GEOM_MEN_STEP_LABEL").toStdString().c_str(), - tr("GEOM_STEP_TITLE").toStdString().c_str(), 0.001, 10000.0, 3); + double dd = GEOMBase::Parameter( res, QString("%1").arg(step).toLatin1().constData(), + tr("GEOM_MEN_STEP_LABEL").toLatin1().constData(), + tr("GEOM_STEP_TITLE").toLatin1().constData(), 0.001, 10000.0, 3); if(res) { resMgr->setValue( "Geometry", "SettingsGeomStep", dd ); diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 2affba68b..43ff12233 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -150,7 +150,7 @@ void GenerationGUI_FillingDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_FILLING").toStdString().c_str()); + initName(tr("GEOM_FILLING").toLatin1().constData()); } diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index 60d76791b..a02b4f54b 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -121,7 +121,7 @@ void GenerationGUI_PipeDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_PIPE").toStdString().c_str()); + initName(tr("GEOM_PIPE").toLatin1().constData()); globalSelection( GEOM_ALLSHAPES ); } diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index 579fdcdad..58305e14a 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -166,7 +166,7 @@ void GenerationGUI_PrismDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_EXTRUSION").toStdString().c_str()); + initName(tr("GEOM_EXTRUSION").toLatin1().constData()); globalSelection( GEOM_ALLSHAPES ); ConstructorsClicked(0); diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 13fa725de..cc59892fb 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -133,7 +133,7 @@ void GenerationGUI_RevolDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_REVOLUTION").toStdString().c_str()); + initName(tr("GEOM_REVOLUTION").toLatin1().constData()); globalSelection( GEOM_ALLSHAPES ); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 5923b9df3..6d0bbd896 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -154,7 +154,7 @@ void PrimitiveGUI_BoxDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_BOX" ).toStdString().c_str() ); + initName( tr( "GEOM_BOX" ).toLatin1().constData() ); ConstructorsClicked(0); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 858e4e102..9ed6a2e62 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -164,7 +164,7 @@ void PrimitiveGUI_ConeDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_CONE" ).toStdString().c_str() ); + initName( tr( "GEOM_CONE" ).toLatin1().constData() ); ConstructorsClicked(0); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index da8009761..ec511ef40 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -157,7 +157,7 @@ void PrimitiveGUI_CylinderDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_CYLINDER" ).toStdString().c_str() ); + initName( tr( "GEOM_CYLINDER" ).toLatin1().constData() ); ConstructorsClicked(0); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index b6f246e62..8ba5158f1 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -136,7 +136,7 @@ void PrimitiveGUI_SphereDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_SPHERE").toStdString().c_str()); + initName(tr("GEOM_SPHERE").toLatin1().constData()); ConstructorsClicked(0); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index a63694a39..df973503a 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -153,7 +153,7 @@ void PrimitiveGUI_TorusDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_TORUS" ).toStdString().c_str() ); + initName( tr( "GEOM_TORUS" ).toLatin1().constData() ); ConstructorsClicked(0); } diff --git a/src/TransformationGUI/TransformationGUI.cxx b/src/TransformationGUI/TransformationGUI.cxx index eb69c9037..e3d4ffc2c 100644 --- a/src/TransformationGUI/TransformationGUI.cxx +++ b/src/TransformationGUI/TransformationGUI.cxx @@ -29,7 +29,6 @@ #include "TransformationGUI.h" #include "GeometryGUI.h" -#include "SUIT_Session.h" #include "SUIT_Desktop.h" #include "SalomeApp_Application.h" diff --git a/src/TransformationGUI/TransformationGUI.pro b/src/TransformationGUI/TransformationGUI.pro new file mode 100644 index 000000000..9bff8e952 --- /dev/null +++ b/src/TransformationGUI/TransformationGUI.pro @@ -0,0 +1,47 @@ +TEMPLATE = lib +TARGET = TransformationGUI +DESTDIR = ../../lib +MOC_DIR = ../../moc +OBJECTS_DIR = ../../obj/$$TARGET + +QT_INCLUDES = $$(QTDIR)/include $$(QTDIR)/include/QtCore $$(QTDIR)/include/QtGui $$(QTDIR)/include/QtOpenGL $$(QTDIR)/include/QtXml + +VTK_INCLUDES = $$(VTKHOME)/include/vtk + +CASROOT = $$(CASROOT) +CAS_CPPFLAGS = $${CASROOT}/inc + +PYTHON_INCLUDES = $$(PYTHONHOME)/include/python2.4 + +BOOST_CPPFLAGS = $$(BOOSTDIR)/include + +KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome + +GUI_CXXFLAGS = $$(GUI_ROOT_DIR)/include/salome + +CORBA_INCLUDES = $$(OMNIORBDIR)/include $$(OMNIORBDIR)/include/omniORB4 $$(OMNIORBDIR)/include/COS + +INCLUDEPATH += $${QT_INCLUDES} $${VTK_INCLUDES} $${CAS_CPPFLAGS} $${PYTHON_INCLUDES} $${BOOST_CPPFLAGS} $${KERNEL_CXXFLAGS} $${GUI_CXXFLAGS} $${CORBA_INCLUDES} ../GEOMGUI ../DlgRef ../GEOMBase ../OBJECT ../GEOMClient ../GEOMImpl ../GEOMFiltersSelection $$(GEOM_ROOT_DIR)/idl $$(GEOM_ROOT_DIR)/salome_adm/unix + +LIBS += -L$$(GEOM_ROOT_DIR)/lib -lGEOMFiltersSelection -lGEOMBase + +CONFIG -= debug release debug_and_release +CONFIG += qt thread debug dll shared + +win32:DEFINES += WIN32 +DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS OMNIORB_VERSION=4 __x86__ __linux__ COMP_CORBA_DOUBLE COMP_CORBA_LONG + +SOURCES = TransformationGUI.cxx +SOURCES += TransformationGUI_MultiTranslationDlg.cxx +SOURCES += TransformationGUI_MultiRotationDlg.cxx +SOURCES += TransformationGUI_TranslationDlg.cxx +SOURCES += TransformationGUI_RotationDlg.cxx +SOURCES += TransformationGUI_MirrorDlg.cxx +SOURCES += TransformationGUI_ScaleDlg.cxx +SOURCES += TransformationGUI_OffsetDlg.cxx +SOURCES += TransformationGUI_PositionDlg.cxx + +includes.files = $$HEADERS +includes.path = ../../include + +INSTALLS += includes diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 5e6868836..bafcadbfa 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -27,19 +27,19 @@ // $Header$ #include "TransformationGUI_MirrorDlg.h" +#include "DlgRef_2Sel1Spin2Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -50,22 +50,21 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(GeometryGUI* theGeometryGUI, QWidget* parent, - const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_POINT"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_AXE"))); QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_PLANE"))); QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_MIRROR_TITLE")); + setWindowTitle(tr("GEOM_MIRROR_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_MIRROR")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->setPixmap(image2); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image1); + RadioButton3->setIcon(image2); GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); GroupPoints->SpinBox_DX->hide(); @@ -75,10 +74,10 @@ TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(GeometryGUI* theGeometr GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupPoints->TextLabel2->setText(tr("GEOM_POINT_MIRROR")); GroupPoints->TextLabel2->setFixedWidth(74); - GroupPoints->PushButton1->setPixmap(image3); - GroupPoints->PushButton2->setPixmap(image3); + GroupPoints->PushButton1->setIcon(image3); + GroupPoints->PushButton2->setIcon(image3); GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ setHelpFileName("mirror_image.htm"); @@ -130,7 +129,7 @@ void TransformationGUI_MirrorDlg::Init() connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_MIRROR" ) ); + initName( tr( "GEOM_MIRROR" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.h b/src/TransformationGUI/TransformationGUI_MirrorDlg.h index 44d8f5dda..8764cab59 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.h +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.h @@ -29,10 +29,8 @@ #define DIALOGBOX_MIRROR_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin2Check.h" -#include "TransformationGUI.h" - +class DlgRef_2Sel1Spin2Check; //================================================================================= // class : TransformationGUI_MirrorDlg @@ -44,7 +42,7 @@ class TransformationGUI_MirrorDlg : public GEOMBase_Skeleton public: TransformationGUI_MirrorDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_MirrorDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 88535e435..11c93f4e6 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -27,19 +27,20 @@ // $Header$ #include "TransformationGUI_MultiRotationDlg.h" +#include "DlgRef_2Sel4Spin1Check.h" +#include "DlgRef_2Sel1Spin.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -50,30 +51,30 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg - (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); QPixmap image0(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_MULTIROTATION_SIMPLE"))); QPixmap image1(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_MULTIROTATION_DOUBLE"))); QPixmap image2(aResMgr->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_MULTIROTATION_TITLE")); + setWindowTitle(tr("GEOM_MULTIROTATION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_MULTIROTATION")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image1); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_2Sel1Spin(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_MULTIROTATION_SIMPLE")); GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); GroupPoints->TextLabel3->setText(tr("GEOM_NB_TIMES")); - GroupPoints->PushButton1->setPixmap(image2); - GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->PushButton1->setIcon(image2); + GroupPoints->PushButton2->setIcon(image2); GroupPoints->LineEdit1->setReadOnly(true); GroupPoints->LineEdit2->setReadOnly(true); @@ -86,13 +87,13 @@ TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg GroupDimensions->TextLabel5->setText(tr("GEOM_STEP")); GroupDimensions->TextLabel6->setText(tr("GEOM_NB_TIMES")); GroupDimensions->CheckButton1->setText(tr("GEOM_REVERSE")); - GroupDimensions->PushButton1->setPixmap(image2); - GroupDimensions->PushButton2->setPixmap(image2); + GroupDimensions->PushButton1->setIcon(image2); + GroupDimensions->PushButton2->setIcon(image2); GroupDimensions->LineEdit1->setReadOnly(true); GroupDimensions->LineEdit2->setReadOnly(true); - Layout1->addWidget(GroupPoints, 2, 0); - Layout1->addWidget(GroupDimensions, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ setHelpFileName("multi_rotation.htm"); @@ -168,7 +169,7 @@ void TransformationGUI_MultiRotationDlg::Init() connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_MULTIROTATION" ) ); + initName( tr( "GEOM_MULTIROTATION" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h index d82780fd2..9a61d3fd8 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h @@ -29,9 +29,9 @@ #define DIALOGBOX_MULTIROTATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel4Spin1Check.h" -#include "DlgRef_2Sel1Spin.h" +class DlgRef_2Sel4Spin1Check; +class DlgRef_2Sel1Spin; //================================================================================= // class : TransformationGUI_MultiRotationDlg @@ -43,7 +43,7 @@ class TransformationGUI_MultiRotationDlg : public GEOMBase_Skeleton public: TransformationGUI_MultiRotationDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_MultiRotationDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 75f3e4d35..74d5b742e 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -27,20 +27,20 @@ // $Header$ #include "TransformationGUI_MultiTranslationDlg.h" +#include "DlgRef_2Sel2Spin1Check.h" +#include "DlgRef_3Sel4Spin2Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include - #include "GEOMImpl_Types.hxx" -#include - -#include "utilities.h" - using namespace std; //================================================================================= @@ -51,22 +51,22 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg - (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_MULTITRANSLATION_SIMPLE"))); QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_MULTITRANSLATION_DOUBLE"))); QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT"))); - setCaption(tr("GEOM_MULTITRANSLATION_TITLE")); + setWindowTitle(tr("GEOM_MULTITRANSLATION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_MULTITRANSLATION")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image1); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_2Sel2Spin1Check(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_MULTITRANSLATION_SIMPLE")); @@ -75,8 +75,8 @@ TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg GroupPoints->TextLabel3->setText(tr("GEOM_STEP_U")); GroupPoints->TextLabel4->setText(tr("GEOM_NB_TIMES_U")); GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE_U")); - GroupPoints->PushButton1->setPixmap(image2); - GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->PushButton1->setIcon(image2); + GroupPoints->PushButton2->setIcon(image2); GroupPoints->LineEdit1->setReadOnly(true); GroupPoints->LineEdit2->setReadOnly(true); @@ -91,15 +91,15 @@ TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg GroupDimensions->TextLabel7->setText(tr("GEOM_NB_TIMES_V")); GroupDimensions->CheckButton1->setText(tr("GEOM_REVERSE_U")); GroupDimensions->CheckButton2->setText(tr("GEOM_REVERSE_V")); - GroupDimensions->PushButton1->setPixmap(image2); - GroupDimensions->PushButton2->setPixmap(image2); - GroupDimensions->PushButton3->setPixmap(image2); + GroupDimensions->PushButton1->setIcon(image2); + GroupDimensions->PushButton2->setIcon(image2); + GroupDimensions->PushButton3->setIcon(image2); GroupDimensions->LineEdit1->setReadOnly(true); GroupDimensions->LineEdit2->setReadOnly(true); GroupDimensions->LineEdit3->setReadOnly(true); - Layout1->addWidget(GroupPoints, 2, 0); - Layout1->addWidget(GroupDimensions, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ setHelpFileName("multi_translation.htm"); @@ -183,7 +183,7 @@ void TransformationGUI_MultiTranslationDlg::Init() SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_MULTITRANSLATION" ) ); + initName( tr( "GEOM_MULTITRANSLATION" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h index c36073d8b..ec274909d 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h @@ -29,9 +29,9 @@ #define DIALOGBOX_MULTITRANSLATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel2Spin1Check.h" -#include "DlgRef_3Sel4Spin2Check.h" +class DlgRef_2Sel2Spin1Check; +class DlgRef_3Sel4Spin2Check; //================================================================================= // class : TransformationGUI_MultiTranslationDlg @@ -43,7 +43,7 @@ class TransformationGUI_MultiTranslationDlg : public GEOMBase_Skeleton public: TransformationGUI_MultiTranslationDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_MultiTranslationDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index 6a33e47e8..0d1580a8d 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -27,17 +27,17 @@ // $Header$ #include "TransformationGUI_OffsetDlg.h" +#include "DlgRef_1Sel1Spin1Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - -#include "utilities.h" - using namespace std; //================================================================================= @@ -48,20 +48,21 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg(GeometryGUI* theGeometryGUI, QWidget* parent, - const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_OFFSET"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_OFFSET_TITLE")); + setWindowTitle(tr("GEOM_OFFSET_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_OFFSET")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton2->close(); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_1Sel1Spin1Check(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); @@ -72,9 +73,9 @@ TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg(GeometryGUI* theGeometr // san -- modification of an exisitng object by offset is not allowed GroupPoints->CheckButton1->hide(); - GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ @@ -109,7 +110,7 @@ void TransformationGUI_OffsetDlg::Init() /* min, max, step and decimals for spin boxes & initial values */ GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); - GroupPoints->SpinBox_DX->setPrecision(5); + GroupPoints->SpinBox_DX->setDecimals(5); //@ GroupPoints->SpinBox_DX->setDblPrecision(1e-05); GroupPoints->SpinBox_DX->SetValue(1e-05); @@ -128,7 +129,7 @@ void TransformationGUI_OffsetDlg::Init() connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); - initName( tr( "GEOM_OFFSET" ) ); + initName( tr( "GEOM_OFFSET" ).toLatin1().constData() ); globalSelection( GEOM_ALLSHAPES ); diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.h b/src/TransformationGUI/TransformationGUI_OffsetDlg.h index a49cdd87f..cdff5df72 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.h +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.h @@ -29,8 +29,8 @@ #define DIALOGBOX_OFFSET_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel1Spin1Check.h" - + +class DlgRef_1Sel1Spin1Check; //================================================================================= // class : TransformationGUI_OffsetDlg @@ -42,7 +42,7 @@ class TransformationGUI_OffsetDlg : public GEOMBase_Skeleton public: TransformationGUI_OffsetDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_OffsetDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index 07c3dee7c..bd6c53df5 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -27,21 +27,21 @@ // $Header$ #include "TransformationGUI_PositionDlg.h" +#include "DlgRef_3Sel3Spin1Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - #include "TColStd_MapOfInteger.hxx" #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -52,22 +52,22 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_PositionDlg::TransformationGUI_PositionDlg - (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl) - : GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) + : GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); QPixmap image0(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_POSITION"))); QPixmap image1(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_POSITION2"))); QPixmap imageselect(aResMgr->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_POSITION_TITLE")); + setWindowTitle(tr("GEOM_POSITION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_POSITION")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image1); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); Group1 = new DlgRef_3Sel3Spin1Check(this, "Group1"); Group1->SpinBox1->hide(); @@ -80,12 +80,12 @@ TransformationGUI_PositionDlg::TransformationGUI_PositionDlg Group1->TextLabel1->setText(tr("GEOM_OBJECTS")); Group1->TextLabel2->setText(tr("GEOM_START_LCS")); Group1->TextLabel3->setText(tr("GEOM_END_LCS")); - Group1->PushButton1->setPixmap(imageselect); - Group1->PushButton2->setPixmap(imageselect); - Group1->PushButton3->setPixmap(imageselect); + Group1->PushButton1->setIcon(imageselect); + Group1->PushButton2->setIcon(imageselect); + Group1->PushButton3->setIcon(imageselect); Group1->CheckBox1->setText(tr("GEOM_CREATE_COPY")); - Layout1->addWidget(Group1, 2, 0); + gridLayout1->addWidget(Group1, 2, 0); /***************************************************************/ @@ -141,7 +141,7 @@ void TransformationGUI_PositionDlg::Init() connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName( tr( "GEOM_POSITION" ) ); + initName( tr( "GEOM_POSITION" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.h b/src/TransformationGUI/TransformationGUI_PositionDlg.h index 9ecfb2809..e6f2a1934 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.h +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.h @@ -29,10 +29,8 @@ #define DIALOGBOX_POSITION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_3Sel3Spin1Check.h" -#include "TransformationGUI.h" - +class DlgRef_3Sel3Spin1Check; //================================================================================= // class : TransformationGUI_PositionDlg @@ -44,7 +42,7 @@ class TransformationGUI_PositionDlg : public GEOMBase_Skeleton public: TransformationGUI_PositionDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_PositionDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 39f71533b..1dd779b13 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -27,19 +27,19 @@ // $Header$ #include "TransformationGUI_RotationDlg.h" +#include "DlgRef_4Sel1Spin2Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -50,22 +50,22 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_RotationDlg::TransformationGUI_RotationDlg - (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); QPixmap image0 (aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ROTATION"))); QPixmap image1 (aResMgr->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image2 (aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ROTATION_THREE_POINTS"))); - setCaption(tr("GEOM_ROTATION_TITLE")); + setWindowTitle(tr("GEOM_ROTATION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_ROTATION")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image2); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image2); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_4Sel1Spin2Check(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); @@ -79,14 +79,14 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg GroupPoints->LineEdit2->setReadOnly(true); GroupPoints->LineEdit4->setReadOnly(true); GroupPoints->LineEdit5->setReadOnly(true); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); - GroupPoints->PushButton4->setPixmap(image1); - GroupPoints->PushButton5->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); + GroupPoints->PushButton2->setIcon(image1); + GroupPoints->PushButton4->setIcon(image1); + GroupPoints->PushButton5->setIcon(image1); GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ double anAngle = 0; double SpecificStep = 5; @@ -146,7 +146,7 @@ void TransformationGUI_RotationDlg::Init() myAxis = myCentPoint = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); - initName( tr( "GEOM_ROTATION" ) ); + initName( tr( "GEOM_ROTATION" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.h b/src/TransformationGUI/TransformationGUI_RotationDlg.h index 4a18bbc1d..ef22d3d19 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.h @@ -29,7 +29,8 @@ #define DIALOGBOX_ROTATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_4Sel1Spin2Check.h" + +class DlgRef_4Sel1Spin2Check; //================================================================================= // class : TransformationGUI_RotationDlg @@ -41,7 +42,7 @@ class TransformationGUI_RotationDlg : public GEOMBase_Skeleton public: TransformationGUI_RotationDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_RotationDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 40e6cc20a..71218b4be 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -27,19 +27,19 @@ // $Header$ #include "TransformationGUI_ScaleDlg.h" +#include "DlgRef_2Sel1Spin2Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -50,20 +50,21 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(GeometryGUI* theGeometryGUI, QWidget* parent, - const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SCALE"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_SCALE_TITLE")); + setWindowTitle(tr("GEOM_SCALE_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_SCALE")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton2->close(); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); GroupPoints->CheckButton2->hide(); @@ -73,14 +74,14 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(GeometryGUI* theGeometryG GroupPoints->TextLabel3->setText(tr("GEOM_SCALE_FACTOR")); GroupPoints->LineEdit1->setReadOnly( true ); GroupPoints->LineEdit2->setReadOnly( true ); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); + GroupPoints->PushButton2->setIcon(image1); GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); // san -- modification of an exisitng object by offset is not allowed GroupPoints->CheckButton1->hide(); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ double aFactor = 2.0; double SpecificStep = 0.5; @@ -136,7 +137,7 @@ void TransformationGUI_ScaleDlg::Init() myPoint = GEOM::GEOM_Object::_nil(); - initName( tr( "GEOM_SCALE" ) ); + initName( tr( "GEOM_SCALE" ).toLatin1().constData() ); } diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.h b/src/TransformationGUI/TransformationGUI_ScaleDlg.h index 0190f04d5..6b834fe1c 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.h +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.h @@ -29,8 +29,8 @@ #define DIALOGBOX_SCALE_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin2Check.h" - + +class DlgRef_2Sel1Spin2Check; //================================================================================= // class : TransformationGUI_ScaleDlg @@ -42,7 +42,7 @@ class TransformationGUI_ScaleDlg : public GEOMBase_Skeleton public: TransformationGUI_ScaleDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_ScaleDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 5e022bc88..b4962ceb6 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -27,19 +27,19 @@ // $Header$ #include "TransformationGUI_TranslationDlg.h" +#include "DlgRef_3Sel3Spin1Check.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include -#include - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -50,9 +50,8 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg - (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + (GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TRANSLATION_DXYZ"))); @@ -60,13 +59,13 @@ TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TRANSLATION_VECTOR"))); QPixmap image3 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT"))); - setCaption(tr("GEOM_TRANSLATION_TITLE")); + setWindowTitle(tr("GEOM_TRANSLATION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_TRANSLATION")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->setPixmap(image2); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image1); + RadioButton3->setIcon(image2); RadioButton1->setChecked(true); @@ -77,12 +76,12 @@ TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg GroupPoints->TextLabel4->setText(tr("GEOM_DX")); GroupPoints->TextLabel5->setText(tr("GEOM_DY")); GroupPoints->TextLabel6->setText(tr("GEOM_DZ")); - GroupPoints->PushButton1->setPixmap(image3); - GroupPoints->PushButton2->setPixmap(image3); - GroupPoints->PushButton3->setPixmap(image3); + GroupPoints->PushButton1->setIcon(image3); + GroupPoints->PushButton2->setIcon(image3); + GroupPoints->PushButton3->setIcon(image3); GroupPoints->CheckBox1->setText(tr("GEOM_CREATE_COPY")); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ setHelpFileName("translation.htm"); @@ -156,7 +155,7 @@ void TransformationGUI_TranslationDlg::Init() connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_TRANSLATION" ) ); + initName( tr( "GEOM_TRANSLATION" ).toLatin1().constData() ); ConstructorsClicked( 0 ); } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.h b/src/TransformationGUI/TransformationGUI_TranslationDlg.h index 338c3ab15..53c696f16 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.h @@ -29,8 +29,8 @@ #define DIALOGBOX_TRANSLATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_3Sel3Spin1Check.h" +class DlgRef_3Sel3Spin1Check; //================================================================================= // class : TransformationGUI_TranslationDlg @@ -42,7 +42,7 @@ class TransformationGUI_TranslationDlg : public GEOMBase_Skeleton public: TransformationGUI_TranslationDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~TransformationGUI_TranslationDlg(); protected: diff --git a/src/src.pro b/src/src.pro index cc4dd70d6..091b5de18 100644 --- a/src/src.pro +++ b/src/src.pro @@ -32,7 +32,7 @@ SUBDIRS += GenerationGUI SUBDIRS += EntityGUI SUBDIRS += BuildGUI SUBDIRS += BooleanGUI -#SUBDIRS += TransformationGUI +SUBDIRS += TransformationGUI #SUBDIRS += OperationGUI #SUBDIRS += RepairGUI #SUBDIRS += MeasureGUI