#include <SMESHGUI_GroupOpDlg.h>
Public Member Functions | |
SMESHGUI_GroupOpDlg (SMESHGUI *) | |
Class : SMESHGUI_GroupOpDlg Description : Perform boolean operations on groups. More... | |
virtual | ~SMESHGUI_GroupOpDlg () |
Destructor. More... | |
void | Init () |
Init dialog fields, connect signals and slots, show dialog. More... | |
Protected Slots | |
virtual bool | onApply () |
This virtual slot does nothing and should be redefined in derived classes. More... | |
virtual void | onSelectionDone () |
SLOT, called when selection is changed. 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 () |
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... | |
QGroupBox * | getArgGrp () const |
Gets pointer on arguments group box. More... | |
void | setHelpFileName (const QString &theFName) |
Sets help file name. More... | |
SMESHGUI * | getSMESHGUI () 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::ListOfGroups * | convert (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 deativated. 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... | |
QWidget * | createButtonFrame (QWidget *) |
Create frame containing buttons. More... | |
QWidget * | createMainFrame (QWidget *) |
Creates frame containing dialog's input fields. More... | |
Private Attributes | |
QPushButton * | myOkBtn |
QPushButton * | myApplyBtn |
QPushButton * | myCloseBtn |
QPushButton * | myHelpBtn |
QLineEdit * | myNameEdit |
QGroupBox * | myArgGrp |
QtxColorButton * | myColorBtn |
SMESHGUI * | mySMESHGUI |
LightApp_SelectionMgr * | mySelectionMgr |
SVTK_Selector * | mySelector |
QString | myHelpFileName |
bool | myIsApplyAndClose |
SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg | ( | SMESHGUI * | theModule | ) |
Class : SMESHGUI_GroupOpDlg Description : Perform boolean operations on groups.
Constructor
theModule | pointer on module instance |
References createButtonFrame(), createMainFrame(), SMESH::GetSelector(), SMESH::GetViewWindow(), Init(), MARGIN, mySelector, mySMESHGUI, and SPACING.
|
virtual |
Destructor.
|
protected |
Converts QT-list of group to the list acceptable by IDL interface.
theIn | input list |
Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), and SMESHGUI_CutGroupsDlg::onApply().
Create frame containing buttons.
theParent | parent widget |
References MARGIN, myApplyBtn, myCloseBtn, myHelpBtn, myOkBtn, onApply(), onHelp(), onOk(), reject(), and SPACING.
Referenced by SMESHGUI_GroupOpDlg().
Creates frame containing dialog's input fields.
theParent | parent widget |
References MARGIN, myArgGrp, myColorBtn, myNameEdit, and SPACING.
Referenced by SMESHGUI_GroupOpDlg().
|
private |
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, mySelectionMgr, mySelector, and mySMESHGUI.
|
protected |
Gets pointer on arguments group box.
References myArgGrp.
Referenced by SMESHGUI_CutGroupsDlg::SMESHGUI_CutGroupsDlg(), SMESHGUI_DimGroupDlg::SMESHGUI_DimGroupDlg(), SMESHGUI_IntersectGroupsDlg::SMESHGUI_IntersectGroupsDlg(), and SMESHGUI_UnionGroupsDlg::SMESHGUI_UnionGroupsDlg().
|
protected |
Get color to be assigned to group.
References myColorBtn.
Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), SMESHGUI_CutGroupsDlg::onApply(), and SMESHGUI_DimGroupDlg::onApply().
|
protected |
Gets name of group to be created.
References myNameEdit.
Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), SMESHGUI_CutGroupsDlg::onApply(), and SMESHGUI_DimGroupDlg::onApply().
|
protected |
Gets list of currently selected groups from selection manager.
theOutList | out list of groups |
theOutNames | out list of group of group names |
References mySelectionMgr.
Referenced by SMESHGUI_UnionGroupsDlg::onSelectionDone(), SMESHGUI_IntersectGroupsDlg::onSelectionDone(), SMESHGUI_CutGroupsDlg::onSelectionDone(), and SMESHGUI_DimGroupDlg::onSelectionDone().
|
protected |
Gets pointer to the module instance.
References mySMESHGUI.
Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), SMESHGUI_CutGroupsDlg::onApply(), SMESHGUI_DimGroupDlg::onApply(), and SMESHGUI_CutGroupsDlg::SMESHGUI_CutGroupsDlg().
void SMESHGUI_GroupOpDlg::Init | ( | ) |
Init dialog fields, connect signals and slots, show dialog.
References SMESH::GetViewWindow(), SMESH::GROUP, mySelectionMgr, mySMESHGUI, onCloseView(), onDeactivate(), onOpenView(), onSelectionDone(), reject(), SMESHGUI::SetActiveDialogBox(), and setDefaultGroupColor().
Referenced by SMESHGUI_GroupOpDlg().
|
protected |
Get value of the flag indicating that the dialog is accepted by Apply & Close button.
References myIsApplyAndClose.
Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), SMESHGUI_CutGroupsDlg::onApply(), and SMESHGUI_DimGroupDlg::onApply().
|
protected |
Validate list of groups used for operation.
Checks whether they corresponds to the same face and have one type
theListGrp | input list of groups |
Referenced by SMESHGUI_UnionGroupsDlg::onApply(), SMESHGUI_IntersectGroupsDlg::onApply(), SMESHGUI_CutGroupsDlg::onApply(), and SMESHGUI_DimGroupDlg::onApply().
|
private |
|
protectedvirtualslot |
This virtual slot does nothing and should be redefined in derived classes.
Referenced by createButtonFrame(), and onOk().
|
privateslot |
References mySelector, and onDeactivate().
Referenced by Init().
|
privateslot |
SLOT called when dialog must be deativated.
References mySelectionMgr.
Referenced by Init(), and onCloseView().
|
privateslot |
SLOT called when "Help" button pressed shows "Help" page.
References myHelpFileName, and mySMESHGUI.
Referenced by createButtonFrame(), and keyPressEvent().
|
privateslot |
SLOT called when "Ok" button pressed performs operation and closes dialog box.
References onApply(), reject(), and setIsApplyAndClose().
Referenced by createButtonFrame().
|
privateslot |
References SMESHGUI::EmitSignalDeactivateDialog(), SMESH::GetViewWindow(), mySelector, mySMESHGUI, and SMESH::SetPointRepresentation().
Referenced by Init().
|
protectedvirtualslot |
SLOT, called when selection is changed.
Current implementation does nothing. The method should be redefined in derived classes to update corresponding GUI controls
Referenced by Init(), and setVisible().
|
protectedvirtualslot |
SLOT called when dialog is closed.
References SMESH::GetViewWindow(), mySelectionMgr, mySMESHGUI, reset(), and SMESHGUI::ResetState().
Referenced by createButtonFrame(), Init(), and onOk().
|
protectedvirtual |
Resets state of the dialog, initializes its fields with default value, etc.
Usually called by onApply() slot to reinitialize dialog fields. This virtual method should be redefined in derived class to update its own fileds
Reimplemented in SMESHGUI_DimGroupDlg, SMESHGUI_CutGroupsDlg, SMESHGUI_IntersectGroupsDlg, and SMESHGUI_UnionGroupsDlg.
References myNameEdit, and setDefaultGroupColor().
Referenced by reject(), SMESHGUI_UnionGroupsDlg::reset(), SMESHGUI_IntersectGroupsDlg::reset(), SMESHGUI_CutGroupsDlg::reset(), and SMESHGUI_DimGroupDlg::reset().
|
protected |
Set default color for group.
References SMESH::GetColor(), and myColorBtn.
|
protected |
Sets help file name.
theFName | help file name |
References myHelpFileName.
Referenced by SMESHGUI_CutGroupsDlg::SMESHGUI_CutGroupsDlg(), SMESHGUI_DimGroupDlg::SMESHGUI_DimGroupDlg(), SMESHGUI_IntersectGroupsDlg::SMESHGUI_IntersectGroupsDlg(), and SMESHGUI_UnionGroupsDlg::SMESHGUI_UnionGroupsDlg().
|
protected |
Set value of the flag indicating that the dialog is accepted by Apply & Close button.
theFlag | value of the flag |
References myIsApplyAndClose.
Referenced by onOk().
|
protected |
Sets name of group to be created.
theName | name of group to be created |
References myNameEdit.
|
protectedvirtualslot |
Calls onSelectionDone() and setVisible() method of base class.
visible | the visible state of the dialog |
References onSelectionDone().
|
private |
Referenced by createButtonFrame().
|
private |
Referenced by createMainFrame(), and getArgGrp().
|
private |
Referenced by createButtonFrame().
|
private |
Referenced by createMainFrame(), getColor(), and setDefaultGroupColor().
|
private |
Referenced by createButtonFrame().
|
private |
Referenced by onHelp(), and setHelpFileName().
|
private |
Referenced by isApplyAndClose(), and setIsApplyAndClose().
|
private |
Referenced by createMainFrame(), getName(), reset(), and setName().
|
private |
Referenced by createButtonFrame().
|
private |
Referenced by enterEvent(), getSelectedGroups(), Init(), onDeactivate(), and reject().
|
private |
Referenced by enterEvent(), onCloseView(), onOpenView(), and SMESHGUI_GroupOpDlg().
|
private |
Referenced by enterEvent(), getSMESHGUI(), Init(), onHelp(), onOpenView(), reject(), and SMESHGUI_GroupOpDlg().