Version: 8.3.0
SMESHGUI_DimGroupDlg Class Reference

#include <SMESHGUI_GroupOpDlg.h>

Inheritance diagram for SMESHGUI_DimGroupDlg:

Public Member Functions

 SMESHGUI_DimGroupDlg (SMESHGUI *)
 Constructor. More...
 
virtual ~SMESHGUI_DimGroupDlg ()
 Destructor. More...
 
SMESH::ElementType getElementType () const
 Gets elements type. More...
 
void setElementType (const SMESH::ElementType &theElemType)
 Sets elements type. 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

QComboBox * myTypeCombo
 
QComboBox * myNbNoCombo
 
QListWidget * myListWg
 
QCheckBox * myUnderlOnlyChk
 
QList< SMESH::SMESH_GroupBase_var > myGroups
 

Constructor & Destructor Documentation

SMESHGUI_DimGroupDlg::SMESHGUI_DimGroupDlg ( SMESHGUI theModule)
SMESHGUI_DimGroupDlg::~SMESHGUI_DimGroupDlg ( )
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 SMESHGUI_CutGroupsDlg::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(), SMESHGUI_CutGroupsDlg::onApply(), and onApply().

SMESH::ElementType SMESHGUI_DimGroupDlg::getElementType ( ) const

Gets elements type.

Returns
elements type
See Also
setElementType()

References myTypeCombo.

Referenced by 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(), SMESHGUI_CutGroupsDlg::onApply(), and 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(), SMESHGUI_CutGroupsDlg::onSelectionDone(), and onSelectionDone().

SMESHGUI * SMESHGUI_GroupOpDlg::getSMESHGUI ( ) const
protectedinherited
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(), SMESHGUI_CutGroupsDlg::onApply(), and 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(), SMESHGUI_CutGroupsDlg::onApply(), and onApply().

bool SMESHGUI_DimGroupDlg::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::getColor(), getElementType(), SMESHGUI_GroupOpDlg::getName(), SMESHGUI_GroupOpDlg::getSMESHGUI(), SMESHGUI_GroupOpDlg::isApplyAndClose(), SMESHGUI_GroupOpDlg::isValid(), SMESHGUI::Modified(), myGroups, myNbNoCombo, myUnderlOnlyChk, reset(), and SObject().

void SMESHGUI_DimGroupDlg::onSelectionDone ( )
protectedvirtualslot

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

References SMESHGUI_GroupOpDlg::getSelectedGroups(), myGroups, and myListWg.

void SMESHGUI_DimGroupDlg::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 myGroups, myListWg, 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_DimGroupDlg::setElementType ( const SMESH::ElementType theElemType)

Sets elements type.

Parameters
theElemTypeelements type
See Also
getElementType()

References myTypeCombo.

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

QList<SMESH::SMESH_GroupBase_var> SMESHGUI_DimGroupDlg::myGroups
private

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

QListWidget* SMESHGUI_DimGroupDlg::myListWg
private
QComboBox* SMESHGUI_DimGroupDlg::myNbNoCombo
private

Referenced by onApply(), and SMESHGUI_DimGroupDlg().

QComboBox* SMESHGUI_DimGroupDlg::myTypeCombo
private
QCheckBox* SMESHGUI_DimGroupDlg::myUnderlOnlyChk
private

Referenced by onApply(), and SMESHGUI_DimGroupDlg().