Version: 9.16.0
StdMeshersGUI_BlockRenumberCreator Class Reference

#include <StdMeshersGUI_BlockRenumberCreator.h>

Inheritance diagram for StdMeshersGUI_BlockRenumberCreator:

Signals

void finished (int)
 

Public Member Functions

 StdMeshersGUI_BlockRenumberCreator (const QString &aHypType)
 StdMeshersGUI_BlockRenumberCreator constructor. More...
 
 ~StdMeshersGUI_BlockRenumberCreator ()
 StdMeshersGUI_BlockRenumberCreator destructor. More...
 
virtual bool checkParams (QString &) const override
 Validate parameters. More...
 
virtual QString helpPage () const override
 Returns a name of help page. More...
 
virtual QString hypTypeName (const QString &) const override
 Type name. More...
 
void create (SMESH::SMESH_Hypothesis_ptr, const QString &, QWidget *, QObject *, const QString &)
 
void create (bool, const QString &, QWidget *, QObject *, const QString &)
 
void edit (SMESH::SMESH_Hypothesis_ptr, const QString &, QWidget *, QObject *, const QString &)
 
void setInitParamsHypothesis (SMESH::SMESH_Hypothesis_ptr)
 
QString hypType () const
 
QString hypName () const
 
bool isCreation () const
 
QString getShapeEntry () const
 
void setShapeEntry (const QString &theEntry)
 
QString getMainShapeEntry () const
 
void setMainShapeEntry (const QString &theEntry)
 
void setNoGeomMesh (const bool noGeom)
 
bool getNoGeomMesh () const
 

Protected Types

typedef QList< StdParamListOfStdParams
 
typedef QList< QWidget * > ListOfWidgets
 

Protected Slots

virtual void onValueChanged ()
 

Protected Member Functions

virtual QFramebuildFrame () override
 Create widgets. More...
 
virtual void retrieveParams () const override
 Transfer parameters from hypothesis to widgets. More...
 
virtual QString storeParams () const override
 Transfer parameters from widgets to hypothesis. More...
 
virtual bool stdParams (ListOfStdParams &) const
 Return parameter values as SMESHGUI_GenericHypothesisCreator::StdParam. More...
 
virtual void attuneStdWidget (QWidget *, const int) const
 tune "standard" control More...
 
virtual QString caption () const
 Return dlg title. More...
 
virtual QPixmap icon () const
 return pixmap for dlg icon More...
 
virtual QString type () const
 Return hypothesis type name to show in dlg. More...
 
virtual QWidgetgetCustomWidget (const StdParam &, QWidget *, const int) const
 
virtual QWidgetgetHelperWidget () const
 Returns a widget representing not a hypothesis parameter but some helper widget. More...
 
virtual bool getParamFromCustomWidget (StdParam &, QWidget *) const
 Set param value taken from a custom widget. More...
 
virtual QWidgetgetWidgetForParam (int paramIndex) const
 Return widget for i-th hypothesis parameter (got from myParamWidgets) More...
 
virtual ListOfWidgetscustomWidgets () const
 Allow modifying myCustomWidgets in const methods. More...
 
virtual void onReject ()
 called when operation cancelled More...
 
virtual void valueChanged (QWidget *)
 Update widgets dependent on paramWidget. More...
 
bool initVariableName (SMESH::SMESH_Hypothesis_var theHyp, StdParam &theParams, const char *theMethod) const
 
QWidgetmakeReverseEdgesWdg (SMESH::long_array_var edgeIDs, CORBA::String_var shapeEntry) const
 Creates two widgets used to define reversed edges for some 1D hypotheses. More...
 
void removeOldGroup (const char *oldName, const char *newName, SMESH::ElementType type) const
 Remove a group, whose name is stored by hypothesis, upon group name modification. More...
 
template<class T >
T * widget (int i) const
 
SMESH::SMESH_Hypothesis_var hypothesis () const
 
SMESH::SMESH_Hypothesis_var initParamsHypothesis (const bool strict=false) const
 Return hypothesis containing initial parameters. More...
 
bool hasInitParamsHypothesis () const
 
const ListOfWidgetswidgets () const
 
ListOfWidgetschangeWidgets ()
 
QLabelgetLabel (int i) const
 Returns a QLabel of a specified parameter. More...
 
QtxDialogdlg () const
 
QString getVariableName (const char *methodName) const
 
QFramebuildStdFrame ()
 
bool getStdParamFromDlg (ListOfStdParams &) const
 
virtual QStringList getVariablesFromDlg () const
 

Static Protected Member Functions

static QString stdParamValues (const ListOfStdParams &)
 

Protected Attributes

ListOfWidgets myCustomWidgets
 
QWidgetmyHelperWidget
 

Private Slots

void onSelectionChange ()
 Take selected object. More...
 
void onTreeSelectionChange ()
 Display selected block CS in myLineEdit's. More...
 
void updateButtons ()
 Activate/deactivate buttons. More...
 
void onSelectBtnClick ()
 Install filter upon activation of another object selection. More...
 
void onAddBtnClick ()
 Add shapes to the tree. More...
 
void onModifBtnClick ()
 Modify a current block. More...
 
void onRemoveBtnClick ()
 Remove selected block from the tree. More...
 
virtual void onDialogFinished (int)
 

Private Member Functions

void setBlockToTree (QTreeWidgetItem *item=0)
 Set myGO's to the tree. More...
 
void editHypothesis (SMESH::SMESH_Hypothesis_ptr, const QString &, QWidget *, QObject *obj, const QString &)
 

Private Attributes

QLineEdit * myName
 
QTreeWidgetmyBlockTree
 
QPushButton * myShapeSelectBut [3]
 
QButtonGroup * myButGroup
 
QLineEdit * myLineEdit [3]
 
QPushButton * myAddBut
 
QPushButton * myModifBut
 
QPushButton * myRemoveBut
 
GEOM::GEOM_Object_var myGO [3]
 
SMESH_NumberFilter mySolidFilter
 
SMESH_NumberFilter myVertexFilter
 
SMESH::SMESH_Hypothesis_var myHypo
 
SMESH::SMESH_Hypothesis_var myInitParamsHypo
 
bool myToDeleteInitParamsHypo
 
QString myHypName
 
QString myHypType
 
ListOfWidgets myParamWidgets
 
ListOfWidgets myParamLabels
 
bool myIsCreate
 
bool myNoGeomMesh
 true for a mesh not based on geometry More...
 
QtxDialogmyDlg
 
QString myShapeEntry
 
QString myMainShapeEntry
 

Member Typedef Documentation

◆ ListOfStdParams

◆ ListOfWidgets

typedef QList<QWidget*> SMESHGUI_GenericHypothesisCreator::ListOfWidgets
protectedinherited

Constructor & Destructor Documentation

◆ StdMeshersGUI_BlockRenumberCreator()

StdMeshersGUI_BlockRenumberCreator::StdMeshersGUI_BlockRenumberCreator ( const QString &  aHypType)

◆ ~StdMeshersGUI_BlockRenumberCreator()

StdMeshersGUI_BlockRenumberCreator::~StdMeshersGUI_BlockRenumberCreator ( )

Member Function Documentation

◆ attuneStdWidget()

void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget ( QWidget w,
const int   
) const
protectedvirtualinherited

tune "standard" control

Parameters
w- control widget
int- parameter index

Reimplemented from SMESHGUI_GenericHypothesisCreator.

References SMESHGUI_GenericHypothesisCreator::hypType(), SMESHGUI_SpinBox::RangeStepAndValidator(), VALUE_MAX, VALUE_MAX_2, VALUE_MAX_3, VALUE_SMALL, VALUE_SMALL_2, and VALUE_SMALL_3.

◆ buildFrame()

◆ buildStdFrame()

◆ caption()

QString StdMeshersGUI_StdHypothesisCreator::caption ( ) const
protectedvirtualinherited

Return dlg title.

Return values
QString- title string

Reimplemented from SMESHGUI_GenericHypothesisCreator.

References SMESHGUI_GenericHypothesisCreator::hypType(), and StdMeshersGUI_StdHypothesisCreator::hypTypeName().

◆ changeWidgets()

◆ checkParams()

bool StdMeshersGUI_BlockRenumberCreator::checkParams ( QString &  ) const
overridevirtual

Validate parameters.

Reimplemented from StdMeshersGUI_StdHypothesisCreator.

◆ create() [1/2]

void SMESHGUI_GenericHypothesisCreator::create ( bool  isAlgo,
const QString &  theHypName,
QWidget theParent,
QObject obj,
const QString &  slot 
)
inherited

◆ create() [2/2]

void SMESHGUI_GenericHypothesisCreator::create ( SMESH::SMESH_Hypothesis_ptr  initParamsHyp,
const QString &  theHypName,
QWidget parent,
QObject obj,
const QString &  slot 
)
inherited

◆ customWidgets()

StdMeshersGUI_StdHypothesisCreator::ListOfWidgets * StdMeshersGUI_StdHypothesisCreator::customWidgets ( ) const
protectedvirtualinherited

◆ dlg()

◆ edit()

void SMESHGUI_GenericHypothesisCreator::edit ( SMESH::SMESH_Hypothesis_ptr  theHypothesis,
const QString &  theHypName,
QWidget theParent,
QObject obj,
const QString &  slot 
)
inherited

◆ editHypothesis()

◆ finished

void SMESHGUI_GenericHypothesisCreator::finished ( int  )
signalinherited

◆ getCustomWidget()

QWidget * StdMeshersGUI_StdHypothesisCreator::getCustomWidget ( const StdParam ,
QWidget parent,
const int  index 
) const
protectedvirtualinherited

◆ getHelperWidget()

virtual QWidget * StdMeshersGUI_StdHypothesisCreator::getHelperWidget ( ) const
protectedvirtualinherited

Returns a widget representing not a hypothesis parameter but some helper widget.

Reimplemented from SMESHGUI_GenericHypothesisCreator.

◆ getLabel()

QLabel * SMESHGUI_GenericHypothesisCreator::getLabel ( int  i) const
protectedinherited

Returns a QLabel of a specified parameter.

If isCreation(), the 1st label (supposed to be "Name") is not countered.

References SMESHGUI_GenericHypothesisCreator::isCreation(), and SMESHGUI_GenericHypothesisCreator::myParamLabels.

Referenced by StdMeshersGUI_StdHypothesisCreator::valueChanged().

◆ getMainShapeEntry()

◆ getNoGeomMesh()

bool SMESHGUI_GenericHypothesisCreator::getNoGeomMesh ( ) const
inherited

◆ getParamFromCustomWidget()

◆ getShapeEntry()

◆ getStdParamFromDlg()

◆ getVariableName()

QString SMESHGUI_GenericHypothesisCreator::getVariableName ( const char *  methodName) const
protectedinherited

◆ getVariablesFromDlg()

QStringList SMESHGUI_GenericHypothesisCreator::getVariablesFromDlg ( ) const
protectedvirtualinherited

◆ getWidgetForParam()

QWidget * StdMeshersGUI_StdHypothesisCreator::getWidgetForParam ( int  i) const
protectedvirtualinherited

Return widget for i-th hypothesis parameter (got from myParamWidgets)

Parameters
i- index of hypothesis parameter
Return values
QWidget*- found widget

References SMESHGUI_GenericHypothesisCreator::isCreation(), StdMeshersGUI_StdHypothesisCreator::myCustomWidgets, and SMESHGUI_GenericHypothesisCreator::widgets().

Referenced by StdMeshersGUI_StdHypothesisCreator::storeParams(), and StdMeshersGUI_StdHypothesisCreator::valueChanged().

◆ hasInitParamsHypothesis()

bool SMESHGUI_GenericHypothesisCreator::hasInitParamsHypothesis ( ) const
protectedinherited

◆ helpPage()

QString StdMeshersGUI_BlockRenumberCreator::helpPage ( ) const
overridevirtual

Returns a name of help page.

Reimplemented from SMESHGUI_GenericHypothesisCreator.

◆ hypName()

◆ hypothesis()

◆ hypType()

◆ hypTypeName()

QString StdMeshersGUI_BlockRenumberCreator::hypTypeName ( const QString &  ) const
overridevirtual

Type name.

Reimplemented from StdMeshersGUI_StdHypothesisCreator.

◆ icon()

QPixmap StdMeshersGUI_StdHypothesisCreator::icon ( ) const
protectedvirtualinherited

return pixmap for dlg icon

Return values
QPixmap-

Reimplemented from SMESHGUI_GenericHypothesisCreator.

References SMESHGUI_GenericHypothesisCreator::hypType(), StdMeshersGUI_StdHypothesisCreator::hypTypeName(), and SMESHGUI::resourceMgr().

Referenced by buildFrame().

◆ initParamsHypothesis()

SMESH::SMESH_Hypothesis_var SMESHGUI_GenericHypothesisCreator::initParamsHypothesis ( const bool  strictly = false) const
protectedinherited

◆ initVariableName()

bool StdMeshersGUI_StdHypothesisCreator::initVariableName ( SMESH::SMESH_Hypothesis_var  theHyp,
StdParam theParams,
const char *  theMethod 
) const
protectedinherited

◆ isCreation()

◆ makeReverseEdgesWdg()

QWidget * StdMeshersGUI_StdHypothesisCreator::makeReverseEdgesWdg ( SMESH::long_array_var  edgeIDs,
CORBA::String_var  shapeEntry 
) const
protectedinherited

Creates two widgets used to define reversed edges for some 1D hypotheses.

Parameters
[in]edgeIDs- ids of reversed edges to set to the widgets
[in]shapeEntry- entry of a sub-shape of a sub-mesh if any
Returns
QWidget* - new StdMeshersGUI_SubShapeSelectorWdg; new StdMeshersGUI_PropagationHelperWdg is stored in myHelperWidget field.

References SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(), SMESHGUI_GenericHypothesisCreator::getShapeEntry(), StdMeshersGUI_StdHypothesisCreator::myHelperWidget, StdMeshersGUI_SubShapeSelectorWdg::SetGeomShapeEntry(), StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs(), and StdMeshersGUI_SubShapeSelectorWdg::ShowPreview().

Referenced by StdMeshersGUI_StdHypothesisCreator::stdParams().

◆ onAddBtnClick

void StdMeshersGUI_BlockRenumberCreator::onAddBtnClick ( )
privateslot

Add shapes to the tree.

References setBlockToTree(), and updateButtons().

Referenced by buildFrame().

◆ onDialogFinished

◆ onModifBtnClick

void StdMeshersGUI_BlockRenumberCreator::onModifBtnClick ( )
privateslot

Modify a current block.

References myBlockTree, myGO, setBlockToTree(), and updateButtons().

Referenced by buildFrame().

◆ onReject()

void StdMeshersGUI_StdHypothesisCreator::onReject ( )
protectedvirtualinherited

◆ onRemoveBtnClick

void StdMeshersGUI_BlockRenumberCreator::onRemoveBtnClick ( )
privateslot

Remove selected block from the tree.

References myBlockTree, and updateButtons().

Referenced by buildFrame().

◆ onSelectBtnClick

void StdMeshersGUI_BlockRenumberCreator::onSelectBtnClick ( )
privateslot

Install filter upon activation of another object selection.

References myButGroup, mySolidFilter, myVertexFilter, and SMESHGUI::selectionMgr().

Referenced by buildFrame().

◆ onSelectionChange

void StdMeshersGUI_BlockRenumberCreator::onSelectionChange ( )
privateslot

◆ onTreeSelectionChange

void StdMeshersGUI_BlockRenumberCreator::onTreeSelectionChange ( )
privateslot

Display selected block CS in myLineEdit's.

References myBlockTree, myGO, myLineEdit, SMESH::toString(), and updateButtons().

Referenced by buildFrame().

◆ onValueChanged

void SMESHGUI_GenericHypothesisCreator::onValueChanged ( )
protectedvirtualslotinherited

◆ removeOldGroup()

void StdMeshersGUI_StdHypothesisCreator::removeOldGroup ( const char *  oldName,
const char *  newName,
SMESH::ElementType  type 
) const
protectedinherited

Remove a group, whose name is stored by hypothesis, upon group name modification.

Parameters
[in]oldName- old group name
[in]newName- new group name
[in]type- group type

References SMESH::_PTR(), SMESH::GetMeshesUsingAlgoOrHypothesis(), SMESHGUI_GenericHypothesisCreator::hypothesis(), and StdMeshersGUI_StdHypothesisCreator::type().

Referenced by StdMeshersGUI_StdHypothesisCreator::storeParams().

◆ retrieveParams()

void StdMeshersGUI_BlockRenumberCreator::retrieveParams ( ) const
overrideprotectedvirtual

◆ setBlockToTree()

void StdMeshersGUI_BlockRenumberCreator::setBlockToTree ( QTreeWidgetItem *  item = 0)
private

Set myGO's to the tree.

References myBlockTree, myGO, and myLineEdit.

Referenced by onAddBtnClick(), onModifBtnClick(), and retrieveParams().

◆ setInitParamsHypothesis()

◆ setMainShapeEntry()

void SMESHGUI_GenericHypothesisCreator::setMainShapeEntry ( const QString &  theEntry)
inherited

◆ setNoGeomMesh()

void SMESHGUI_GenericHypothesisCreator::setNoGeomMesh ( const bool  noGeom)
inherited

◆ setShapeEntry()

void SMESHGUI_GenericHypothesisCreator::setShapeEntry ( const QString &  theEntry)
inherited

◆ stdParams()

bool StdMeshersGUI_StdHypothesisCreator::stdParams ( ListOfStdParams p) const
protectedvirtualinherited

Return parameter values as SMESHGUI_GenericHypothesisCreator::StdParam.

Parameters
p- list of parameters
Return values
bool- success flag

Is called from SMESHGUI_GenericHypothesisCreator::buildStdFrame(). Parameters will be shown using "standard" controls: Int by QtxIntSpinBox Double by SMESHGUI_SpinBox String by QLineEdit getCustomWidget() allows to redefine control for a parameter

Reimplemented from SMESHGUI_GenericHypothesisCreator.

References StdMeshersGUI_StdHypothesisCreator::customWidgets(), SMESHGUI_GenericHypothesisCreator::dlg(), StdMeshersGUI_RadioButtonsGrpWdg::getButtonGroup(), SMESH::GetHypothesisData(), SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(), StdMeshersGUI_NameCheckableGrpWdg::getName(), SMESHGUI_GenericHypothesisCreator::getShapeEntry(), SMESH::GROUP_EDGE, SMESH::GROUP_FACE, SMESHGUI_GenericHypothesisCreator::hypName(), SMESHGUI_GenericHypothesisCreator::hypType(), SMESHGUI_GenericHypothesisCreator::initParamsHypothesis(), StdMeshersGUI_StdHypothesisCreator::initVariableName(), SMESHGUI_GenericHypothesisCreator::isCreation(), StdMeshersGUI_StdHypothesisCreator::makeReverseEdgesWdg(), SMESH::MESH, SMESHGUI_GenericHypothesisCreator::StdParam::myName, SMESHGUI_GenericHypothesisCreator::StdParam::myValue, SMESHGUI_GenericHypothesisCreator::onValueChanged(), SMESHGUI_SpinBox::RangeStepAndValidator(), StdMeshersGUI_RadioButtonsGrpWdg::setButtonLabels(), StdMeshersGUI_RadioButtonsGrpWdg::setChecked(), StdMeshersGUI_NameCheckableGrpWdg::setDefaultName(), StdMeshersGUI_SubShapeSelectorWdg::SetGeomShapeEntry(), StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs(), StdMeshersGUI_FixedPointsParamWdg::SetListOfPoints(), StdMeshersGUI_FixedPointsParamWdg::SetListOfSegments(), StdMeshersGUI_NameCheckableGrpWdg::setName(), SMESHGUI_GenericHypothesisCreator::StdParam::setNoName(), SMESHGUI_SpinBox::SetValue(), StdMeshersGUI_SubShapeSelectorWdg::ShowPreview(), and StdMeshersGUI_StdHypothesisCreator::type().

◆ stdParamValues()

QString SMESHGUI_GenericHypothesisCreator::stdParamValues ( const ListOfStdParams params)
staticprotectedinherited

◆ storeParams()

QString StdMeshersGUI_BlockRenumberCreator::storeParams ( ) const
overrideprotectedvirtual

◆ type()

QString StdMeshersGUI_StdHypothesisCreator::type ( ) const
protectedvirtualinherited

◆ updateButtons

void StdMeshersGUI_BlockRenumberCreator::updateButtons ( )
privateslot

◆ valueChanged()

◆ widget()

template<class T >
T * StdMeshersGUI_StdHypothesisCreator::widget ( int  i) const
protectedinherited

◆ widgets()

Field Documentation

◆ myAddBut

QPushButton* StdMeshersGUI_BlockRenumberCreator::myAddBut
private

Referenced by buildFrame(), and updateButtons().

◆ myBlockTree

◆ myButGroup

QButtonGroup* StdMeshersGUI_BlockRenumberCreator::myButGroup
private

◆ myCustomWidgets

◆ myDlg

◆ myGO

GEOM::GEOM_Object_var StdMeshersGUI_BlockRenumberCreator::myGO[3]
private

◆ myHelperWidget

QWidget* StdMeshersGUI_StdHypothesisCreator::myHelperWidget
protectedinherited

◆ myHypName

QString SMESHGUI_GenericHypothesisCreator::myHypName
privateinherited

◆ myHypo

◆ myHypType

QString SMESHGUI_GenericHypothesisCreator::myHypType
privateinherited

◆ myInitParamsHypo

◆ myIsCreate

◆ myLineEdit

QLineEdit* StdMeshersGUI_BlockRenumberCreator::myLineEdit[3]
private

◆ myMainShapeEntry

QString SMESHGUI_GenericHypothesisCreator::myMainShapeEntry
privateinherited

◆ myModifBut

QPushButton* StdMeshersGUI_BlockRenumberCreator::myModifBut
private

Referenced by buildFrame(), and updateButtons().

◆ myName

QLineEdit* StdMeshersGUI_BlockRenumberCreator::myName
private

◆ myNoGeomMesh

bool SMESHGUI_GenericHypothesisCreator::myNoGeomMesh
privateinherited

true for a mesh not based on geometry

◆ myParamLabels

ListOfWidgets SMESHGUI_GenericHypothesisCreator::myParamLabels
privateinherited

◆ myParamWidgets

ListOfWidgets SMESHGUI_GenericHypothesisCreator::myParamWidgets
privateinherited

◆ myRemoveBut

QPushButton* StdMeshersGUI_BlockRenumberCreator::myRemoveBut
private

Referenced by buildFrame(), and updateButtons().

◆ myShapeEntry

QString SMESHGUI_GenericHypothesisCreator::myShapeEntry
privateinherited

◆ myShapeSelectBut

QPushButton* StdMeshersGUI_BlockRenumberCreator::myShapeSelectBut[3]
private

Referenced by buildFrame(), and retrieveParams().

◆ mySolidFilter

SMESH_NumberFilter StdMeshersGUI_BlockRenumberCreator::mySolidFilter
private

Referenced by onSelectBtnClick().

◆ myToDeleteInitParamsHypo

bool SMESHGUI_GenericHypothesisCreator::myToDeleteInitParamsHypo
privateinherited

◆ myVertexFilter

SMESH_NumberFilter StdMeshersGUI_BlockRenumberCreator::myVertexFilter
private

Referenced by onSelectBtnClick().