Back to index

salome-geom  6.5.0
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes
EntityGUI_3DSketcherDlg Class Reference

#include <EntityGUI_3DSketcherDlg.h>

Collaboration diagram for EntityGUI_3DSketcherDlg:
Collaboration graph
[legend]

List of all members.

Classes

struct  XYZ

Public Member Functions

 EntityGUI_3DSketcherDlg (GeometryGUI *, QWidget *=0, bool=false, Qt::WindowFlags=0, const double=2.)
 ~EntityGUI_3DSketcherDlg ()

Protected Member Functions

virtual GEOM::GEOM_IOperations_ptr createOperation ()
virtual bool isValid (QString &)
virtual bool execute (ObjectList &)

Private Types

typedef QList< XYZXYZList

Private Slots

void ClickOnOk ()
void ClickOnAddPoint ()
bool ClickOnApply ()
void UpdateButtonsState ()
void ClickOnUndo ()
void ClickOnRedo ()
void SelectionIntoArgument ()
void DeactivateActiveDialog ()
void ActivateThisDialog ()
void TypeClicked (int)
void ValueChangedInSpinBox (double)
void SetDoubleSpinBoxStep (double)

Private Member Functions

void Init ()
void enterEvent (QEvent *)
virtual void displayPreview (GEOM::GEOM_Object_ptr, const bool=false, const bool=false, const bool=true, const double=-1, const int=-1, const int=-1)
bool createShapes (GEOM::GEOM_Object_ptr, TopoDS_Shape &, TopoDS_Shape &)
XYZ getLastPoint () const
XYZ getCurrentPoint () const

Private Attributes

XYZList myPointsList
XYZList myRedoList
EntityGUI_3SpinGroup3Spin
DlgRef_3Radio * GroupType
QButtonGroup * myTypeGroup
int myMode
bool myOK
double myLineWidth
GeometryGUI * myGeometryGUI

Detailed Description

Definition at line 45 of file EntityGUI_3DSketcherDlg.h.


Member Typedef Documentation

typedef QList<XYZ> EntityGUI_3DSketcherDlg::XYZList [private]

Definition at line 55 of file EntityGUI_3DSketcherDlg.h.


Constructor & Destructor Documentation

EntityGUI_3DSketcherDlg::EntityGUI_3DSketcherDlg ( GeometryGUI *  theGeometryGUI,
QWidget *  parent = 0,
bool  modal = false,
Qt::WindowFlags  fl = 0,
const double  lineWidth = 2. 
)

Definition at line 70 of file EntityGUI_3DSketcherDlg.cxx.

  : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ),
    myMode( -1 ),
    myOK( false ),
    myLineWidth( lineWidth ),
    myGeometryGUI( theGeometryGUI )
{
  QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
  QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_UNDO" ) ) );
  QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_REDO" ) ) );
  QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICO_3DSKETCH" ) ) );

  setWindowTitle( tr( "GEOM_3DSKETCHER_TITLE" ) );

  /***************************************************************/

  mainFrame()->GroupConstructors->setTitle( tr( "GEOM_3DSKETCHER" ) );
  mainFrame()->RadioButton1->setIcon( image3 );;
  mainFrame()->RadioButton2->close();
  mainFrame()->RadioButton3->close();

  GroupType = new DlgRef_3Radio(centralWidget());
  GroupType->GroupBox1->setTitle(tr("GEOM_COORDINATES_TYPE"));
  GroupType->RadioButton1->setText(tr("GEOM_SKETCHER_ABS"));
  GroupType->RadioButton2->setText(tr("GEOM_SKETCHER_REL"));
  GroupType->RadioButton3->close();
  myTypeGroup = new QButtonGroup( this );
  myTypeGroup->addButton( GroupType->RadioButton1, 0 );
  myTypeGroup->addButton( GroupType->RadioButton2, 1 );

  Group3Spin = new EntityGUI_3Spin( centralWidget() );
  Group3Spin->GroupBox1->setTitle( tr( "GEOM_SKETCHER_VALUES" ) );
  Group3Spin->buttonApply->setText( tr( "GEOM_SKETCHER_APPLY" ) );
  Group3Spin->buttonUndo->setIcon( image1 );
  Group3Spin->buttonRedo->setIcon( image2 );
  Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X2" ) );
  Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y2" ) );
  Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Z2" ) );

  buttonOk()->setText( tr( "GEOM_BUT_END_SKETCH" ) );
  buttonApply()->setText( tr( "GEOM_BUT_CLOSE_SKETCH" ) );
  
  QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
  layout->setMargin( 0 ); layout->setSpacing( 6 );
  layout->addWidget( GroupType );
  layout->addWidget( Group3Spin );

  setHelpFileName( "create_3dsketcher_page.html" );

  resize(100,100);
  Init();
}  

Here is the call graph for this function:

Definition at line 131 of file EntityGUI_3DSketcherDlg.cxx.

{
  myGeomGUI->SetActiveDialogBox( 0 );
}

Member Function Documentation

Definition at line 367 of file EntityGUI_3DSketcherDlg.cxx.

{
  myGeomGUI->EmitSignalDeactivateDialog();
  setEnabled( true );
  myGeomGUI->SetActiveDialogBox( this );

  connect( myGeomGUI->getApp()->selectionMgr(),
          SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );

  localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
  GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::ClickOnAddPoint ( ) [private, slot]

Definition at line 232 of file EntityGUI_3DSketcherDlg.cxx.

{
  QString msg;
  if ( !isValid( msg ) ) {
    showError( msg );
    return;
  }

  myPointsList.append( getCurrentPoint() );
  myRedoList.clear();

  if ( myMode == 1 ) {
    Group3Spin->SpinBox_DX->setValue( 0.0 );
    Group3Spin->SpinBox_DY->setValue( 0.0 );
    Group3Spin->SpinBox_DZ->setValue( 0.0 );
  }
  UpdateButtonsState();
  GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool EntityGUI_3DSketcherDlg::ClickOnApply ( ) [private, slot]

Definition at line 497 of file EntityGUI_3DSketcherDlg.cxx.

{
  QString msg;
  if ( !isValid( msg ) ) {
    showError( msg );
    return false;
  }

  if (myPointsList.count() > 0)
    myPointsList.append(myPointsList[0]);

  Locker lock( myOK );

  if ( !onAccept() )
    return false;

  ClickOnCancel();
  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::ClickOnOk ( ) [private, slot]

Definition at line 483 of file EntityGUI_3DSketcherDlg.cxx.

{
  Locker lock( myOK );

  if ( !onAccept() )
    return;

  ClickOnCancel();
}

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::ClickOnRedo ( ) [private, slot]

Definition at line 281 of file EntityGUI_3DSketcherDlg.cxx.

{
  if ( myRedoList.count() > 0) {
    myPointsList.append( myRedoList.takeLast() );
    UpdateButtonsState();
    GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::ClickOnUndo ( ) [private, slot]

Definition at line 268 of file EntityGUI_3DSketcherDlg.cxx.

{
  if (myPointsList.count() > 0) {
    myRedoList.append( myPointsList.takeLast() );
    UpdateButtonsState();
    GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

GEOM::GEOM_IOperations_ptr EntityGUI_3DSketcherDlg::createOperation ( ) [protected, virtual]

Definition at line 404 of file EntityGUI_3DSketcherDlg.cxx.

{
  return getGeomEngine()->GetICurvesOperations( getStudyId() );
}
bool EntityGUI_3DSketcherDlg::createShapes ( GEOM::GEOM_Object_ptr  ,
TopoDS_Shape &  theApplyedWire,
TopoDS_Shape &  theLastSegment 
) [private]

Definition at line 601 of file EntityGUI_3DSketcherDlg.cxx.

{
  QList<gp_Pnt> points;
  foreach( XYZ xyz, myPointsList) {
    gp_Pnt p(xyz.x, xyz.y, xyz.z);
    if ( points.isEmpty() || points.last().Distance(p) > gp::Resolution())
      points << p;
  } 
  
  if ( points.count() == 1 ) {
    // only one point is created
    BRepBuilderAPI_MakeVertex mkVertex (points.last());
    theApplyedWire = mkVertex.Shape();
  }
  else if ( points.count() > 1 ) {
    // wire is created
    BRepBuilderAPI_MakePolygon mkWire;
    foreach( gp_Pnt p, points )
      mkWire.Add(p);
    theApplyedWire = mkWire.Shape();
  }

  XYZ curxyz = getCurrentPoint();
  gp_Pnt curpnt(curxyz.x, curxyz.y, curxyz.z);
  
  if ( points.isEmpty() || points.last().Distance(curpnt) <= gp::Resolution() ) {
    BRepBuilderAPI_MakeVertex mkVertex (curpnt);
    theLastSegment = mkVertex.Shape();
  }
  else {
    BRepBuilderAPI_MakeEdge mkEdge(points.last(), curpnt);
    theLastSegment = mkEdge.Shape();
  }

  /* VSR: old algorithm does not work properly, see bug 0020899
  TopoDS_Shape aShape;
  if ( !GEOMBase::GetShape( theObject, aShape ) )
    return false;

  if( aShape.ShapeType() != TopAbs_WIRE && aShape.ShapeType() != TopAbs_VERTEX )
    return false;

  theApplyedWire = aShape;
  if ( myOK  )
     return true;

  BRepBuilderAPI_MakeWire aBuilder;
  TopExp_Explorer edgeExp( aShape, TopAbs_EDGE );
  while ( 1 ) {
    TopoDS_Shape anEdge = edgeExp.Current();
    edgeExp.Next();
    if ( edgeExp.More() ) // i.e. non-last edge
      aBuilder.Add( TopoDS::Edge( anEdge ) );
    else {
      theLastSegment = anEdge;
      break;
    }
  }

  if ( aBuilder.IsDone() ) {
    theApplyedWire = aBuilder.Shape();
  }
  else if ( !theLastSegment.IsNull() ) {
    TopExp_Explorer vertexExp( theLastSegment, TopAbs_VERTEX );
    theApplyedWire = vertexExp.Current();
    }
  */

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 354 of file EntityGUI_3DSketcherDlg.cxx.

{
  setEnabled( false );
  globalSelection();
  disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
  myGeomGUI->SetActiveDialogBox( 0 );
}

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::displayPreview ( GEOM::GEOM_Object_ptr  object,
const bool  append = false,
const bool  activate = false,
const bool  update = true,
const double  lineWidth = -1,
const int  displayMode = -1,
const int  color = -1 
) [private, virtual]

Definition at line 555 of file EntityGUI_3DSketcherDlg.cxx.

{
  // Set color for preview shape
  getDisplayer()->SetColor( Quantity_NOC_RED );

  // set width of displayed shape
  getDisplayer()->SetWidth( (lineWidth == -1)?myLineWidth:lineWidth ); 

  // Disable activation of selection
  getDisplayer()->SetToActivate( activate );

  // Make a reference to GEOM_Object
  CORBA::String_var objStr = myGeometryGUI->getApp()->orb()->object_to_string( object );
  getDisplayer()->SetName( objStr.in() );

  // Create wire from applied object
  TopoDS_Shape anApplyedWire, aLastSegment;
  if ( !createShapes( object, anApplyedWire, aLastSegment ) )
    return;

  // Build prs
  SALOME_Prs* aPrs = getDisplayer()->BuildPrs( anApplyedWire );
  if ( aPrs != 0 && !aPrs->IsNull() )
    GEOMBase_Helper::displayPreview( aPrs, append, update );

  getDisplayer()->SetColor( Quantity_NOC_VIOLET );
  aPrs = getDisplayer()->BuildPrs( aLastSegment );
  if ( aPrs != 0 && !aPrs->IsNull() )
    GEOMBase_Helper::displayPreview( aPrs, append, update );

  getDisplayer()->UnsetName();

  // Enable activation of displayed objects
  getDisplayer()->SetToActivate( true );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::enterEvent ( QEvent *  ) [private]

Definition at line 394 of file EntityGUI_3DSketcherDlg.cxx.

{
  if ( !mainFrame()->GroupConstructors->isEnabled() )
    ActivateThisDialog();
}

Here is the call graph for this function:

bool EntityGUI_3DSketcherDlg::execute ( ObjectList objects) [protected, virtual]

Definition at line 426 of file EntityGUI_3DSketcherDlg.cxx.

{
  GEOM::ListOfDouble_var aCoordsArray = new GEOM::ListOfDouble;
  if (!myOK || myPointsList.size() == 0)
    aCoordsArray->length((myPointsList.size()+1)*3);
  else
    aCoordsArray->length(myPointsList.size()*3);

  QStringList aParameters;

  int i = 0;
  QList<XYZ>::const_iterator it;
  for(it = myPointsList.begin(); it != myPointsList.end(); ++it ) {
    aCoordsArray[i++] = (*it).x;
    aCoordsArray[i++] = (*it).y;
    aCoordsArray[i++] = (*it).z;
    aParameters << (*it).xt;
    aParameters << (*it).yt;
    aParameters << (*it).zt;
  }

  if (!myOK || myPointsList.size() == 0) {
    XYZ xyz = getCurrentPoint();
    aCoordsArray[i++] = xyz.x;
    aCoordsArray[i++] = xyz.y;
    aCoordsArray[i++] = xyz.z;
    aParameters << xyz.xt;
    aParameters << xyz.yt;
    aParameters << xyz.zt;
  } 

  GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation());
  GEOM::GEOM_Object_var anObj = anOper->Make3DSketcher( aCoordsArray );

  if ( !anObj->_is_nil() ) {
    if ( !IsPreview() ) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
    objects.push_back( anObj._retn() );
  }

  return true;
}

Here is the call graph for this function:

Definition at line 530 of file EntityGUI_3DSketcherDlg.cxx.

{
  XYZ xyz;
  if ( myMode == 0 ) {
    xyz.x = Group3Spin->SpinBox_DX->value();
    xyz.y = Group3Spin->SpinBox_DY->value();
    xyz.z = Group3Spin->SpinBox_DZ->value();
  } 
  else {
    xyz = getLastPoint();
    xyz.x += Group3Spin->SpinBox_DX->value();
    xyz.y += Group3Spin->SpinBox_DY->value();
    xyz.z += Group3Spin->SpinBox_DZ->value();
  }
  xyz.xt = Group3Spin->SpinBox_DX->text();
  xyz.yt = Group3Spin->SpinBox_DY->text();
  xyz.zt = Group3Spin->SpinBox_DZ->text();
  return xyz;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 521 of file EntityGUI_3DSketcherDlg.cxx.

{
  return myPointsList.count() > 0 ? myPointsList.last() : XYZ();
}

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::Init ( ) [private]

Definition at line 140 of file EntityGUI_3DSketcherDlg.cxx.

{
  myOK = false;

  localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );

  /* Get setting of step value from file configuration */
  double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 );

  /* min, max, step and decimals for spin boxes */
  initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
  initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
  initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );

  Group3Spin->SpinBox_DX->setValue(0.0);
  Group3Spin->SpinBox_DY->setValue(0.0);
  Group3Spin->SpinBox_DZ->setValue(0.0);

  /* signals and slots connections */
  connect( buttonOk(),     SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
  connect( buttonApply(),  SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );

  connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );

  connect( Group3Spin->buttonApply,  SIGNAL( clicked() ), this, SLOT( ClickOnAddPoint() ) );
  connect( Group3Spin->buttonUndo,   SIGNAL( clicked() ), this, SLOT( ClickOnUndo() ) );
  connect( Group3Spin->buttonRedo,   SIGNAL( clicked() ), this, SLOT( ClickOnRedo() ) ) ;

  connect( myTypeGroup, SIGNAL( buttonClicked( int ) ),  this, SLOT( TypeClicked( int ) ) );

  connect( Group3Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
  connect( Group3Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
  connect( Group3Spin->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );

  connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );

  connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
  connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( ClickOnCancel() ) );

  initName( tr( "GEOM_3DSKETCHER" ) );

  UpdateButtonsState();
  GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool EntityGUI_3DSketcherDlg::isValid ( QString &  msg) [protected, virtual]

Definition at line 413 of file EntityGUI_3DSketcherDlg.cxx.

{
  bool ok = true;
  ok = Group3Spin->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
  ok = Group3Spin->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
  ok = Group3Spin->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
  return ok;
}

Here is the caller graph for this function:

Definition at line 294 of file EntityGUI_3DSketcherDlg.cxx.

{
  LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
  SALOME_ListIO aSelList;
  aSelMgr->selectedObjects(aSelList);

  int nbSel = aSelList.Extent();
  if ( nbSel == 1 ) {
    GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
    if ( !CORBA::is_nil(aSelectedObject) ) {
      TopoDS_Shape aShape;
      if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE)) { // Explore the shape if its a local selection
        TColStd_IndexedMapOfInteger aMap;
        aSelMgr->GetIndexes(aSelList.First(), aMap);
        if (aMap.Extent() == 1)
          {
            int anIndex = aMap(1);
            GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
            aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
          }
      }
      bool isOk = true;
      if ( aShape.ShapeType() != TopAbs_VERTEX )
        isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX);
      if (isOk) {
        gp_Pnt aPnt;
        if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
          // set coordinates to the Spin Boxes
          double aX, aY, aZ;
          aX = aPnt.X();
          aY = aPnt.Y();
          aZ = aPnt.Z();
          bool blocked = Group3Spin->SpinBox_DX->signalsBlocked();
          Group3Spin->SpinBox_DX->blockSignals(true);
          Group3Spin->SpinBox_DY->blockSignals(true);
          Group3Spin->SpinBox_DZ->blockSignals(true);
          if ( GroupType->RadioButton1->isChecked() ) {
            Group3Spin->SpinBox_DX->setValue( aX );
            Group3Spin->SpinBox_DY->setValue( aY );
            Group3Spin->SpinBox_DZ->setValue( aZ );
          } else if ( GroupType->RadioButton2->isChecked() ) {
            XYZ xyz = getLastPoint();
            Group3Spin->SpinBox_DX->setValue( aX - xyz.x );
            Group3Spin->SpinBox_DY->setValue( aY - xyz.y );
            Group3Spin->SpinBox_DZ->setValue( aZ - xyz.z );
          }
          Group3Spin->SpinBox_DX->blockSignals(blocked);
          Group3Spin->SpinBox_DY->blockSignals(blocked);
          Group3Spin->SpinBox_DZ->blockSignals(blocked);
        }
      }
    }
  }
  GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::SetDoubleSpinBoxStep ( double  step) [private, slot]

Definition at line 472 of file EntityGUI_3DSketcherDlg.cxx.

{
  Group3Spin->SpinBox_DX->setSingleStep(step);
  Group3Spin->SpinBox_DY->setSingleStep(step);
  Group3Spin->SpinBox_DZ->setSingleStep(step);
}

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::TypeClicked ( int  mode) [private, slot]

Definition at line 189 of file EntityGUI_3DSketcherDlg.cxx.

{
  if ( mode == myMode ) return;

  bool blocked = Group3Spin->SpinBox_DX->signalsBlocked();
  Group3Spin->SpinBox_DX->blockSignals(true);
  Group3Spin->SpinBox_DY->blockSignals(true);
  Group3Spin->SpinBox_DZ->blockSignals(true);
  // Get setting of step value from file configuration
  XYZ xyz = getLastPoint();
  bool okx, oky, okz;
  Group3Spin->SpinBox_DX->text().toDouble( &okx );
  Group3Spin->SpinBox_DY->text().toDouble( &oky );
  Group3Spin->SpinBox_DZ->text().toDouble( &okz );
  if ( mode == 0 ) {  // XY
    Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X2" ) );
    Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y2" ) );
    Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Z2" ) );
    if ( okx ) Group3Spin->SpinBox_DX->setValue( xyz.x + Group3Spin->SpinBox_DX->value() );
    if ( oky ) Group3Spin->SpinBox_DY->setValue( xyz.y + Group3Spin->SpinBox_DY->value() );
    if ( okz ) Group3Spin->SpinBox_DZ->setValue( xyz.z + Group3Spin->SpinBox_DZ->value() );
    Group3Spin->buttonApply->setFocus();
  }
  else { // DXDY
    Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_DX2" ) );
    Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_DY2" ) );
    Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_DZ2" ) );
    if ( okx ) Group3Spin->SpinBox_DX->setValue( Group3Spin->SpinBox_DX->value() - xyz.x );
    if ( oky ) Group3Spin->SpinBox_DY->setValue( Group3Spin->SpinBox_DY->value() - xyz.y );
    if ( okz ) Group3Spin->SpinBox_DZ->setValue( Group3Spin->SpinBox_DZ->value() - xyz.z );
    Group3Spin->buttonApply->setFocus();
  }
  Group3Spin->SpinBox_DX->blockSignals(blocked);
  Group3Spin->SpinBox_DY->blockSignals(blocked);
  Group3Spin->SpinBox_DZ->blockSignals(blocked);

  myMode = mode;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 256 of file EntityGUI_3DSketcherDlg.cxx.

{
  if ( myPointsList.count() == 0 ) GroupType->RadioButton1->click();
  GroupType->RadioButton2->setEnabled( myPointsList.count() > 0 );
  Group3Spin->buttonUndo->setEnabled( myPointsList.count() > 0 );
  Group3Spin->buttonRedo->setEnabled( myRedoList.count() > 0 );
}

Here is the caller graph for this function:

void EntityGUI_3DSketcherDlg::ValueChangedInSpinBox ( double  newValue) [private, slot]

Definition at line 385 of file EntityGUI_3DSketcherDlg.cxx.

{
  GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 91 of file EntityGUI_3DSketcherDlg.h.

DlgRef_3Radio* EntityGUI_3DSketcherDlg::GroupType [private]

Definition at line 92 of file EntityGUI_3DSketcherDlg.h.

Definition at line 98 of file EntityGUI_3DSketcherDlg.h.

Definition at line 97 of file EntityGUI_3DSketcherDlg.h.

Definition at line 95 of file EntityGUI_3DSketcherDlg.h.

Definition at line 96 of file EntityGUI_3DSketcherDlg.h.

Definition at line 88 of file EntityGUI_3DSketcherDlg.h.

Definition at line 89 of file EntityGUI_3DSketcherDlg.h.

QButtonGroup* EntityGUI_3DSketcherDlg::myTypeGroup [private]

Definition at line 93 of file EntityGUI_3DSketcherDlg.h.


The documentation for this class was generated from the following files: