Back to index

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

#include <RepairGUI_ChangeOrientationDlg.h>

List of all members.

Public Member Functions

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

Protected Member Functions

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

Private Slots

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

Private Member Functions

void Init ()
void enterEvent (QEvent *)

Private Attributes

GEOM::GEOM_Object_var myObject
bool myOkObject
DlgRef_1Sel1Check * GroupPoints

Detailed Description

Definition at line 38 of file RepairGUI_ChangeOrientationDlg.h.


Constructor & Destructor Documentation

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

Definition at line 49 of file RepairGUI_ChangeOrientationDlg.cxx.

  : GEOMBase_Skeleton( theGeometryGUI, parent, modal )
{
  //QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SUPRESS_FACE")));
  QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CHANGE_ORIENTATION" ) ));
  QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
    
  setWindowTitle( tr( "GEOM_CHANGE_ORIENTATION_TITLE" ) );

  /***************************************************************/
  mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CHANGE_ORIENTATION_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_CHANGE_ORIENTATION" ) );
  GroupPoints->TextLabel1->setText( tr( "GEOM_SELECTED_SHAPE" ) );
  GroupPoints->CheckButton1->setText( tr( "GEOM_CREATE_COPY" ) );
  GroupPoints->PushButton1->setIcon( image1 );
//  GroupPoints->LineEdit1->setReadOnly( true );
  
  QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
  layout->setMargin( 0 ); layout->setSpacing( 6 );
  layout->addWidget( GroupPoints );

  setHelpFileName( "change_orientation_operation_page.html" );

  Init();
}

Here is the call graph for this function:

Definition at line 89 of file RepairGUI_ChangeOrientationDlg.cxx.

{
}

Member Function Documentation

Definition at line 226 of file RepairGUI_ChangeOrientationDlg.cxx.

{
  GEOMBase_Skeleton::ActivateThisDialog();
  connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 141 of file RepairGUI_ChangeOrientationDlg.cxx.

{
//  if ( !onAccept() )
  if ( !onAccept( GroupPoints->CheckButton1->isChecked() ) )
    return false;

  initName();

  myEditCurrentArgument->setText( "" );
  
  return true;
}

Here is the caller graph for this function:

Definition at line 129 of file RepairGUI_ChangeOrientationDlg.cxx.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void RepairGUI_ChangeOrientationDlg::CreateCopyModeChanged ( bool  isCreateCopy) [private, slot]

Definition at line 293 of file RepairGUI_ChangeOrientationDlg.cxx.

{
  mainFrame()->GroupBoxName->setEnabled( isCreateCopy );
}

Here is the caller graph for this function:

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

Definition at line 249 of file RepairGUI_ChangeOrientationDlg.cxx.

{
  return getGeomEngine()->GetIHealingOperations( getStudyId() );
}
void RepairGUI_ChangeOrientationDlg::enterEvent ( QEvent *  ) [private]

Definition at line 238 of file RepairGUI_ChangeOrientationDlg.cxx.

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

Here is the call graph for this function:

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

Definition at line 269 of file RepairGUI_ChangeOrientationDlg.cxx.

{
  bool toCreateCopy = GroupPoints->CheckButton1->isChecked();

  GEOM::GEOM_Object_var anObj;
  GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
  if ( toCreateCopy ) {
    anObj = anOper->ChangeOrientationCopy( myObject );
  }
  else {
    anObj = anOper->ChangeOrientation( myObject );
  }

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

  return true;
}

Definition at line 98 of file RepairGUI_ChangeOrientationDlg.cxx.

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

  GroupPoints->CheckButton1->setChecked( true );

  myOkObject = false;

  /* 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( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) );

  connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );

  initName( tr( "CHANGE_ORIENTATION_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_ChangeOrientationDlg::isValid ( QString &  ) [protected, virtual]

Definition at line 259 of file RepairGUI_ChangeOrientationDlg.cxx.

{
  return myOkObject;
}

Definition at line 212 of file RepairGUI_ChangeOrientationDlg.cxx.

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

Here is the caller graph for this function:

Definition at line 159 of file RepairGUI_ChangeOrientationDlg.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 196 of file RepairGUI_ChangeOrientationDlg.cxx.

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

  if ( send == 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_ChangeOrientationDlg::GroupPoints [private]

Definition at line 60 of file RepairGUI_ChangeOrientationDlg.h.

GEOM::GEOM_Object_var RepairGUI_ChangeOrientationDlg::myObject [private]

Definition at line 57 of file RepairGUI_ChangeOrientationDlg.h.

Definition at line 58 of file RepairGUI_ChangeOrientationDlg.h.


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