Back to index

salome-geom  6.5.0
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
TransformationGUI_MultiTranslationDlg Class Reference

#include <TransformationGUI_MultiTranslationDlg.h>

List of all members.

Public Member Functions

 TransformationGUI_MultiTranslationDlg (GeometryGUI *, QWidget *=0, bool=false, Qt::WindowFlags=0)
 ~TransformationGUI_MultiTranslationDlg ()

Protected Member Functions

virtual GEOM::GEOM_IOperations_ptr createOperation ()
virtual bool isValid (QString &)
virtual bool execute (ObjectList &)
virtual void addSubshapesToStudy ()
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr)

Private Slots

void ClickOnOk ()
bool ClickOnApply ()
void ActivateThisDialog ()
void SelectionIntoArgument ()
void SetEditCurrentArgument ()
void ReverseStepU ()
void ReverseStepV ()
void ValueChangedInSpinBox (double)
void ValueChangedInSpinBox (int)
void TextValueChangedInSpinBox (const QString &)
void ConstructorsClicked (int)
void SetDoubleSpinBoxStep (double)

Private Member Functions

void Init ()
void enterEvent (QEvent *)
void createPathPreview (GEOM::GEOM_Object_ptr)

Private Attributes

GEOM::GeomObjPtr myBase
GEOM::GeomObjPtr myVectorU
GEOM::GeomObjPtr myVectorV
int myNbTimesU
int myNbTimesV
Standard_Real myStepU
Standard_Real myStepV
bool myInitial
DlgRef_2Sel2Spin1Check * GroupPoints
DlgRef_3Sel4Spin2Check * GroupDimensions

Detailed Description

Definition at line 40 of file TransformationGUI_MultiTranslationDlg.h.


Constructor & Destructor Documentation

TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg ( GeometryGUI *  theGeometryGUI,
QWidget *  parent = 0,
bool  modal = false,
Qt::WindowFlags  fl = 0 
)

Definition at line 64 of file TransformationGUI_MultiTranslationDlg.cxx.

  : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
    myInitial(true)
{
  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")));

  setWindowTitle(tr("GEOM_MULTITRANSLATION_TITLE"));

  /***************************************************************/
  mainFrame()->GroupConstructors->setTitle(tr("GEOM_MULTITRANSLATION"));
  mainFrame()->RadioButton1->setIcon(image0);
  mainFrame()->RadioButton2->setIcon(image1);
  mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
  mainFrame()->RadioButton3->close();

  GroupPoints = new DlgRef_2Sel2Spin1Check(centralWidget());
  GroupPoints->GroupBox1->setTitle(tr("GEOM_MULTITRANSLATION_SIMPLE"));
  GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
  GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR_U"));
  GroupPoints->TextLabel3->setText(tr("GEOM_STEP_U"));
  GroupPoints->TextLabel4->setText(tr("GEOM_NB_TIMES_U"));
  GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE_U"));
  GroupPoints->PushButton1->setIcon(image2);
  GroupPoints->PushButton2->setIcon(image2);
  GroupPoints->LineEdit1->setReadOnly(true);
  GroupPoints->LineEdit2->setReadOnly(true);

  GroupDimensions = new DlgRef_3Sel4Spin2Check(centralWidget());
  GroupDimensions->GroupBox1->setTitle(tr("GEOM_MULTITRANSLATION_DOUBLE"));
  GroupDimensions->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
  GroupDimensions->TextLabel2->setText(tr("GEOM_VECTOR_U"));
  GroupDimensions->TextLabel3->setText(tr("GEOM_VECTOR_V"));
  GroupDimensions->TextLabel4->setText(tr("GEOM_STEP_U"));
  GroupDimensions->TextLabel5->setText(tr("GEOM_NB_TIMES_U"));
  GroupDimensions->TextLabel6->setText(tr("GEOM_STEP_V"));
  GroupDimensions->TextLabel7->setText(tr("GEOM_NB_TIMES_V"));
  GroupDimensions->CheckButton1->setText(tr("GEOM_REVERSE_U"));
  GroupDimensions->CheckButton2->setText(tr("GEOM_REVERSE_V"));
  GroupDimensions->PushButton1->setIcon(image2);
  GroupDimensions->PushButton2->setIcon(image2);
  GroupDimensions->PushButton3->setIcon(image2);
  GroupDimensions->LineEdit1->setReadOnly(true);
  GroupDimensions->LineEdit2->setReadOnly(true);
  GroupDimensions->LineEdit3->setReadOnly(true);

  QVBoxLayout* layout = new QVBoxLayout(centralWidget());
  layout->setMargin(0); layout->setSpacing(6);
  layout->addWidget(GroupPoints);
  layout->addWidget(GroupDimensions);
  /***************************************************************/

  setHelpFileName("multi_translation_operation_page.html");

  Init();
}

Definition at line 127 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  // no need to delete child widgets, Qt does it all for us
}

Member Function Documentation

Definition at line 454 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  GEOMBase_Skeleton::ActivateThisDialog();
  connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
           this, SLOT( SelectionIntoArgument() ) );

  ConstructorsClicked( getConstructorId() );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 676 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  switch (getConstructorId()) {
  case 0:
    GEOMBase::PublishSubObject( myVectorU.get() );
    break;
  case 1:
    GEOMBase::PublishSubObject( myVectorU.get() );
    GEOMBase::PublishSubObject( myVectorV.get() );
    break;
  default:
    break;
  }
}

Here is the call graph for this function:

Definition at line 303 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  if (!onAccept())
    return false;

  initName();
  // activate selection and connect selection manager
  ConstructorsClicked(getConstructorId());
  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 292 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  setIsApplyAndClose( true );
  if (ClickOnApply())
    ClickOnCancel();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TransformationGUI_MultiTranslationDlg::ConstructorsClicked ( int  constructorId) [private, slot]

Definition at line 232 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);

  switch (constructorId) {
  case 0: // Translate simple
    {
      GroupDimensions->hide();
      GroupPoints->show();

      GroupPoints->LineEdit1->setText("");
      GroupPoints->LineEdit2->setText("");
      myBase.nullify();
      myVectorU.nullify();

      GroupPoints->SpinBox_DX->setValue(myStepU);
      GroupPoints->SpinBox_DY->setValue(myNbTimesU);

      GroupPoints->PushButton1->click();
      break;
    }
  case 1: // Translate double
    {
      GroupPoints->hide();
      GroupDimensions->show();

      GroupDimensions->LineEdit1->setText("");
      GroupDimensions->LineEdit2->setText("");
      GroupDimensions->LineEdit3->setText("");
      myBase.nullify();
      myVectorU.nullify();
      myVectorV.nullify();

      GroupDimensions->SpinBox_DX1->setValue(myStepU);
      GroupDimensions->SpinBox_DY1->setValue(myNbTimesU);
      GroupDimensions->SpinBox_DX2->setValue(myStepV);
      GroupDimensions->SpinBox_DY2->setValue(myNbTimesV);

      GroupDimensions->PushButton1->click();
      break;
    }
  }

  qApp->processEvents();
  updateGeometry();
  resize(minimumSizeHint());

  if (myInitial) {
    myInitial = false;
    SelectionIntoArgument();
  }
  else {
    processPreview();
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 588 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  return getGeomEngine()->GetITransformOperations(getStudyId());
}
void TransformationGUI_MultiTranslationDlg::createPathPreview ( GEOM::GEOM_Object_ptr  thePath) [private]

Definition at line 716 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  if ( IsPreview() ) {
    TopoDS_Shape aShape;
    GEOMBase::GetShape( thePath, aShape, TopAbs_SHAPE );
    TopoDS_Edge anEdge = TopoDS::Edge( aShape );
    ShapeAnalysis_Edge aShapeAnal;
    TopoDS_Vertex aFirst = aShapeAnal.FirstVertex( anEdge );
    TopoDS_Vertex aLast = aShapeAnal.LastVertex( anEdge );
    TopoDS_Shape aVector = BRepBuilderAPI_MakeEdge(BRep_Tool::Pnt(aFirst), BRep_Tool::Pnt(aLast)).Shape();
    const char* aName = "tmpVector";
    Handle(GEOM_AISVector) anIO = new GEOM_AISVector( aVector, aName );

    // add Prs to preview
    SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
    SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
    if (aPrs)
      aPrs->AddObject(anIO);
    GEOMBase_Helper::displayPreview( aPrs, false, true );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 467 of file TransformationGUI_MultiTranslationDlg.cxx.

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

Here is the call graph for this function:

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

Definition at line 623 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  bool res = false;

  GEOM::GEOM_Object_var anObj;

  QStringList aParameters;

  GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());

  switch (getConstructorId()) {
  case 0:
    if ( myBase && myVectorU ) {
      createPathPreview ( myVectorU.get() );
      anObj = anOper->MultiTranslate1D(myBase.get(), myVectorU.get(), myStepU, myNbTimesU);
      if(!IsPreview()) {
        aParameters<<GroupPoints->SpinBox_DX->text();
        aParameters<<GroupPoints->SpinBox_DY->text();
      }
      res = true;
    }
    break;
  case 1:
    if ( myBase && myVectorU && myVectorV ) {
      createPathPreview ( myVectorU.get() );
      createPathPreview ( myVectorV.get() );
      anObj = anOper->MultiTranslate2D(myBase.get(),
                                       myVectorU.get(), myStepU, myNbTimesU,
                                       myVectorV.get(), myStepV, myNbTimesV);
      if(!IsPreview()) {
        aParameters<<GroupDimensions->SpinBox_DX1->text();
        aParameters<<GroupDimensions->SpinBox_DY1->text();
        aParameters<<GroupDimensions->SpinBox_DX2->text();
        aParameters<<GroupDimensions->SpinBox_DY2->text();
      }
      res = true;
    }
    break;
  }

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

  return res;
}

Here is the call graph for this function:

Definition at line 136 of file TransformationGUI_MultiTranslationDlg.cxx.

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

  int SpecificStep = 1;
  // init variables
  myStepU = myStepV = 50.0;
  myNbTimesU = myNbTimesV = 2;

  // min, max, step and decimals for spin boxes & initial values
  initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
  initSpinBox(GroupPoints->SpinBox_DY, 1, 999, SpecificStep);
  GroupPoints->SpinBox_DX->setValue(myStepU);
  GroupPoints->SpinBox_DY->setValue(myNbTimesU);

  initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, step, "length_precision" );
  initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep);
  initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, "length_precision" );
  initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep);
  GroupDimensions->SpinBox_DX1->setValue(myStepU);
  GroupDimensions->SpinBox_DY1->setValue(myNbTimesU);
  GroupDimensions->SpinBox_DX2->setValue(myStepV);
  GroupDimensions->SpinBox_DY2->setValue(myNbTimesV);

  GroupPoints->LineEdit1->setText("");
  GroupPoints->LineEdit2->setText("");

  GroupDimensions->LineEdit1->setText("");
  GroupDimensions->LineEdit2->setText("");
  GroupDimensions->LineEdit3->setText("");

  myBase.nullify();
  myVectorU.nullify();
  myVectorV.nullify();

  mainFrame()->GroupBoxPublish->show();

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

  connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));

  connect(GroupPoints->PushButton1,     SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
  connect(GroupPoints->PushButton2,     SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
  connect(GroupDimensions->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
  connect(GroupDimensions->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
  connect(GroupDimensions->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));

  connect(GroupPoints->SpinBox_DX,      SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
  connect(GroupPoints->SpinBox_DY,      SIGNAL(valueChanged(int)),    this, SLOT(ValueChangedInSpinBox(int)));
  connect(GroupDimensions->SpinBox_DX1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
  connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(int)),    this, SLOT(ValueChangedInSpinBox(int)));
  connect(GroupDimensions->SpinBox_DX2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
  connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(int)),    this, SLOT(ValueChangedInSpinBox(int)));

  connect(GroupPoints->SpinBox_DX,      SIGNAL(textChanged(const QString& )),
          this, SLOT(TextValueChangedInSpinBox(const QString& )));
  connect(GroupDimensions->SpinBox_DX1, SIGNAL(textChanged(const QString& )),
          this, SLOT(TextValueChangedInSpinBox(const QString& )));
  connect(GroupDimensions->SpinBox_DX2, SIGNAL(textChanged(const QString& )),
          this, SLOT(TextValueChangedInSpinBox(const QString& )));

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

  connect(GroupPoints->CheckButton1,     SIGNAL(toggled(bool)), this, SLOT(ReverseStepU()));
  connect(GroupDimensions->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseStepU()));
  connect(GroupDimensions->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(ReverseStepV()));

  initName(tr("GEOM_MULTITRANSLATION"));

  ConstructorsClicked(0);
}

Here is the call graph for this function:

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

Definition at line 597 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  bool ok = false;
  switch ( getConstructorId() ) {
  case 0:
    ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) &&
         GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) &&
         myBase && myVectorU;
    break;
  case 1:
    ok = GroupDimensions->SpinBox_DX1->isValid( msg, !IsPreview() ) &&
         GroupDimensions->SpinBox_DY1->isValid( msg, !IsPreview() ) &&
         GroupDimensions->SpinBox_DX2->isValid( msg, !IsPreview() ) &&
         GroupDimensions->SpinBox_DY2->isValid( msg, !IsPreview() ) &&
         myBase && myVectorU && myVectorV;
    break;
  default:
    break;
  }
  return ok;
}
void TransformationGUI_MultiTranslationDlg::restoreSubShapes ( SALOMEDS::Study_ptr  theStudy,
SALOMEDS::SObject_ptr  theSObject 
) [protected, virtual]

Definition at line 695 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
    // we pass here the first operation argument (object) through the list of arguments
    // because the rotation operation place its arguments in the data structure in another order,
    // and we need to point the first argument directly
    GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
    anArgs->length(1);
    anArgs[0] = myBase.copy();
    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
                                        /*theFindMethod=*/GEOM::FSM_MultiTransformed,
                                        /*theInheritFirstArg=*/true,
                                        mainFrame()->CheckBoxAddPrefix->isChecked());
  }
}

Here is the call graph for this function:

Definition at line 557 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  myStepU = -myStepU;

  int aConstructorId = getConstructorId();

  if (aConstructorId == 0)
    GroupPoints->SpinBox_DX->setValue(myStepU);
  else if (aConstructorId == 1)
    GroupDimensions->SpinBox_DX1->setValue(myStepU);

  processPreview();
}

Here is the caller graph for this function:

Definition at line 575 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  myStepV = -myStepV;

  GroupDimensions->SpinBox_DX2->setValue(myStepV);

  processPreview();
}

Here is the caller graph for this function:

Definition at line 318 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  erasePreview();

  TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
                             myEditCurrentArgument == GroupDimensions->LineEdit2 ||
                             myEditCurrentArgument == GroupDimensions->LineEdit3 ) ?
    TopAbs_EDGE : TopAbs_SHAPE;
  GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
  TopoDS_Shape aShape;
  if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
    QString aName = GEOMBase::GetName( aSelectedObject.get() );
    myEditCurrentArgument->setText( aName );
    if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
      myBase = aSelectedObject;
      if ( !myVectorU )
       GroupPoints->PushButton2->click();
    }
    else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
      myVectorU = aSelectedObject;
      if ( !myBase )
       GroupPoints->PushButton1->click();
    }
    else if ( myEditCurrentArgument == GroupDimensions->LineEdit1 ) {
      myBase = aSelectedObject;
      if ( !myVectorU )
       GroupDimensions->PushButton2->click();
      else if ( !myVectorV )
       GroupDimensions->PushButton3->click();
    }
    else if ( myEditCurrentArgument == GroupDimensions->LineEdit2 ) {
      myVectorU = aSelectedObject;
      if ( !myVectorV )
       GroupDimensions->PushButton3->click();
      else if ( !myBase )
       GroupDimensions->PushButton1->click();
    }
    else if ( myEditCurrentArgument == GroupDimensions->LineEdit3 ) {
      myVectorV = aSelectedObject;
      if ( !myBase )
       GroupDimensions->PushButton1->click();
      else if ( !myVectorU )
       GroupDimensions->PushButton2->click();
    }

    // clear selection
    disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
    myGeomGUI->getApp()->selectionMgr()->clearSelected();
    connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
  }
  else {
    if ( myEditCurrentArgument == GroupPoints->LineEdit1 ||
        myEditCurrentArgument == GroupDimensions->LineEdit1 )
      myBase.nullify();
    else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
             myEditCurrentArgument == GroupDimensions->LineEdit2 )
      myVectorU.nullify();
    else if ( myEditCurrentArgument == GroupDimensions->LineEdit3 )
      myVectorV.nullify();
    myEditCurrentArgument->setText("");
  }

  processPreview();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 216 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  GroupPoints->SpinBox_DX->setSingleStep(step);
  GroupDimensions->SpinBox_DX1->setSingleStep(step);
  GroupDimensions->SpinBox_DX2->setSingleStep(step);

  // san : Commented so as not to override specific step settings
  //GroupPoints->SpinBox_DY->setSingleStep((int)step);
  //GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
  //GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
}

Here is the caller graph for this function:

Definition at line 388 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  QPushButton* send = (QPushButton*)sender();

  disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
  globalSelection(GEOM_ALLSHAPES);

  if (send == GroupPoints->PushButton1) {
    myEditCurrentArgument = GroupPoints->LineEdit1;

    GroupPoints->PushButton2->setDown(false);
    GroupPoints->LineEdit2->setEnabled(false);
  }
  else if (send == GroupPoints->PushButton2) {
    myEditCurrentArgument = GroupPoints->LineEdit2;

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

    GroupPoints->PushButton1->setDown(false);
    GroupPoints->LineEdit1->setEnabled(false);
  }
  else if (send == GroupDimensions->PushButton1) {
    myEditCurrentArgument = GroupDimensions->LineEdit1;

    GroupDimensions->PushButton2->setDown(false);
    GroupDimensions->PushButton3->setDown(false);
    GroupDimensions->LineEdit2->setEnabled(false);
    GroupDimensions->LineEdit3->setEnabled(false);
  }
  else if (send == GroupDimensions->PushButton2) {
    myEditCurrentArgument = GroupDimensions->LineEdit2;

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

    GroupDimensions->PushButton1->setDown(false);
    GroupDimensions->PushButton3->setDown(false);
    GroupDimensions->LineEdit1->setEnabled(false);
    GroupDimensions->LineEdit3->setEnabled(false);
  }
  else if (send == GroupDimensions->PushButton3) {
    myEditCurrentArgument = GroupDimensions->LineEdit3;

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

    GroupDimensions->PushButton1->setDown(false);
    GroupDimensions->PushButton2->setDown(false);
    GroupDimensions->LineEdit1->setEnabled(false);
    GroupDimensions->LineEdit2->setEnabled(false);
  }
  connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
          this, SLOT(SelectionIntoArgument()));

  // enable line edit
  myEditCurrentArgument->setEnabled(true);
  myEditCurrentArgument->setFocus();
  // after setFocus(), because it will be setDown(false) when loses focus
  send->setDown(true);

  // seems we need it only to avoid preview disappearing, caused by selection mode change
  processPreview();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TransformationGUI_MultiTranslationDlg::TextValueChangedInSpinBox ( const QString &  s) [private, slot]

Definition at line 477 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  QObject* send = (QObject*)sender();
  bool isDigit = true;

  switch (getConstructorId()) {
  case 0:
    GroupPoints->SpinBox_DX->text().toDouble(&isDigit);
    if(!isDigit){
      GroupPoints->CheckButton1->setChecked(false);
    }
    GroupPoints->CheckButton1->setEnabled(isDigit);
    break;
  case 1:
    if (send == GroupDimensions->SpinBox_DX1) {
      GroupDimensions->SpinBox_DX1->text().toDouble(&isDigit);
      if(!isDigit)
        GroupDimensions->CheckButton1->setChecked(false);
      GroupDimensions->CheckButton1->setEnabled(isDigit);
    }
    else if(send == GroupDimensions->SpinBox_DX2){
      GroupDimensions->SpinBox_DX2->text().toDouble(&isDigit);
      if(!isDigit)
        GroupDimensions->CheckButton2->setChecked(false);
      GroupDimensions->CheckButton2->setEnabled(isDigit);
    }
    break;
  }
}

Here is the caller graph for this function:

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

Definition at line 511 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  QObject* send = (QObject*)sender();
  switch (getConstructorId()) {
  case 0:
    if (send == GroupPoints->SpinBox_DX)
      myStepU = newValue;
    break;
  case 1:
    if (send == GroupDimensions->SpinBox_DX1)
      myStepU = newValue;
    else if (send == GroupDimensions->SpinBox_DX2)
      myStepV = newValue;
    break;
  }

  processPreview();
}

Here is the caller graph for this function:

void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox ( int  newValue) [private, slot]

Definition at line 534 of file TransformationGUI_MultiTranslationDlg.cxx.

{
  QObject* send = (QObject*)sender();
  switch (getConstructorId()) {
  case 0:
    if (send == GroupPoints->SpinBox_DY)
      myNbTimesU = newValue;
    break;
  case 1:
    if (send == GroupDimensions->SpinBox_DY1)
      myNbTimesU = newValue;
    else if (send == GroupDimensions->SpinBox_DY2)
      myNbTimesV = newValue;
    break;
  }

  processPreview();
}

Member Data Documentation

DlgRef_3Sel4Spin2Check* TransformationGUI_MultiTranslationDlg::GroupDimensions [private]

Definition at line 73 of file TransformationGUI_MultiTranslationDlg.h.

DlgRef_2Sel2Spin1Check* TransformationGUI_MultiTranslationDlg::GroupPoints [private]

Definition at line 72 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 63 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 70 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 64 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 65 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 66 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 67 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 63 of file TransformationGUI_MultiTranslationDlg.h.

Definition at line 63 of file TransformationGUI_MultiTranslationDlg.h.


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