Version: 6.3.1
Public Member Functions | Private Slots | Private Member Functions | Private Attributes

SMESHGUI_MoveNodesDlg Class Reference

#include <SMESHGUI_MoveNodesDlg.h>

Inheritance diagram for SMESHGUI_MoveNodesDlg:
Inheritance graph
[legend]

Public Member Functions

 SMESHGUI_MoveNodesDlg (SMESHGUI *)
virtual ~SMESHGUI_MoveNodesDlg ()
void Init ()

Private Slots

void onOk ()
bool onApply ()
void onClose ()
void onHelp ()
void onDeactivate ()
void onSelectionDone ()
void redisplayPreview ()
void onTextChange (const QString &)

Private Member Functions

void closeEvent (QCloseEvent *)
void enterEvent (QEvent *)
void hideEvent (QHideEvent *)
void keyPressEvent (QKeyEvent *)
void erasePreview ()
QWidgetcreateButtonFrame (QWidget *)
QWidgetcreateMainFrame (QWidget *)
bool isValid (const bool)
void reset ()
void updateButtons ()

Private Attributes

QPushButton * myOkBtn
QPushButton * myApplyBtn
QPushButton * myCloseBtn
QPushButton * myHelpBtn
QLineEdit * myId
SMESHGUI_SpinBoxmyX
SMESHGUI_SpinBoxmyY
SMESHGUI_SpinBoxmyZ
LightApp_SelectionMgr * mySelectionMgr
SVTK_Selector * mySelector
SMESHGUImySMESHGUI
SALOME_ActormyPreviewActor
SMESH_ActormyMeshActor
bool myBusy
QString myHelpFileName

Detailed Description

Definition at line 50 of file SMESHGUI_MoveNodesDlg.h.


Constructor & Destructor Documentation

SMESHGUI_MoveNodesDlg::SMESHGUI_MoveNodesDlg ( SMESHGUI theModule)

Definition at line 88 of file SMESHGUI_MoveNodesDlg.cxx.

References createButtonFrame(), createMainFrame(), SMESH.GetSelector(), SMESH.GetViewWindow(), Init(), MARGIN, myBusy, myHelpFileName, myPreviewActor, mySelector, mySMESHGUI, and SPACING.

                                                               :
  QDialog(SMESH::GetDesktop(theModule)),
  mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
  mySMESHGUI(theModule)
{
  myPreviewActor = 0;
  myBusy = false;

  setModal(false);
  setWindowTitle(tr("CAPTION"));

  QVBoxLayout* aDlgLay = new QVBoxLayout(this);
  aDlgLay->setSpacing(SPACING);
  aDlgLay->setMargin(MARGIN);

  QWidget* aMainFrame = createMainFrame  (this);
  QWidget* aBtnFrame  = createButtonFrame(this);

  aDlgLay->addWidget(aMainFrame);
  aDlgLay->addWidget(aBtnFrame);

  mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();

  myHelpFileName = "moving_nodes_page.html";

  Init();
}
SMESHGUI_MoveNodesDlg::~SMESHGUI_MoveNodesDlg ( ) [virtual]

Definition at line 240 of file SMESHGUI_MoveNodesDlg.cxx.

References erasePreview().

{
  erasePreview();
}

Member Function Documentation

void SMESHGUI_MoveNodesDlg::closeEvent ( QCloseEvent *  ) [private]

Definition at line 524 of file SMESHGUI_MoveNodesDlg.cxx.

References SMESH.GetViewWindow(), mySMESHGUI, and onClose().

{
  onClose();
  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
    aViewWindow->Repaint();
}
QWidget * SMESHGUI_MoveNodesDlg::createButtonFrame ( QWidget theParent) [private]

Definition at line 120 of file SMESHGUI_MoveNodesDlg.cxx.

References MARGIN, myApplyBtn, myCloseBtn, myHelpBtn, myOkBtn, onApply(), onClose(), onHelp(), onOk(), and SPACING.

Referenced by SMESHGUI_MoveNodesDlg().

{
  QFrame* aFrame = new QFrame(theParent);
  aFrame->setFrameStyle(QFrame::Box | QFrame::Sunken);

  myOkBtn     = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aFrame);
  myApplyBtn  = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
  myCloseBtn  = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
  myHelpBtn   = new QPushButton(tr("SMESH_BUT_HELP"),  aFrame);

  QHBoxLayout* aLay = new QHBoxLayout(aFrame);
  aLay->setSpacing(SPACING);
  aLay->setMargin(MARGIN);

  aLay->addWidget(myOkBtn);
  aLay->addSpacing(10);
  aLay->addWidget(myApplyBtn);
  aLay->addSpacing(10);
  aLay->addStretch();
  aLay->addWidget(myCloseBtn);
  aLay->addWidget(myHelpBtn);

  connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
  connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
  connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
  connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));

  return aFrame;
}
QWidget * SMESHGUI_MoveNodesDlg::createMainFrame ( QWidget theParent) [private]

Definition at line 154 of file SMESHGUI_MoveNodesDlg.cxx.

References COORD_MAX, COORD_MIN, SMESH.GetResourceMgr(), MARGIN, myId, mySMESHGUI, myX, myY, myZ, onTextChange(), SMESHGUI_SpinBox.RangeStepAndValidator(), redisplayPreview(), and SPACING.

Referenced by SMESHGUI_MoveNodesDlg().

{
  QWidget* aFrame = new QWidget(theParent);

  QPixmap iconMoveNode (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
  QPixmap iconSelect   (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));

  //------------------------------------------------------------
  QGroupBox* aPixGrp = new QGroupBox(tr("MESH_NODE"), aFrame);
  QButtonGroup* aBtnGrp = new QButtonGroup(this);
  QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
  aPixGrpLayout->setSpacing(SPACING);
  aPixGrpLayout->setMargin(MARGIN);

  QRadioButton* aRBut = new QRadioButton(aPixGrp);
  aRBut->setIcon(iconMoveNode);
  aRBut->setChecked(true);

  aPixGrpLayout->addWidget(aRBut);
  aBtnGrp->addButton(aRBut, 0);

  //------------------------------------------------------------
  QGroupBox* anIdGrp = new QGroupBox(tr("SMESH_MOVE"), aFrame);
  QHBoxLayout* anIdGrpLayout = new QHBoxLayout(anIdGrp);
  anIdGrpLayout->setSpacing(SPACING);
  anIdGrpLayout->setMargin(MARGIN);

  QLabel* idLabl = new QLabel(tr("NODE_ID"), anIdGrp);
  QPushButton* idBtn = new QPushButton(anIdGrp);
  idBtn->setIcon(iconSelect);
  myId = new QLineEdit(anIdGrp);
  myId->setValidator(new SMESHGUI_IdValidator(this, 1));

  anIdGrpLayout->addWidget(idLabl);
  anIdGrpLayout->addWidget(idBtn);
  anIdGrpLayout->addWidget(myId);

  //------------------------------------------------------------
  QGroupBox* aCoordGrp = new QGroupBox(tr("SMESH_COORDINATES"), aFrame);
  QHBoxLayout* aCoordGrpLayout = new QHBoxLayout(aCoordGrp);
  aCoordGrpLayout->setSpacing(SPACING);
  aCoordGrpLayout->setMargin(MARGIN);

  QLabel* aXLabel = new QLabel(tr("SMESH_X"), aCoordGrp);
  myX = new SMESHGUI_SpinBox(aCoordGrp);

  QLabel* aYLabel = new QLabel(tr("SMESH_Y"), aCoordGrp);
  myY = new SMESHGUI_SpinBox(aCoordGrp);

  QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
  myZ = new SMESHGUI_SpinBox(aCoordGrp);

  aCoordGrpLayout->addWidget(aXLabel);
  aCoordGrpLayout->addWidget(myX);
  aCoordGrpLayout->addWidget(aYLabel);
  aCoordGrpLayout->addWidget(myY);
  aCoordGrpLayout->addWidget(aZLabel);
  aCoordGrpLayout->addWidget(myZ);

  //------------------------------------------------------------
  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");

  //------------------------------------------------------------
  QVBoxLayout* aLay = new QVBoxLayout(aFrame);
  aLay->setMargin(0);
  aLay->setMargin(SPACING);
  aLay->addWidget(aPixGrp);
  aLay->addWidget(anIdGrp);
  aLay->addWidget(aCoordGrp);

  //------------------------------------------------------------
  // connect signale and slots
  connect(myX, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
  connect(myY, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
  connect(myZ, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
  connect(myId, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));

  return aFrame;
}
void SMESHGUI_MoveNodesDlg::enterEvent ( QEvent *  ) [private]

Definition at line 504 of file SMESHGUI_MoveNodesDlg.cxx.

References SMESHGUI.EmitSignalDeactivateDialog(), SMESH.GetViewWindow(), mySMESHGUI, redisplayPreview(), and SMESH.SetPointRepresentation().

{
  if (!isEnabled()) {
    mySMESHGUI->EmitSignalDeactivateDialog();

    // set selection mode
    SMESH::SetPointRepresentation(true);
    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
      aViewWindow->SetSelectionMode(NodeSelection);

    redisplayPreview();

    setEnabled(true);
  }
}
void SMESHGUI_MoveNodesDlg::erasePreview ( ) [private]

Definition at line 556 of file SMESHGUI_MoveNodesDlg.cxx.

References SMESH.GetViewWindow(), myPreviewActor, and mySMESHGUI.

Referenced by onClose(), onDeactivate(), onSelectionDone(), onTextChange(), redisplayPreview(), and ~SMESHGUI_MoveNodesDlg().

{
  if (myPreviewActor == 0)
    return;

  SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
  if (aViewWindow)
    aViewWindow->RemoveActor(myPreviewActor);
  myPreviewActor->Delete();
  myPreviewActor = 0;
  if (aViewWindow)
    aViewWindow->Repaint();
}
void SMESHGUI_MoveNodesDlg::hideEvent ( QHideEvent *  ) [private]

Definition at line 535 of file SMESHGUI_MoveNodesDlg.cxx.

References onClose().

{
  if (!isMinimized())
    onClose();
}
void SMESHGUI_MoveNodesDlg::Init ( )

Definition at line 249 of file SMESHGUI_MoveNodesDlg.cxx.

References SMESH.GetViewWindow(), myBusy, myMeshActor, myPreviewActor, mySelectionMgr, mySMESHGUI, onClose(), onDeactivate(), onSelectionDone(), reset(), SMESHGUI.SetActiveDialogBox(), and SMESH.SetPointRepresentation().

Referenced by SMESHGUI_MoveNodesDlg().

{
  myPreviewActor = 0;
  myMeshActor = 0;
  myBusy = false;

  mySMESHGUI->SetActiveDialogBox((QDialog*)this);

  // selection and SMESHGUI
  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
  connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
  connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));

  reset();
  setEnabled(true);

  // set selection mode
  SMESH::SetPointRepresentation(true);
  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
    aViewWindow->SetSelectionMode(NodeSelection);

  onSelectionDone();
}
bool SMESHGUI_MoveNodesDlg::isValid ( const bool  theMess) [private]

Definition at line 277 of file SMESHGUI_MoveNodesDlg.cxx.

References myId, myX, myY, and myZ.

Referenced by onApply(), redisplayPreview(), and updateButtons().

{
  if (myId->text().isEmpty()) {
    if (theMess)
      SUIT_MessageBox::information(this, tr("SMESH_WARNING"),
                                   tr("NODE_ID_IS_NOT_DEFINED"));
    return false;
  }

  QString msg;
  bool ok = true;
  ok = myX->isValid( msg, theMess ) && ok;
  ok = myY->isValid( msg, theMess ) && ok;
  ok = myZ->isValid( msg, theMess ) && ok;
  if( !ok ) {
    if( theMess ) {
      QString str( tr( "SMESH_INCORRECT_INPUT" ) );
      if ( !msg.isEmpty() )
        str += "\n" + msg;
      SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
    }
    return false;
  }

  return true;
}
void SMESHGUI_MoveNodesDlg::keyPressEvent ( QKeyEvent *  e) [private]

Definition at line 652 of file SMESHGUI_MoveNodesDlg.cxx.

References onHelp().

{
  QDialog::keyPressEvent( e );
  if ( e->isAccepted() )
    return;

  if ( e->key() == Qt::Key_F1 ) {
    e->accept();
    onHelp();
  }
}
bool SMESHGUI_MoveNodesDlg::onApply ( ) [private, slot]

Definition at line 322 of file SMESHGUI_MoveNodesDlg.cxx.

References SMESH.GetMeshByIO(), SMESHGUI_SpinBox.GetValue(), SMESHGUI.isActiveStudyLocked(), isValid(), SMESHGUI.Modified(), myId, myMeshActor, mySelectionMgr, mySMESHGUI, myX, myY, myZ, reset(), and SMESH.UpdateView().

Referenced by createButtonFrame(), and onOk().

{
  if (mySMESHGUI->isActiveStudyLocked())
    return false;

  if (!isValid(true))
    return false;

  SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
  if (aMesh->_is_nil()) {
    SUIT_MessageBox::information(this, tr("SMESH_ERROR"),
                                 tr("SMESHG_NO_MESH"));
    return false;
  }

  SMESH::SMESH_MeshEditor_var aMeshEditor = aMesh->GetMeshEditor();
  if (aMeshEditor->_is_nil())
    return false;

  int anId = myId->text().toInt();
  bool aResult = false;
  try {
    aResult = aMeshEditor->MoveNode(anId, myX->GetValue(), myY->GetValue(), myZ->GetValue());

    QStringList aParameters;
    aParameters << myX->text();
    aParameters << myY->text();
    aParameters << myZ->text();
    aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
  } catch (...) {
  }

  if (aResult) {
    SALOME_ListIO aList;
    aList.Append(myMeshActor->getIO());
    mySelectionMgr->setSelectedObjects(aList,false);
    SMESH::UpdateView();
    SMESHGUI::Modified();
    reset();
  }

  return aResult;
}
void SMESHGUI_MoveNodesDlg::onClose ( ) [private, slot]

Definition at line 380 of file SMESHGUI_MoveNodesDlg.cxx.

References erasePreview(), SMESH.GetViewWindow(), mySelectionMgr, mySMESHGUI, SMESHGUI.ResetState(), and SMESH.SetPointRepresentation().

Referenced by closeEvent(), createButtonFrame(), hideEvent(), Init(), and onOk().

{
  //mySelectionMgr->clearSelected();
  SMESH::SetPointRepresentation(false);
  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
    aViewWindow->SetSelectionMode(ActorSelection);
  disconnect(mySelectionMgr, 0, this, 0);
  disconnect(mySMESHGUI, 0, this, 0);
  erasePreview();
  mySMESHGUI->ResetState();
  reject();
}
void SMESHGUI_MoveNodesDlg::onDeactivate ( ) [private, slot]

Definition at line 494 of file SMESHGUI_MoveNodesDlg.cxx.

References erasePreview().

Referenced by Init().

{
  setEnabled(false);
  erasePreview();
}
void SMESHGUI_MoveNodesDlg::onHelp ( ) [private, slot]

Definition at line 397 of file SMESHGUI_MoveNodesDlg.cxx.

References myHelpFileName, and mySMESHGUI.

Referenced by createButtonFrame(), and keyPressEvent().

{
  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
  if (app) 
    app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
  else {
                QString platform;
#ifdef WIN32
                platform = "winapplication";
#else
                platform = "application";
#endif
    SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
                                                                 platform)).
                             arg(myHelpFileName));
  }
}
void SMESHGUI_MoveNodesDlg::onOk ( ) [private, slot]

Definition at line 370 of file SMESHGUI_MoveNodesDlg.cxx.

References onApply(), and onClose().

Referenced by createButtonFrame().

{
  if (onApply())
    onClose();
}
void SMESHGUI_MoveNodesDlg::onSelectionDone ( ) [private, slot]

Definition at line 456 of file SMESHGUI_MoveNodesDlg.cxx.

References erasePreview(), SMESH.FindActorByEntry(), SMESH.GetNameOfSelectedNodes(), SMESH_Actor.GetObject(), Handle(), myBusy, myId, myMeshActor, mySelectionMgr, mySelector, myX, myY, myZ, reset(), SMESHGUI_SpinBox.SetValue(), and updateButtons().

Referenced by Init(), and onTextChange().

{
  if (myBusy) return;
  myMeshActor = 0;

  SALOME_ListIO aList;
  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());

  if (aList.Extent() == 1) {
    Handle(SALOME_InteractiveObject) anIO = aList.First();
    myMeshActor = SMESH::FindActorByEntry(anIO->getEntry());
    if(myMeshActor){
      QString aText;
      if (SMESH::GetNameOfSelectedNodes(mySelector,anIO,aText) == 1) {
        if(SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh()) {
          if(const SMDS_MeshNode* aNode = aMesh->FindNode(aText.toInt())) {
            myBusy = true;
            myId->setText(aText);
            myX->SetValue(aNode->X());
            myY->SetValue(aNode->Y());
            myZ->SetValue(aNode->Z());
            myBusy = false;
            erasePreview(); // avoid overlapping of a selection and a preview
            updateButtons();
            return;
          }
        }
      }
    }
  }

  reset();
}
void SMESHGUI_MoveNodesDlg::onTextChange ( const QString &  theNewText) [private, slot]

Definition at line 421 of file SMESHGUI_MoveNodesDlg.cxx.

References erasePreview(), SMESH_Actor.GetObject(), SMESH.GetViewWindow(), Handle(), myApplyBtn, myBusy, myMeshActor, myOkBtn, mySelectionMgr, mySelector, mySMESHGUI, and onSelectionDone().

Referenced by createMainFrame().

{
  if (myBusy) return;

  myOkBtn->setEnabled(false);
  myApplyBtn->setEnabled(false);
  erasePreview();

  // select entered node
  if(myMeshActor){
    if(SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh()){
      myBusy = true;
      Handle(SALOME_InteractiveObject) anIO = myMeshActor->getIO();
      SALOME_ListIO aList;
      aList.Append(anIO);
      mySelectionMgr->setSelectedObjects(aList,false);
      myBusy = false;

      if(const SMDS_MeshElement *anElem = aMesh->FindElement(theNewText.toInt())) {
        TColStd_MapOfInteger aListInd;
        aListInd.Add(anElem->GetID());
        mySelector->AddOrRemoveIndex(anIO,aListInd, false);
        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
          aViewWindow->highlight(anIO,true,true);
        
        onSelectionDone();
      }
    }
  }
}
void SMESHGUI_MoveNodesDlg::redisplayPreview ( ) [private, slot]

Definition at line 574 of file SMESHGUI_MoveNodesDlg.cxx.

References erasePreview(), SMESHGUI_SpinBox.GetValue(), SMESH.GetViewWindow(), isValid(), myBusy, myPreviewActor, mySMESHGUI, myX, myY, and myZ.

Referenced by createMainFrame(), enterEvent(), and reset().

{
  if (myBusy)
    return;

  if (myPreviewActor != 0)
    erasePreview();

  if (!isValid(false))
    return;

  vtkUnstructuredGrid* aGrid = vtkUnstructuredGrid::New();

  vtkPoints* aPoints = vtkPoints::New();
  aPoints->SetNumberOfPoints(1);
  aPoints->SetPoint(0, myX->GetValue(), myY->GetValue(), myZ->GetValue());

  // Create cells

  vtkIdList *anIdList = vtkIdList::New();
  anIdList->SetNumberOfIds(1);

  vtkCellArray *aCells = vtkCellArray::New();
  aCells->Allocate(2, 0);

  vtkUnsignedCharArray* aCellTypesArray = vtkUnsignedCharArray::New();
  aCellTypesArray->SetNumberOfComponents(1);
  aCellTypesArray->Allocate(1);

  anIdList->SetId(0, 0);
  aCells->InsertNextCell(anIdList);
  aCellTypesArray->InsertNextValue(VTK_VERTEX);
  anIdList->Delete();

  VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
  aCellLocationsArray->SetNumberOfComponents(1);
  aCellLocationsArray->SetNumberOfTuples(1);

  aCells->InitTraversal();
  vtkIdType npts;
  aCellLocationsArray->SetValue(0, aCells->GetTraversalLocation(npts));

  aGrid->SetPoints(aPoints);
  aPoints->Delete();

  aGrid->SetCells(aCellTypesArray,aCellLocationsArray,aCells);
  aCellLocationsArray->Delete();
  aCellTypesArray->Delete();
  aCells->Delete();

  // Create and display actor
  vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
  aMapper->SetInput(aGrid);
  aGrid->Delete();

  myPreviewActor = SALOME_Actor::New();
  myPreviewActor->PickableOff();
  myPreviewActor->SetMapper(aMapper);
  aMapper->Delete();

  vtkProperty* aProp = vtkProperty::New();
  aProp->SetRepresentationToWireframe();
  aProp->SetColor(250, 0, 250);
  aProp->SetPointSize(5);
  myPreviewActor->SetProperty(aProp);
  aProp->Delete();

  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
    {
      aViewWindow->AddActor(myPreviewActor);
      aViewWindow->Repaint();
    }
}
void SMESHGUI_MoveNodesDlg::reset ( ) [private]
void SMESHGUI_MoveNodesDlg::updateButtons ( ) [private]

Definition at line 545 of file SMESHGUI_MoveNodesDlg.cxx.

References isValid(), myApplyBtn, and myOkBtn.

Referenced by onSelectionDone(), and reset().

{
  bool isEnabled = isValid(false);
  myOkBtn->setEnabled(isEnabled);
  myApplyBtn->setEnabled(isEnabled);
}

Field Documentation

QPushButton* SMESHGUI_MoveNodesDlg.myApplyBtn [private]

Definition at line 86 of file SMESHGUI_MoveNodesDlg.h.

Referenced by createButtonFrame(), onTextChange(), and updateButtons().

QPushButton* SMESHGUI_MoveNodesDlg.myCloseBtn [private]

Definition at line 87 of file SMESHGUI_MoveNodesDlg.h.

Referenced by createButtonFrame().

QPushButton* SMESHGUI_MoveNodesDlg.myHelpBtn [private]

Definition at line 88 of file SMESHGUI_MoveNodesDlg.h.

Referenced by createButtonFrame().

Definition at line 103 of file SMESHGUI_MoveNodesDlg.h.

Referenced by onHelp(), and SMESHGUI_MoveNodesDlg().

QLineEdit* SMESHGUI_MoveNodesDlg.myId [private]

Definition at line 90 of file SMESHGUI_MoveNodesDlg.h.

Referenced by createMainFrame(), isValid(), onApply(), onSelectionDone(), and reset().

Definition at line 100 of file SMESHGUI_MoveNodesDlg.h.

Referenced by Init(), onApply(), onSelectionDone(), and onTextChange().

QPushButton* SMESHGUI_MoveNodesDlg.myOkBtn [private]

Definition at line 85 of file SMESHGUI_MoveNodesDlg.h.

Referenced by createButtonFrame(), onTextChange(), and updateButtons().

LightApp_SelectionMgr* SMESHGUI_MoveNodesDlg.mySelectionMgr [private]

Definition at line 95 of file SMESHGUI_MoveNodesDlg.h.

Referenced by Init(), onApply(), onClose(), onSelectionDone(), and onTextChange().

SVTK_Selector* SMESHGUI_MoveNodesDlg.mySelector [private]

Definition at line 96 of file SMESHGUI_MoveNodesDlg.h.

Referenced by onSelectionDone(), onTextChange(), and SMESHGUI_MoveNodesDlg().

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS