Version: 9.12.0
SMESHGUI_Add0DElemsOnAllNodesOp Class Reference

Operation creating 0D elements on all nodes of given elements. More...

#include <SMESHGUI_Add0DElemsOnAllNodesDlg.h>

Inheritance diagram for SMESHGUI_Add0DElemsOnAllNodesOp:

Public Types

typedef QList< int > IdList
 

Public Member Functions

 SMESHGUI_Add0DElemsOnAllNodesOp ()
 Operation Constructor. More...
 
 ~SMESHGUI_Add0DElemsOnAllNodesOp ()
 Destructor. More...
 
virtual LightApp_Dialogdlg () const
 

Static Public Member Functions

static void extractIds (const QStringList &, IdList &, const QChar)
 

Protected Types

enum  EntityType { Object , MeshNode , MeshElement }
 

Protected Slots

virtual bool onApply ()
 Makes its main job. More...
 
void onSelTypeChange (int)
 Sets selection mode. More...
 
void onSetFilter ()
 Install filters. More...
 
virtual void onTextChanged (int, const QStringList &)
 
void updateButtons ()
 
virtual void onActivateObject (int)
 Installs filter corresponding to certain object selection widget. More...
 
virtual void onDeactivateObject (int)
 Removes filter corresponding to certain object selection widget. More...
 
virtual void onSelectionChanged (int)
 Empty default implementation. More...
 
virtual void onOk ()
 
virtual void onCancel ()
 
void onHelp ()
 

Protected Member Functions

virtual void startOperation ()
 Start. More...
 
virtual void selectionDone ()
 Treat changed selection. More...
 
virtual SUIT_SelectionFiltercreateFilter (const int) const
 Return a filter of objects. More...
 
void extractIds (const QStringList &, IdList &) const
 Find in QStringList correct node or element ids representation and append integer(id) to IdList. More...
 
virtual void commitOperation ()
 
virtual void abortOperation ()
 
virtual void initDialog ()
 sets the dialog widgets to state just after operation start More...
 
void removeCustomFilters ()
 Remove only filters set by this operation (they are in map myFilters ) More...
 
Selection_Mode selectionMode () const
 Return what selection mode is set in VTK viewer. More...
 
void setSelectionMode (const Selection_Mode)
 Set selection mode in VTK viewer. More...
 
void highlight (const Handle(SALOME_InteractiveObject)&, const bool, const bool=true)
 Highlight object in VTK viewer. More...
 
void addOrRemoveIndex (const Handle(SALOME_InteractiveObject)&, const SVTK_TVtkIDsMap &, const bool isModeShift)
 Select some nodes or elements in VTK. More...
 
SVTK_ViewWindow * viewWindow () const
 
SVTK_Selector * selector () const
 
virtual void selected (QStringList &, SMESHGUI_Dialog::TypesList &, QStringList &) const
 Get names, types and ids of selected objects. More...
 
virtual int typeById (const QString &, const EntityType) const
 Find type by id. More...
 
virtual QChar idChar () const
 Char using to divide <entry> and <id> in string id representation. By default, '#'. More...
 
void selectedIds (const int, IdList &) const
 Try to find in certain object selection widget selected node or element ids and return it. More...
 
SMESH::SMESH_Mesh_var mesh () const
 Return selected mesh if selection mode isn't ActorSelection and only one object is selected. More...
 
SMESH_Actoractor () const
 Return actor according to selected mesh if selection mode isn't ActorSelection. More...
 
virtual bool isReadyToStart () const
 
virtual void setIsApplyAndClose (const bool theFlag)
 
virtual bool isApplyAndClose () const
 
virtual void setDialogActive (const bool)
 Set according dialog active or inactive. More...
 
SMESHGUIgetSMESHGUI () const
 
virtual bool isValid (SUIT_Operation *) const
 Verifies whether given operator is valid for this one. More...
 

Protected Attributes

QString myHelpFileName
 
bool myIsApplyAndClose
 

Private Types

typedef QMap< int, SUIT_SelectionFilter * > Filters
 

Private Member Functions

 Handle (SALOME_InteractiveObject) myIO
 

Private Attributes

SMESHGUI_Add0DElemsOnAllNodesDlgmyDlg
 
SMESHGUI_FilterDlgmyFilterDlg
 
Filters myFilters
 
Selection_Mode myDefSelectionMode
 
Selection_Mode myOldSelectionMode
 

Detailed Description

Operation creating 0D elements on all nodes of given elements.

Member Typedef Documentation

◆ Filters

typedef QMap<int, SUIT_SelectionFilter*> SMESHGUI_SelectionOp::Filters
privateinherited

◆ IdList

typedef QList<int> SMESHGUI_SelectionOp::IdList
inherited

Member Enumeration Documentation

◆ EntityType

enum SMESHGUI_SelectionOp::EntityType
protectedinherited
Enumerator
Object 
MeshNode 
MeshElement 

Constructor & Destructor Documentation

◆ SMESHGUI_Add0DElemsOnAllNodesOp()

SMESHGUI_Add0DElemsOnAllNodesOp::SMESHGUI_Add0DElemsOnAllNodesOp ( )

◆ ~SMESHGUI_Add0DElemsOnAllNodesOp()

SMESHGUI_Add0DElemsOnAllNodesOp::~SMESHGUI_Add0DElemsOnAllNodesOp ( )

Destructor.

References myFilterDlg.

Member Function Documentation

◆ abortOperation()

void SMESHGUI_SelectionOp::abortOperation ( )
protectedvirtualinherited

◆ actor()

SMESH_Actor * SMESHGUI_SelectionOp::actor ( ) const
protectedinherited

◆ addOrRemoveIndex()

void SMESHGUI_SelectionOp::addOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  obj,
const SVTK_TVtkIDsMap &  indices,
const bool  isModeShift 
)
protectedinherited

◆ commitOperation()

◆ createFilter()

SUIT_SelectionFilter * SMESHGUI_Add0DElemsOnAllNodesOp::createFilter ( const int  ) const
protectedvirtual

◆ dlg()

virtual LightApp_Dialog* SMESHGUI_Add0DElemsOnAllNodesOp::dlg ( ) const
virtual

◆ extractIds() [1/2]

void SMESHGUI_SelectionOp::extractIds ( const QStringList &  ids,
IdList list 
) const
protectedinherited

Find in QStringList correct node or element ids representation and append integer(id) to IdList.

References SMESHGUI_SelectionOp::extractIds(), and SMESHGUI_SelectionOp::idChar().

◆ extractIds() [2/2]

void SMESHGUI_SelectionOp::extractIds ( const QStringList &  ids,
IdList list,
const QChar  idchar 
)
staticinherited

◆ getSMESHGUI()

◆ Handle()

SMESHGUI_Add0DElemsOnAllNodesOp::Handle ( SALOME_InteractiveObject  )
private

◆ highlight()

void SMESHGUI_SelectionOp::highlight ( const Handle(SALOME_InteractiveObject)&  obj,
const bool  highlight,
const bool  immediately = true 
)
protectedinherited

◆ idChar()

QChar SMESHGUI_SelectionOp::idChar ( ) const
protectedvirtualinherited

Char using to divide <entry> and <id> in string id representation. By default, '#'.

Referenced by SMESHGUI_SelectionOp::extractIds(), SMESHGUI_SelectionOp::selected(), and SMESHGUI_SelectionOp::typeById().

◆ initDialog()

void SMESHGUI_SelectionOp::initDialog ( )
protectedvirtualinherited

sets the dialog widgets to state just after operation start

Reimplemented from SMESHGUI_Operation.

◆ isApplyAndClose()

bool SMESHGUI_Operation::isApplyAndClose ( ) const
protectedvirtualinherited

◆ isReadyToStart()

bool SMESHGUI_Operation::isReadyToStart ( ) const
protectedvirtualinherited

◆ isValid()

bool SMESHGUI_Operation::isValid ( SUIT_Operation *  theOtherOp) const
protectedvirtualinherited

Verifies whether given operator is valid for this one.

Parameters
theOtherOp- other operation
Returns
Returns TRUE if the given operator is valid for this one, FALSE otherwise

Virtual method redefined from base class verifies whether given operator is valid for this one (i.e. can be started "above" this operator). In current implementation method returns false if theOtherOp operation is not intended for deleting objects or mesh elements.

Reimplemented in SMESHGUI_BaseComputeOp, and SMESHGUI_MeshOp.

Referenced by SMESHGUI_MeshOp::isValid().

◆ mesh()

◆ onActivateObject

◆ onApply

◆ onCancel

void SMESHGUI_Operation::onCancel ( )
protectedvirtualslotinherited

◆ onDeactivateObject

void SMESHGUI_SelectionOp::onDeactivateObject ( int  )
protectedvirtualslotinherited

Removes filter corresponding to certain object selection widget.

References SMESHGUI_SelectionOp::removeCustomFilters().

Referenced by SMESHGUI_SelectionOp::startOperation().

◆ onHelp

void SMESHGUI_Operation::onHelp ( )
protectedslotinherited

◆ onOk

void SMESHGUI_Operation::onOk ( )
protectedvirtualslotinherited

◆ onSelectionChanged

void SMESHGUI_SelectionOp::onSelectionChanged ( int  )
protectedvirtualslotinherited

Empty default implementation.

In successors it may be used for more advanced selection checking. This slot is connected to signal when the selection changed in some object selection widget

Referenced by SMESHGUI_SelectionOp::startOperation().

◆ onSelTypeChange

void SMESHGUI_Add0DElemsOnAllNodesOp::onSelTypeChange ( int  selType)
protectedslot

◆ onSetFilter

◆ onTextChanged

void SMESHGUI_Add0DElemsOnAllNodesOp::onTextChanged ( int  obj,
const QStringList &  text 
)
protectedvirtualslot

◆ removeCustomFilters()

◆ selected()

◆ selectedIds()

void SMESHGUI_SelectionOp::selectedIds ( const int  id,
IdList list 
) const
protectedinherited

Try to find in certain object selection widget selected node or element ids and return it.

References SMESHGUI_SelectionOp::extractIds().

◆ selectionDone()

◆ selectionMode()

◆ selector()

◆ setDialogActive()

void SMESHGUI_Operation::setDialogActive ( const bool  active)
protectedvirtualinherited

Set according dialog active or inactive.

References MESHCUT::d.

◆ setIsApplyAndClose()

void SMESHGUI_Operation::setIsApplyAndClose ( const bool  theFlag)
protectedvirtualinherited

◆ setSelectionMode()

◆ startOperation()

void SMESHGUI_Add0DElemsOnAllNodesOp::startOperation ( )
protectedvirtual

◆ typeById()

int SMESHGUI_SelectionOp::typeById ( const QString &  str,
const EntityType  objtype 
) const
protectedvirtualinherited

◆ updateButtons

◆ viewWindow()

Field Documentation

◆ myDefSelectionMode

Selection_Mode SMESHGUI_SelectionOp::myDefSelectionMode
privateinherited

◆ myDlg

◆ myFilterDlg

SMESHGUI_FilterDlg* SMESHGUI_Add0DElemsOnAllNodesOp::myFilterDlg
private

◆ myFilters

Filters SMESHGUI_SelectionOp::myFilters
privateinherited

◆ myHelpFileName

◆ myIsApplyAndClose

bool SMESHGUI_Operation::myIsApplyAndClose
protectedinherited

◆ myOldSelectionMode

Selection_Mode SMESHGUI_SelectionOp::myOldSelectionMode
privateinherited