Salome HOME
Avoid compilation problem because of using standard libraries
[modules/geom.git] / src / GEOMBase / GEOMBase_Skeleton.cxx
index 8550cfbec9a9c0b95c39889c047409c74568fa79..b1a50b0af99ebfe483f6538161fdfc39bcb0f908 100644 (file)
@@ -26,8 +26,8 @@
 #include "GEOMBase_Skeleton.h"
 #include "GEOMBase.h"
 
+#include <DlgRef.h>
 #include <GeometryGUI.h>
-#include <GEOM_DlgRef.h>
 
 #include <SalomeApp_Application.h>
 #include <LightApp_Application.h>
 #include <SUIT_MessageBox.h>
 
 #include <QKeyEvent>
+#include <QSpinBox>
 #include <QDoubleSpinBox>
 
-using namespace std;
-
 //=================================================================================
 // class    : GEOMBase_Skeleton()
 // purpose  : Constructs a GEOMBase_Skeleton which is a child of 'parent', with the 
@@ -65,6 +64,8 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare
   topLayout->setMargin( 0 ); topLayout->setSpacing( 0 );
   topLayout->addWidget( myMainFrame );
 
+  myMainFrame->GroupBoxName->setTitle( tr( "GEOM_RESULT_NAME_GRP" ) );
+  myMainFrame->NameLabel->setText( tr( "GEOM_RESULT_NAME_LBL" ) );
   buttonCancel()->setText( tr( "GEOM_BUT_CLOSE" ) );
   buttonOk()->setText( tr( "GEOM_BUT_OK" )) ;
   buttonApply()->setText( tr( "GEOM_BUT_APPLY" ) );
@@ -121,6 +122,13 @@ void GEOMBase_Skeleton::Init()
   myMainFrame->RadioButton4->hide();
 }
 
+void GEOMBase_Skeleton::initSpinBox( QSpinBox* spinBox, 
+                                    int min,  int max, int step )
+{
+  spinBox->setRange( min, max );
+  spinBox->setSingleStep( step );
+}
+
 void GEOMBase_Skeleton::initSpinBox( QDoubleSpinBox* spinBox, 
                                     double min,  double max, 
                                     double step, int decimals )
@@ -227,15 +235,17 @@ const char* GEOMBase_Skeleton::getNewObjectName() const
 //=================================================================================
 int GEOMBase_Skeleton::getConstructorId() const
 {
-  /*if ( GroupConstructors != NULL && GroupConstructors->selected() != NULL )
-    return GroupConstructors->id( GroupConstructors->selected() );
-    return -1;*/
-
-  if ( myRBGroup != NULL )
+  if ( myRBGroup )
     return myRBGroup->checkedId();
   return -1;
 }
 
+void GEOMBase_Skeleton::setConstructorId( const int id )
+{
+  if ( myRBGroup && myRBGroup->button( id ) )
+    myRBGroup->button( id )->setChecked( true );
+}
+
 //=================================================================================
 // function : ClickOnHelp()
 // purpose  :