Back to index

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

#include <RepairGUI_RemoveExtraEdgesDlg.h>

List of all members.

Public Member Functions

 RepairGUI_RemoveExtraEdgesDlg (GeometryGUI *, QWidget *=0, bool=false)
 ~RepairGUI_RemoveExtraEdgesDlg ()

Protected Member Functions

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

Private Slots

void ClickOnOk ()
bool ClickOnApply ()
void ActivateThisDialog ()
void LineEditReturnPressed ()
void SelectionIntoArgument ()
void SetEditCurrentArgument ()

Private Member Functions

void Init ()
void enterEvent (QEvent *)
void activateSelection ()

Private Attributes

GEOM::GEOM_Object_var myObject
bool myOkObject
DlgRef_1Sel1Check * GroupPoints

Detailed Description

Definition at line 35 of file RepairGUI_RemoveExtraEdgesDlg.h.


Constructor & Destructor Documentation

RepairGUI_RemoveExtraEdgesDlg::RepairGUI_RemoveExtraEdgesDlg ( GeometryGUI *  theGeometryGUI,
QWidget *  parent = 0,
bool  modal = false 
)

Definition at line 46 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

  : GEOMBase_Skeleton( theGeometryGUI, parent, modal )
{
  SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
  QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_REMOVE_EXTRA_EDGES" ) ) );
  QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
    
  setWindowTitle( tr( "GEOM_REMOVE_EXTRA_EDGES_TITLE" ) );

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

  GroupPoints = new DlgRef_1Sel1Check( centralWidget() );

  GroupPoints->GroupBox1->setTitle( tr( "GEOM_REMOVE_EXTRA_EDGES" ) );
  GroupPoints->TextLabel1->setText( tr( "GEOM_SELECTED_SHAPE" ) );
  GroupPoints->PushButton1->setIcon( image1 );
  GroupPoints->LineEdit1->setReadOnly( true );

  GroupPoints->CheckButton1->setText( tr( "GEOM_RMEE_UNION_FACES" ) );

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

  /***************************************************************/
  
  setHelpFileName( "remove_extra_edges_operation_page.html" );

  Init();
}

Here is the call graph for this function:

Definition at line 89 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
}

Member Function Documentation

Definition at line 255 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  TColStd_MapOfInteger aTypes;
  aTypes.Add( GEOM_SHELL );
  aTypes.Add( GEOM_SOLID );
  aTypes.Add( GEOM_COMPOUND );
  globalSelection( aTypes );
}

Here is the caller graph for this function:

Definition at line 230 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

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

  activateSelection();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 144 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  if ( !onAccept() )
    return false;

  initName();

  myEditCurrentArgument->setText( "" );
  myObject = GEOM::GEOM_Object::_nil();
  
  myOkObject = false;

  activateSelection();

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 133 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 268 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  return getGeomEngine()->GetIBlocksOperations( getStudyId() );
}
void RepairGUI_RemoveExtraEdgesDlg::enterEvent ( QEvent *  e) [private]

Definition at line 244 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

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

Here is the call graph for this function:

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

Definition at line 286 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  GEOM::GEOM_Object_var anObj;

  int nbFacesOptimum = -1; // -1 means do not union faces
  if (GroupPoints->CheckButton1->isChecked())
    nbFacesOptimum = 0; // 0 means union all faces, that possible
  GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
  anObj = anOper->RemoveExtraEdges(myObject, nbFacesOptimum);

  if (!anObj->_is_nil())
    objects.push_back(anObj._retn());

  return true;
}

Definition at line 98 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  /* init variables */
  myEditCurrentArgument = GroupPoints->LineEdit1;
  
  myOkObject = false;

  GroupPoints->CheckButton1->setChecked( false );

  activateSelection();
  
  mainFrame()->GroupBoxPublish->show();
  //Hide preview checkbox
  mainFrame()->CheckBoxPreview->hide();

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

  connect( GroupPoints->PushButton1, SIGNAL( clicked() ),       this, SLOT( SetEditCurrentArgument() ) );
  connect( GroupPoints->LineEdit1,   SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );

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

  initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) );
  resize(100,100);
  SelectionIntoArgument();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 277 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  return myOkObject;
}

Definition at line 217 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  if ( sender() == GroupPoints->LineEdit1 ) {
    myEditCurrentArgument = GroupPoints->LineEdit1;
    GEOMBase_Skeleton::LineEditReturnPressed();
  }
}

Here is the caller graph for this function:

void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes ( SALOMEDS::Study_ptr  theStudy,
SALOMEDS::SObject_ptr  theSObject 
) [protected, virtual]

Definition at line 306 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
    // empty list of arguments means that all arguments should be restored
    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked() );
  }
}

Definition at line 167 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  myEditCurrentArgument->setText( "" );
  QString aName;
  
  LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
  SALOME_ListIO aSelList;
  aSelMgr->selectedObjects(aSelList);

  if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
    if ( aSelList.Extent() != 1 ) {
      if ( myEditCurrentArgument == GroupPoints->LineEdit1 )
        myOkObject = false;
      return;
    }
  }
  
  // nbSel == 1
  GEOM::GEOM_Object_ptr aSelectedObject =
    GEOMBase::ConvertIOinGEOMObject( aSelList.First() );

  if ( CORBA::is_nil( aSelectedObject ) )
    return;
  
  if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
    myObject = aSelectedObject;
    myOkObject = true;
  }

  myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
}

Here is the caller graph for this function:

Definition at line 203 of file RepairGUI_RemoveExtraEdgesDlg.cxx.

{
  if( sender() == GroupPoints->PushButton1 ) {
    GroupPoints->LineEdit1->setFocus();
    myEditCurrentArgument = GroupPoints->LineEdit1;
  }
  SelectionIntoArgument();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

DlgRef_1Sel1Check* RepairGUI_RemoveExtraEdgesDlg::GroupPoints [private]

Definition at line 59 of file RepairGUI_RemoveExtraEdgesDlg.h.

GEOM::GEOM_Object_var RepairGUI_RemoveExtraEdgesDlg::myObject [private]

Definition at line 56 of file RepairGUI_RemoveExtraEdgesDlg.h.

Definition at line 57 of file RepairGUI_RemoveExtraEdgesDlg.h.


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