Back to index

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

#include <BlocksGUI_PropagateDlg.h>

List of all members.

Public Member Functions

 BlocksGUI_PropagateDlg (GeometryGUI *, QWidget *=0)
 ~BlocksGUI_PropagateDlg ()

Protected Member Functions

virtual GEOM::GEOM_IOperations_ptr createOperation ()
virtual bool isValid (QString &)
virtual bool execute (ObjectList &)
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_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
DlgRef_1Sel * myGrp

Detailed Description

Definition at line 38 of file BlocksGUI_PropagateDlg.h.


Constructor & Destructor Documentation

BlocksGUI_PropagateDlg::BlocksGUI_PropagateDlg ( GeometryGUI *  theGeometryGUI,
QWidget *  parent = 0 
)

Definition at line 48 of file BlocksGUI_PropagateDlg.cxx.

  : GEOMBase_Skeleton( theGeometryGUI, parent )
{
  QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PROPAGATE" ) ) );
  QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );

  setWindowTitle( tr( "GEOM_PROPAGATE_TITLE" ) );

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

  myGrp = new DlgRef_1Sel( centralWidget() );
  myGrp->GroupBox1->setTitle( tr( "GEOM_SELECTED_SHAPE" ) );
  myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) );
  myGrp->PushButton1->setIcon( image1 );
  myGrp->LineEdit1->setReadOnly( true );

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

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

  setHelpFileName( "propagate_operation_page.html" );

  Init();
}

Here is the call graph for this function:

Definition at line 85 of file BlocksGUI_PropagateDlg.cxx.

{
}

Member Function Documentation

Definition at line 261 of file BlocksGUI_PropagateDlg.cxx.

{
  TColStd_MapOfInteger aMap;
  aMap.Add( GEOM_FACE );
  aMap.Add( GEOM_SHELL );
  aMap.Add( GEOM_SOLID );
  aMap.Add( GEOM_COMPOUND );
  globalSelection( aMap );
  if ( myObject->_is_nil() ) {
    SelectionIntoArgument();
  }
  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 197 of file BlocksGUI_PropagateDlg.cxx.

{
  GEOMBase_Skeleton::ActivateThisDialog();

  myGrp->LineEdit1->setText( "" );
  myObject = GEOM::GEOM_Object::_nil();

  //myGeomGUI->SetState( 0 );
  activateSelection();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 129 of file BlocksGUI_PropagateDlg.cxx.

{
  if ( !onAccept() )
    return false;

  initName();

  myGrp->LineEdit1->setText( "" );
  myObject = GEOM::GEOM_Object::_nil();

  activateSelection();

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 118 of file BlocksGUI_PropagateDlg.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 BlocksGUI_PropagateDlg::createOperation ( ) [protected, virtual]

Definition at line 223 of file BlocksGUI_PropagateDlg.cxx.

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

Definition at line 213 of file BlocksGUI_PropagateDlg.cxx.

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

Here is the call graph for this function:

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

Definition at line 241 of file BlocksGUI_PropagateDlg.cxx.

{
  GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
  GEOM::ListOfGO_var aList = anOper->Propagate( myObject );
  mainFrame()->ResultName->setText( "" );

  if ( !aList->length() )
    return false;

  for ( int i = 0, n = aList->length(); i < n; i++ ) {
    objects.push_back( aList[i]._retn() );
  }

  return objects.size() > 0;
}
GEOM::GEOM_Object_ptr BlocksGUI_PropagateDlg::getFather ( GEOM::GEOM_Object_ptr  ) [protected, virtual]

Definition at line 281 of file BlocksGUI_PropagateDlg.cxx.

{
  return myObject;
}
void BlocksGUI_PropagateDlg::Init ( ) [private]

Definition at line 93 of file BlocksGUI_PropagateDlg.cxx.

{
  /* init variables */

  myObject = GEOM::GEOM_Object::_nil();
  mainFrame()->ResultName->setText( "" );
  mainFrame()->GroupBoxName->hide();

  //myGeomGUI->SetState( 0 );

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

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

  activateSelection();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 232 of file BlocksGUI_PropagateDlg.cxx.

{
  return !myObject->_is_nil() ;
}

Definition at line 184 of file BlocksGUI_PropagateDlg.cxx.

{
  const QObject* send = sender();
  if ( send == myGrp->LineEdit1 ) {
    GEOMBase_Skeleton::LineEditReturnPressed();
  }
}

Here is the caller graph for this function:

Definition at line 149 of file BlocksGUI_PropagateDlg.cxx.

{
  myGrp->LineEdit1->setText( "" );
  myObject = GEOM::GEOM_Object::_nil();

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

  if (aSelList.Extent() == 1) {
    Handle(SALOME_InteractiveObject) anIO = aSelList.First();
    myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
    if ( !CORBA::is_nil( myObject ) )
      myGrp->LineEdit1->setText( GEOMBase::GetName( myObject ) );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 170 of file BlocksGUI_PropagateDlg.cxx.

{
  const QObject* send = sender();
  if ( send == myGrp->PushButton1 )  {
    myGrp->LineEdit1->setFocus();
  }
  activateSelection();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

DlgRef_1Sel* BlocksGUI_PropagateDlg::myGrp [private]

Definition at line 70 of file BlocksGUI_PropagateDlg.h.

GEOM::GEOM_Object_var BlocksGUI_PropagateDlg::myObject [private]

Definition at line 69 of file BlocksGUI_PropagateDlg.h.


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