Version: 8.3.0
SMESHGUI_CutGroupsDlg Class Reference

#include <SMESHGUI_GroupOpDlg.h>

Inheritance diagram for SMESHGUI_CutGroupsDlg:

Public Member Functions

 SMESHGUI_CutGroupsDlg (SMESHGUI *)
 Constructor. More...
 
virtual ~SMESHGUI_CutGroupsDlg ()
 Destructor. More...
 
void Init ()
 Init dialog fields, connect signals and slots, show dialog. More...
 

Protected Slots

virtual bool onApply ()
 SLOT called when apply button is pressed performs operation. More...
 
virtual void onSelectionDone ()
 SLOT, called when selection is changed, updates corresponding GUI controls. More...
 
virtual void setVisible (bool visible)
 Calls onSelectionDone() and setVisible() method of base class. More...
 
virtual void reject ()
 SLOT called when dialog is closed. More...
 

Protected Member Functions

virtual void reset ()
 This virtual method redefined from the base class resets state of the dialog, initializes its fields with default value, etc. More...
 
QString getName () const
 Gets name of group to be created. More...
 
void setName (const QString &theName)
 Sets name of group to be created. More...
 
QGroupBoxgetArgGrp () const
 Gets pointer on arguments group box. More...
 
void setHelpFileName (const QString &theFName)
 Sets help file name. More...
 
SMESHGUIgetSMESHGUI () const
 Gets pointer to the module instance. More...
 
bool isValid (const QList< SMESH::SMESH_GroupBase_var > &theListGrp)
 Validate list of groups used for operation. More...
 
bool getSelectedGroups (QList< SMESH::SMESH_GroupBase_var > &theOutList, QStringList &theOutNames)
 Gets list of currently selected groups from selection manager. More...
 
SMESH::ListOfGroupsconvert (const QList< SMESH::SMESH_GroupBase_var > &)
 Converts QT-list of group to the list acceptable by IDL interface. More...
 
SALOMEDS::Color getColor () const
 Get color to be assigned to group. More...
 
void setDefaultGroupColor ()
 Set default color for group. More...
 
void setIsApplyAndClose (const bool theFlag)
 Set value of the flag indicating that the dialog is accepted by Apply & Close button. More...
 
bool isApplyAndClose () const
 Get value of the flag indicating that the dialog is accepted by Apply & Close button. More...
 

Private Attributes

QPushButton * myBtn1
 
QPushButton * myBtn2
 
QListWidget * myListWg1
 
QListWidget * myListWg2
 
QList< SMESH::SMESH_GroupBase_var > myGroups1
 
QList< SMESH::SMESH_GroupBase_var > myGroups2
 

Constructor & Destructor Documentation

SMESHGUI_CutGroupsDlg::SMESHGUI_CutGroupsDlg ( SMESHGUI theModule)
SMESHGUI_CutGroupsDlg::~SMESHGUI_CutGroupsDlg ( )
virtual

Destructor.

Member Function Documentation

SMESH::ListOfGroups * SMESHGUI_GroupOpDlg::convert ( const QList< SMESH::SMESH_GroupBase_var > &  theIn)
protectedinherited

Converts QT-list of group to the list acceptable by IDL interface.

Parameters
theIninput list
Returns
list acceptable by IDL interface

Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), and onApply().

QGroupBox * SMESHGUI_GroupOpDlg::getArgGrp ( ) const
protectedinherited
SALOMEDS::Color SMESHGUI_GroupOpDlg::getColor ( ) const
protectedinherited

Get color to be assigned to group.

Returns
color to be assigned to group

References SMESHGUI_GroupOpDlg::myColorBtn.

Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), onApply(), and SMESHGUI_DimGroupDlg::onApply().

QString SMESHGUI_GroupOpDlg::getName ( ) const
protectedinherited

Gets name of group to be created.

Returns
name of group to be created
See Also
setName()

References SMESHGUI_GroupOpDlg::myNameEdit.

Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), onApply(), and SMESHGUI_DimGroupDlg::onApply().

bool SMESHGUI_GroupOpDlg::getSelectedGroups ( QList< SMESH::SMESH_GroupBase_var > &  theOutList,
QStringList &  theOutNames 
)
protectedinherited

Gets list of currently selected groups from selection manager.

Parameters
theOutListout list of groups
theOutNamesout list of group of group names
Returns
TRUE if operation theOutList is not empty, FALSE otherwise

References SMESHGUI_GroupOpDlg::mySelectionMgr.

Referenced by SMESHGUI_UnionGroupsDlg::onSelectionDone(), SMESHGUI_IntersectGroupsDlg::onSelectionDone(), onSelectionDone(), and SMESHGUI_DimGroupDlg::onSelectionDone().

SMESHGUI * SMESHGUI_GroupOpDlg::getSMESHGUI ( ) const
protectedinherited

Gets pointer to the module instance.

Returns
pointer to the module instance

References SMESHGUI_GroupOpDlg::mySMESHGUI.

Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), onApply(), SMESHGUI_DimGroupDlg::onApply(), and SMESHGUI_CutGroupsDlg().

bool SMESHGUI_GroupOpDlg::isApplyAndClose ( ) const
protectedinherited

Get value of the flag indicating that the dialog is accepted by Apply & Close button.

Returns
value of the flag
See Also
setApplyAndClose()

References SMESHGUI_GroupOpDlg::myIsApplyAndClose.

Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), onApply(), and SMESHGUI_DimGroupDlg::onApply().

bool SMESHGUI_GroupOpDlg::isValid ( const QList< SMESH::SMESH_GroupBase_var > &  theListGrp)
protectedinherited

Validate list of groups used for operation.

Checks whether they corresponds to the same face and have one type

Parameters
theListGrpinput list of groups
Returns
TRUE if groups are valid, FALSE otherwise

Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), onApply(), and SMESHGUI_DimGroupDlg::onApply().

bool SMESHGUI_CutGroupsDlg::onApply ( )
protectedvirtualslot

SLOT called when apply button is pressed performs operation.

Returns
TRUE if operation has been completed successfully, FALSE otherwise

References _PTR(), SMESHGUI_GroupOpDlg::convert(), SMESHGUI_GroupOpDlg::getColor(), SMESHGUI_GroupOpDlg::getName(), SMESHGUI_GroupOpDlg::getSMESHGUI(), SMESHGUI_GroupOpDlg::isApplyAndClose(), SMESHGUI_GroupOpDlg::isValid(), SMESHGUI::Modified(), myGroups1, myGroups2, reset(), and SObject().

void SMESHGUI_CutGroupsDlg::onSelectionDone ( )
protectedvirtualslot

SLOT, called when selection is changed, updates corresponding GUI controls.

References SMESHGUI_GroupOpDlg::getSelectedGroups(), myBtn2, myGroups1, myGroups2, myListWg1, and myListWg2.

void SMESHGUI_CutGroupsDlg::reset ( )
protectedvirtual

This virtual method redefined from the base class resets state of the dialog, initializes its fields with default value, etc.

Reimplemented from SMESHGUI_GroupOpDlg.

References myGroups1, myGroups2, myListWg1, myListWg2, and SMESHGUI_GroupOpDlg::reset().

Referenced by onApply().

void SMESHGUI_GroupOpDlg::setDefaultGroupColor ( )
protectedinherited

Set default color for group.

References SMESH::GetColor(), and SMESHGUI_GroupOpDlg::myColorBtn.

Referenced by SMESHGUI_GroupOpDlg::Init(), and SMESHGUI_GroupOpDlg::reset().

void SMESHGUI_GroupOpDlg::setHelpFileName ( const QString &  theFName)
protectedinherited
void SMESHGUI_GroupOpDlg::setIsApplyAndClose ( const bool  theFlag)
protectedinherited

Set value of the flag indicating that the dialog is accepted by Apply & Close button.

Parameters
theFlagvalue of the flag
See Also
isApplyAndClose()

References SMESHGUI_GroupOpDlg::myIsApplyAndClose.

Referenced by SMESHGUI_GroupOpDlg::onOk().

void SMESHGUI_GroupOpDlg::setName ( const QString &  theName)
protectedinherited

Sets name of group to be created.

Parameters
theNamename of group to be created
See Also
getName()

References SMESHGUI_GroupOpDlg::myNameEdit.

void SMESHGUI_GroupOpDlg::setVisible ( bool  visible)
protectedvirtualslotinherited

Calls onSelectionDone() and setVisible() method of base class.

Parameters
visiblethe visible state of the dialog

References SMESHGUI_GroupOpDlg::onSelectionDone().

Field Documentation

QPushButton* SMESHGUI_CutGroupsDlg::myBtn1
private

Referenced by SMESHGUI_CutGroupsDlg().

QPushButton* SMESHGUI_CutGroupsDlg::myBtn2
private
QList<SMESH::SMESH_GroupBase_var> SMESHGUI_CutGroupsDlg::myGroups1
private

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

QList<SMESH::SMESH_GroupBase_var> SMESHGUI_CutGroupsDlg::myGroups2
private

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

QListWidget* SMESHGUI_CutGroupsDlg::myListWg1
private
QListWidget* SMESHGUI_CutGroupsDlg::myListWg2
private