Class for creation of standard hypotheses. More...
#include <StdMeshersGUI_StdHypothesisCreator.h>

Signals | |
| void | finished (int) |
Public Member Functions | |
| StdMeshersGUI_StdHypothesisCreator (const QString &) | |
| Constructor. More... | |
| virtual | ~StdMeshersGUI_StdHypothesisCreator () |
| Destructor. More... | |
| virtual bool | checkParams (QString &) const |
| Check parameter values before accept() 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) |
| virtual QString | helpPage () const |
| 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< StdParam > | ListOfStdParams |
| typedef QList< QWidget * > | ListOfWidgets |
Protected Slots | |
| virtual void | onValueChanged () |
Protected Member Functions | |
| virtual QFrame * | buildFrame () |
| Builds dlg layout. More... | |
| virtual void | retrieveParams () const |
| Initialise parameter values in controls. More... | |
| virtual QString | storeParams () const |
| Store params from GUI controls to a 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 QWidget * | getCustomWidget (const StdParam &, QWidget *, const int) const |
| virtual QWidget * | getHelperWidget () 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 QString | hypTypeName (const QString &) const |
| String to insert in "SMESH_%1_HYPOTHESIS" to get hypothesis type name from message resouce file. More... | |
| virtual QWidget * | getWidgetForParam (int paramIndex) const |
| Return widget for i-th hypothesis parameter (got from myParamWidgets) More... | |
| virtual ListOfWidgets * | customWidgets () const |
| Allow modifing 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 |
| QWidget * | makeReverseEdgesWdg (SMESH::long_array_var edgeIDs, CORBA::String_var shapeEntry) const |
| Creates two widgets used to define reversed edges for some 1D hypotheses. 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 ListOfWidgets & | widgets () const |
| ListOfWidgets & | changeWidgets () |
| QLabel * | getLabel (int i) const |
| Returns a QLabel of a spesified parameter. More... | |
| QtxDialog * | dlg () const |
| QString | getVariableName (const char *methodName) const |
| QFrame * | buildStdFrame () |
| bool | getStdParamFromDlg (ListOfStdParams &) const |
| virtual QStringList | getVariablesFromDlg () const |
Static Protected Member Functions | |
| static QString | stdParamValues (const ListOfStdParams &) |
Protected Attributes | |
| ListOfWidgets | myCustomWidgets |
| QWidget * | myHelperWidget |
Class for creation of standard hypotheses.
|
protectedinherited |
|
protectedinherited |
| StdMeshersGUI_StdHypothesisCreator::StdMeshersGUI_StdHypothesisCreator | ( | const QString & | type | ) |
Constructor.
| type | - hypothesis type |
|
virtual |
Destructor.
|
protectedvirtual |
tune "standard" control
| 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.
|
protectedvirtual |
Builds dlg layout.
| QFrame* | - the built widget |
Implements SMESHGUI_GenericHypothesisCreator.
Reimplemented in StdMeshersGUI_CartesianParamCreator, StdMeshersGUI_NbSegmentsCreator, and StdMeshersGUI_QuadrangleParamCreator.
References SMESHGUI_GenericHypothesisCreator::buildStdFrame().
|
protectedinherited |
References _PTR(), SMESHGUI_GenericHypothesisCreator::attuneStdWidget(), SMESHGUI_GenericHypothesisCreator::changeWidgets(), SMESHGUI_GenericHypothesisCreator::getCustomWidget(), SMESHGUI_GenericHypothesisCreator::getHelperWidget(), SMESHGUI_GenericHypothesisCreator::hypothesis(), MARGIN, SMESHGUI_GenericHypothesisCreator::myParamLabels, SMESHGUI_GenericHypothesisCreator::onValueChanged(), SPACING, SMESHGUI_GenericHypothesisCreator::stdParams(), and SMESHGUI_GenericHypothesisCreator::valueChanged().
Referenced by buildFrame().
|
protectedvirtual |
Return dlg title.
| QString | - title string |
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References SMESHGUI_GenericHypothesisCreator::hypType(), and hypTypeName().
|
protectedinherited |
|
virtual |
Check parameter values before accept()
| bool | - true if OK |
Reimplemented from SMESHGUI_GenericHypothesisCreator.
Reimplemented in StdMeshersGUI_CartesianParamCreator, and StdMeshersGUI_NbSegmentsCreator.
References _PTR(), SMESHGUI_GenericHypothesisCreator::checkParams(), customWidgets(), SMESH::GetGEOMGen(), StdMeshersGUI_ObjectReferenceParamWdg::GetObject(), StdMeshersGUI_ObjectReferenceParamWdg::GetValue(), SMESHGUI_GenericHypothesisCreator::hypType(), StdMeshersGUI_ObjectReferenceParamWdg::IsObjectSelected(), StdMeshersGUI_LayerDistributionParamWdg::IsOk(), and StdMeshersGUI_ObjectReferenceParamWdg::SetObject().
|
inherited |
References SMESHGUI_GenericHypothesisCreator::setInitParamsHypothesis().
Referenced by SMESHGUI_MeshOp::createHypothesis(), and SMESHGUI_MeshOp::getAlgo().
|
protectedvirtual |
Allow modifing myCustomWidgets in const methods.
| ListOfWidgets* | - non-const pointer to myCustomWidgets |
References myCustomWidgets.
Referenced by checkParams(), getCustomWidget(), onReject(), and stdParams().
|
protectedinherited |
|
signalinherited |
|
protectedvirtual |
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References customWidgets().
|
protectedvirtual |
Returns a widget representing not a hypothesis parameter but some helper widget.
Reimplemented from SMESHGUI_GenericHypothesisCreator.
|
protectedinherited |
Returns a QLabel of a spesified parameter.
If isCreation(), the 1st label (supposed to be "Name") is not countered.
References SMESHGUI_GenericHypothesisCreator::isCreation(), and SMESHGUI_GenericHypothesisCreator::myParamLabels.
Referenced by valueChanged().
|
inherited |
|
inherited |
|
protectedvirtual |
Set param value taken from a custom widget.
| param | - SMESHGUI_GenericHypothesisCreator::StdParam structure |
| widget | - widget presenting param |
| bool | - success flag |
this method is called from getStdParamFromDlg()
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References StdMeshersGUI_RadioButtonsGrpWdg::checkedId(), SMESHGUI_SpinBox::GetValue(), StdMeshersGUI_LayerDistributionParamWdg::GetValue(), StdMeshersGUI_FixedPointsParamWdg::GetValue(), StdMeshersGUI_SubShapeSelectorWdg::GetValue(), StdMeshersGUI_ObjectReferenceParamWdg::GetValue(), SMESHGUI_GenericHypothesisCreator::hypType(), SMESHGUI_GenericHypothesisCreator::StdParam::myValue, and widget().
|
inherited |
|
protectedinherited |
References SMESHGUI_GenericHypothesisCreator::getParamFromCustomWidget(), SMESHGUI_GenericHypothesisCreator::StdParam::myName, SMESHGUI_GenericHypothesisCreator::StdParam::myText, SMESHGUI_GenericHypothesisCreator::StdParam::myValue, and SMESHGUI_GenericHypothesisCreator::widgets().
Referenced by storeParams().
|
protectedinherited |
References SMESHGUI_GenericHypothesisCreator::hypothesis().
Referenced by initVariableName(), and StdMeshersGUI_CartesianParamCreator::retrieveParams().
|
protectedvirtualinherited |
References SMESHGUI_GenericHypothesisCreator::widgets().
Return widget for i-th hypothesis parameter (got from myParamWidgets)
| i | - index of hypothesis parameter |
| QWidget* | - found widget |
References SMESHGUI_GenericHypothesisCreator::isCreation(), myCustomWidgets, and SMESHGUI_GenericHypothesisCreator::widgets().
Referenced by storeParams(), and valueChanged().
|
protectedinherited |
|
virtualinherited |
Reimplemented in StdMeshersGUI_CartesianParamCreator, and StdMeshersGUI_QuadrangleParamCreator.
References SMESHGUI_GenericHypothesisCreator::hypType().
Referenced by SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg().
|
inherited |
References SMESHGUI_GenericHypothesisCreator::myHypName.
Referenced by StdMeshersGUI_NbSegmentsCreator::readParamsFromHypo(), StdMeshersGUI_QuadrangleParamCreator::retrieveParams(), StdMeshersGUI_CartesianParamCreator::retrieveParams(), SMESHGUI_GenericHypothesisCreator::setInitParamsHypothesis(), and stdParams().
|
protectedinherited |
References SMESHGUI_GenericHypothesisCreator::myHypo.
Referenced by StdMeshersGUI_NbSegmentsCreator::buildFrame(), StdMeshersGUI_CartesianParamCreator::buildFrame(), SMESHGUI_GenericHypothesisCreator::buildStdFrame(), StdMeshersGUI_CartesianParamCreator::checkParams(), SMESHGUI_GenericHypothesisCreator::getVariableName(), StdMeshersGUI_CartesianParamCreator::onOptimalAxes(), storeParams(), StdMeshersGUI_QuadrangleParamCreator::storeParams(), StdMeshersGUI_CartesianParamCreator::storeParams(), and StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo().
|
inherited |
References SMESHGUI_GenericHypothesisCreator::myHypType.
Referenced by attuneStdWidget(), caption(), checkParams(), SMESHGUI_GenericHypothesisCreator::create(), getParamFromCustomWidget(), SMESHGUI_GenericHypothesisCreator::helpPage(), icon(), onReject(), retrieveParams(), SMESHGUI_GenericHypothesisCreator::setInitParamsHypothesis(), SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg(), stdParams(), storeParams(), type(), and valueChanged().
|
protectedvirtual |
|
protectedvirtual |
return pixmap for dlg icon
| QPixmap | - |
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References SMESHGUI_GenericHypothesisCreator::hypType(), hypTypeName(), and SMESHGUI::resourceMgr().
|
protectedinherited |
Return hypothesis containing initial parameters.
| strictly | - if true, always return myInitParamsHypo, else, return myInitParamsHypo only in creation mode and if it is non-nil |
References SMESHGUI_GenericHypothesisCreator::isCreation(), SMESHGUI_GenericHypothesisCreator::myHypo, and SMESHGUI_GenericHypothesisCreator::myInitParamsHypo.
Referenced by StdMeshersGUI_NbSegmentsCreator::readParamsFromHypo(), StdMeshersGUI_QuadrangleParamCreator::retrieveParams(), StdMeshersGUI_CartesianParamCreator::retrieveParams(), stdParams(), storeParams(), and valueChanged().
|
inherited |
References SMESHGUI_GenericHypothesisCreator::myIsCreate.
Referenced by StdMeshersGUI_QuadrangleParamCreator::buildFrame(), StdMeshersGUI_NbSegmentsCreator::buildFrame(), StdMeshersGUI_CartesianParamCreator::buildFrame(), SMESHGUI_GenericHypothesisCreator::getLabel(), getWidgetForParam(), SMESHGUI_GenericHypothesisCreator::initParamsHypothesis(), StdMeshersGUI_QuadrangleParamCreator::retrieveParams(), stdParams(), storeParams(), StdMeshersGUI_CartesianParamCreator::storeParams(), and StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo().
|
protected |
Creates two widgets used to define reversed edges for some 1D hypotheses.
| [in] | edgeIDs | - ids of reversed edges to set to the widgets |
| [in] | shapeEntry | - entry of a sub-shape of a sub-mesh if any |
References aGeomEntry, SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(), SMESHGUI_GenericHypothesisCreator::getShapeEntry(), myHelperWidget, StdMeshersGUI_SubShapeSelectorWdg::SetGeomShapeEntry(), StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs(), and StdMeshersGUI_SubShapeSelectorWdg::ShowPreview().
Referenced by stdParams().
|
protectedvirtual |
called when operation cancelled
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References customWidgets(), and SMESHGUI_GenericHypothesisCreator::hypType().
|
protectedvirtualslotinherited |
References SMESHGUI_GenericHypothesisCreator::valueChanged().
Referenced by SMESHGUI_GenericHypothesisCreator::buildStdFrame(), and stdParams().
|
protectedvirtual |
Initialise parameter values in controls.
Implements SMESHGUI_GenericHypothesisCreator.
Reimplemented in StdMeshersGUI_CartesianParamCreator, StdMeshersGUI_NbSegmentsCreator, and StdMeshersGUI_QuadrangleParamCreator.
References StdMeshersGUI_ObjectReferenceParamWdg::activateSelection(), StdMeshersGUI_ObjectReferenceParamWdg::AvoidSimultaneousSelection(), SMESHGUI_GenericHypothesisCreator::dlg(), SMESHGUI_GenericHypothesisCreator::hypType(), and myCustomWidgets.
|
inherited |
References SMESHGUI_GenericHypothesisCreator::hypName(), SMESHGUI_GenericHypothesisCreator::hypType(), SMESHGUI_GenericHypothesisCreator::myInitParamsHypo, and SMESHGUI_GenericHypothesisCreator::myToDeleteInitParamsHypo.
Referenced by SMESHGUI_GenericHypothesisCreator::create(), and SMESHGUI_MeshOp::onEditHyp().
|
inherited |
Referenced by SMESHGUI_MeshOp::initHypCreator(), and SMESHGUI::OnGUIEvent().
|
inherited |
Referenced by SMESHGUI_MeshOp::initHypCreator().
|
inherited |
References SMESHGUI_GenericHypothesisCreator::myShapeEntry.
Referenced by SMESHGUI_MeshOp::initHypCreator(), and SMESHGUI::OnGUIEvent().
|
protectedvirtual |
Return parameter values as SMESHGUI_GenericHypothesisCreator::StdParam.
| p | - list of parameters |
| 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 customWidgets(), SMESHGUI_GenericHypothesisCreator::dlg(), StdMeshersGUI_RadioButtonsGrpWdg::getButtonGroup(), SMESH::GetHypothesisData(), SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(), SMESHGUI_GenericHypothesisCreator::getShapeEntry(), SMESH::GROUP_EDGE, SMESH::GROUP_FACE, SMESHGUI_GenericHypothesisCreator::hypName(), SMESHGUI_GenericHypothesisCreator::hypType(), SMESHGUI_GenericHypothesisCreator::initParamsHypothesis(), initVariableName(), SMESHGUI_GenericHypothesisCreator::isCreation(), makeReverseEdgesWdg(), SMESH::MESH, SMESHGUI_GenericHypothesisCreator::StdParam::myName, SMESHGUI_GenericHypothesisCreator::StdParam::myValue, SMESHGUI_GenericHypothesisCreator::onValueChanged(), SMESHGUI_SpinBox::RangeStepAndValidator(), StdMeshersGUI_RadioButtonsGrpWdg::setButtonLabels(), StdMeshersGUI_RadioButtonsGrpWdg::setChecked(), StdMeshersGUI_SubShapeSelectorWdg::SetGeomShapeEntry(), StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs(), StdMeshersGUI_FixedPointsParamWdg::SetListOfPoints(), StdMeshersGUI_FixedPointsParamWdg::SetListOfSegments(), SMESHGUI_SpinBox::SetValue(), and StdMeshersGUI_SubShapeSelectorWdg::ShowPreview().
|
staticprotectedinherited |
Referenced by storeParams().
|
protectedvirtual |
Store params from GUI controls to a hypothesis.
| QString | - text representation of parameters |
Implements SMESHGUI_GenericHypothesisCreator.
Reimplemented in StdMeshersGUI_CartesianParamCreator, StdMeshersGUI_NbSegmentsCreator, and StdMeshersGUI_QuadrangleParamCreator.
References StdMeshersGUI_LayerDistributionParamWdg::GetHypothesis(), StdMeshersGUI_SubShapeSelectorWdg::GetListOfIDs(), StdMeshersGUI_FixedPointsParamWdg::GetListOfPoints(), StdMeshersGUI_FixedPointsParamWdg::GetListOfSegments(), StdMeshersGUI_SubShapeSelectorWdg::GetMainShapeEntry(), SMESHGUI_GenericHypothesisCreator::getStdParamFromDlg(), getWidgetForParam(), SMESHGUI_GenericHypothesisCreator::hypothesis(), SMESHGUI_GenericHypothesisCreator::hypType(), SMESHGUI_GenericHypothesisCreator::initParamsHypothesis(), SMESHGUI_GenericHypothesisCreator::isCreation(), SMESH::SetName(), and SMESHGUI_GenericHypothesisCreator::stdParamValues().
|
protectedvirtual |
Return hypothesis type name to show in dlg.
| QString | - |
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References SMESHGUI_GenericHypothesisCreator::hypType(), and hypTypeName().
|
protectedvirtual |
Update widgets dependent on paramWidget.
Reimplemented from SMESHGUI_GenericHypothesisCreator.
References SMESHGUI_GenericHypothesisCreator::getLabel(), getWidgetForParam(), SMESHGUI_GenericHypothesisCreator::hypType(), and SMESHGUI_GenericHypothesisCreator::initParamsHypothesis().
Referenced by StdMeshersGUI_NbSegmentsCreator::buildFrame(), and StdMeshersGUI_CartesianParamCreator::buildFrame().
|
protected |
Referenced by getParamFromCustomWidget().
|
protectedinherited |
|
protected |
Referenced by customWidgets(), getWidgetForParam(), and retrieveParams().
|
protected |
Referenced by makeReverseEdgesWdg().