Version: 9.12.0
SMESHGUI_IntersectGroupsDlg Class Reference

#include <SMESHGUI_GroupOpDlg.h>

Inheritance diagram for SMESHGUI_IntersectGroupsDlg:

Public Member Functions

 SMESHGUI_IntersectGroupsDlg (SMESHGUI *)
 Constructor. More...
 
virtual ~SMESHGUI_IntersectGroupsDlg ()
 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 Slots

void onOk ()
 SLOT called when "Ok" button pressed performs operation and closes dialog box. More...
 
void onHelp ()
 SLOT called when "Help" button pressed shows "Help" page. More...
 
void onDeactivate ()
 SLOT called when dialog must be deactivated. More...
 
void onOpenView ()
 
void onCloseView ()
 

Private Member Functions

void enterEvent (QEvent *)
 Event filter updates selection mode and selection filter. More...
 
void keyPressEvent (QKeyEvent *)
 Provides reaction on �F1� button pressing. More...
 
QWidgetcreateButtonFrame (QWidget *)
 Create frame containing buttons. More...
 
QWidgetcreateMainFrame (QWidget *)
 Creates frame containing dialog's input fields. More...
 

Private Attributes

QListWidget * myListWg
 
QList< SMESH::SMESH_GroupBase_var > myGroups
 
QPushButton * myOkBtn
 
QPushButton * myApplyBtn
 
QPushButton * myCloseBtn
 
QPushButton * myHelpBtn
 
QLineEdit * myNameEdit
 
QGroupBoxmyArgGrp
 
QtxColorButton * myColorBtn
 
SMESHGUImySMESHGUI
 
LightApp_SelectionMgr * mySelectionMgr
 
SVTK_Selector * mySelector
 
QString myHelpFileName
 
bool myIsApplyAndClose
 

Constructor & Destructor Documentation

◆ SMESHGUI_IntersectGroupsDlg()

SMESHGUI_IntersectGroupsDlg::SMESHGUI_IntersectGroupsDlg ( SMESHGUI theModule)

Constructor.

Parameters
theModulemodule

References SMESHGUI_GroupOpDlg::getArgGrp(), myListWg, and SMESHGUI_GroupOpDlg::setHelpFileName().

◆ ~SMESHGUI_IntersectGroupsDlg()

SMESHGUI_IntersectGroupsDlg::~SMESHGUI_IntersectGroupsDlg ( )
virtual

Destructor.

Member Function Documentation

◆ convert()

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

◆ createButtonFrame()

QWidget * SMESHGUI_GroupOpDlg::createButtonFrame ( QWidget theParent)
privateinherited

◆ createMainFrame()

QWidget * SMESHGUI_GroupOpDlg::createMainFrame ( QWidget theParent)
privateinherited

Creates frame containing dialog's input fields.

Parameters
theParentparent widget
Returns
pointer on created widget

References MARGIN, SMESHGUI_GroupOpDlg::myArgGrp, SMESHGUI_GroupOpDlg::myColorBtn, SMESHGUI_GroupOpDlg::myNameEdit, and SPACING.

Referenced by SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg().

◆ enterEvent()

void SMESHGUI_GroupOpDlg::enterEvent ( QEvent *  )
privateinherited

Event filter updates selection mode and selection filter.

This virtual method is redefined from the base class it is called when dialog obtains input focus

References SMESHGUI::EmitSignalDeactivateDialog(), SMESH::GetViewWindow(), SMESH::GROUP, SMESHGUI_GroupOpDlg::mySelectionMgr, SMESHGUI_GroupOpDlg::mySelector, and SMESHGUI_GroupOpDlg::mySMESHGUI.

◆ getArgGrp()

QGroupBox * SMESHGUI_GroupOpDlg::getArgGrp ( ) const
protectedinherited

◆ getColor()

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

◆ getName()

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

◆ getSelectedGroups()

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

◆ getSMESHGUI()

SMESHGUI * SMESHGUI_GroupOpDlg::getSMESHGUI ( ) const
protectedinherited

◆ Init()

◆ isApplyAndClose()

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

◆ isValid()

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

◆ keyPressEvent()

void SMESHGUI_GroupOpDlg::keyPressEvent ( QKeyEvent *  e)
privateinherited

Provides reaction on �F1� button pressing.

Parameters
ekey press event

References SMESHGUI_GroupOpDlg::onHelp().

◆ onApply

bool SMESHGUI_IntersectGroupsDlg::onApply ( )
protectedvirtualslot

◆ onCloseView

void SMESHGUI_GroupOpDlg::onCloseView ( )
privateslotinherited

◆ onDeactivate

void SMESHGUI_GroupOpDlg::onDeactivate ( )
privateslotinherited

SLOT called when dialog must be deactivated.

References SMESHGUI_GroupOpDlg::mySelectionMgr.

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

◆ onHelp

void SMESHGUI_GroupOpDlg::onHelp ( )
privateslotinherited

SLOT called when "Help" button pressed shows "Help" page.

References SMESHGUI_GroupOpDlg::myHelpFileName, and SMESHGUI_GroupOpDlg::mySMESHGUI.

Referenced by SMESHGUI_GroupOpDlg::createButtonFrame(), and SMESHGUI_GroupOpDlg::keyPressEvent().

◆ onOk

void SMESHGUI_GroupOpDlg::onOk ( )
privateslotinherited

SLOT called when "Ok" button pressed performs operation and closes dialog box.

References SMESHGUI_GroupOpDlg::onApply(), SMESHGUI_GroupOpDlg::reject(), and SMESHGUI_GroupOpDlg::setIsApplyAndClose().

Referenced by SMESHGUI_GroupOpDlg::createButtonFrame().

◆ onOpenView

◆ onSelectionDone

void SMESHGUI_IntersectGroupsDlg::onSelectionDone ( )
protectedvirtualslot

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

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

◆ reject

◆ reset()

void SMESHGUI_IntersectGroupsDlg::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().

◆ setDefaultGroupColor()

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().

◆ setHelpFileName()

void SMESHGUI_GroupOpDlg::setHelpFileName ( const QString &  theFName)
protectedinherited

◆ setIsApplyAndClose()

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().

◆ setName()

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.

◆ setVisible

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

◆ myApplyBtn

QPushButton* SMESHGUI_GroupOpDlg::myApplyBtn
privateinherited

◆ myArgGrp

QGroupBox* SMESHGUI_GroupOpDlg::myArgGrp
privateinherited

◆ myCloseBtn

QPushButton* SMESHGUI_GroupOpDlg::myCloseBtn
privateinherited

◆ myColorBtn

QtxColorButton* SMESHGUI_GroupOpDlg::myColorBtn
privateinherited

◆ myGroups

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

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

◆ myHelpBtn

QPushButton* SMESHGUI_GroupOpDlg::myHelpBtn
privateinherited

◆ myHelpFileName

QString SMESHGUI_GroupOpDlg::myHelpFileName
privateinherited

◆ myIsApplyAndClose

bool SMESHGUI_GroupOpDlg::myIsApplyAndClose
privateinherited

◆ myListWg

QListWidget* SMESHGUI_IntersectGroupsDlg::myListWg
private

◆ myNameEdit

QLineEdit* SMESHGUI_GroupOpDlg::myNameEdit
privateinherited

◆ myOkBtn

QPushButton* SMESHGUI_GroupOpDlg::myOkBtn
privateinherited

◆ mySelectionMgr

◆ mySelector

◆ mySMESHGUI