Version: 8.3.0
StdMeshersGUI_CartesianParamCreator Class Reference

#include <StdMeshersGUI_CartesianParamCreator.h>

Inheritance diagram for StdMeshersGUI_CartesianParamCreator:

Signals

void finished (int)
 

Public Member Functions

 StdMeshersGUI_CartesianParamCreator (const QString &aHypType)
 StdMeshersGUI_CartesianParamCreator constructor. More...
 
virtual ~StdMeshersGUI_CartesianParamCreator ()
 StdMeshersGUI_CartesianParamCreator destructor. More...
 
virtual bool checkParams (QString &) const
 Validate parameters. More...
 
virtual QString helpPage () const
 Returns a name of help page. 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 ()
 Create widgets. More...
 
virtual void retrieveParams () const
 Transfer parameters from hypothesis to widgets. More...
 
virtual QString storeParams () const
 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 QString hypTypeName (const QString &) const
 String to insert in "SMESH_%1_HYPOTHESIS" to get hypothesis type name from message resouce file. More...
 
virtual QWidgetgetWidgetForParam (int paramIndex) const
 Return widget for i-th hypothesis parameter (got from myParamWidgets) More...
 
virtual ListOfWidgetscustomWidgets () 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
 
QWidgetmakeReverseEdgesWdg (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 ListOfWidgetswidgets () const
 
ListOfWidgetschangeWidgets ()
 
QLabel * getLabel (int i) const
 Returns a QLabel of a spesified 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

bool updateAxesPreview ()
 Show axes if they are OK. More...
 
void onOrthogonalAxes (bool)
 Makes axes orthogonal if necessary. More...
 
void onAxisDirChange (const QString &)
 Increment myDirTic and update the preview of axes. More...
 
void onSelectionChange ()
 Sets axis direction by a selected EDGE. More...
 
void onOptimalAxes (bool)
 Sets axes at which number of hexahedra is maximal. More...
 
void onResetAxes (bool)
 Sets axes || to the axes of global CS. More...
 
void onGridModeChanged (int)
 SLOT called when the grid definintion mode changes. More...
 

Private Attributes

QLineEdit * myName
 
SMESHGUI_SpinBoxmyThreshold
 
QCheckBox * myAddEdges
 
StdMeshersGUI::GridAxisTabmyAxisTabs [3]
 
QGroupBoxmyFixedPointGrp
 
SMESHGUI_SpinBoxmyPointSpin [3]
 
QCheckBox * myOrthogonalChk
 
QButtonGroup * myAxisBtnGrp
 
SMESHGUI_SpinBoxmyXDirSpin [3]
 
SMESHGUI_SpinBoxmyYDirSpin [3]
 
SMESHGUI_SpinBoxmyZDirSpin [3]
 
SMESHGUI_MeshEditPreviewmyAxesPreview
 
double myOrigin [3]
 
double myAxesLen
 
int myDirTic [3]
 

Member Typedef Documentation

typedef QList<QWidget*> SMESHGUI_GenericHypothesisCreator::ListOfWidgets
protectedinherited

Constructor & Destructor Documentation

StdMeshersGUI_CartesianParamCreator::StdMeshersGUI_CartesianParamCreator ( const QString &  aHypType)
StdMeshersGUI_CartesianParamCreator::~StdMeshersGUI_CartesianParamCreator ( )
virtual

Member Function Documentation

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.

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

bool StdMeshersGUI_CartesianParamCreator::checkParams ( QString &  msg) const
virtual
void SMESHGUI_GenericHypothesisCreator::create ( SMESH::SMESH_Hypothesis_ptr  initParamsHyp,
const QString &  theHypName,
QWidget parent,
QObject obj,
const QString &  slot 
)
inherited
void SMESHGUI_GenericHypothesisCreator::create ( bool  isAlgo,
const QString &  theHypName,
QWidget theParent,
QObject obj,
const QString &  slot 
)
inherited
StdMeshersGUI_StdHypothesisCreator::ListOfWidgets * StdMeshersGUI_StdHypothesisCreator::customWidgets ( ) const
protectedvirtualinherited
void SMESHGUI_GenericHypothesisCreator::edit ( SMESH::SMESH_Hypothesis_ptr  theHypothesis,
const QString &  theHypName,
QWidget theParent,
QObject obj,
const QString &  slot 
)
inherited
void SMESHGUI_GenericHypothesisCreator::finished ( int  )
signalinherited
QWidget * StdMeshersGUI_StdHypothesisCreator::getCustomWidget ( const StdParam param,
QWidget parent,
const int  index 
) const
protectedvirtualinherited
virtual QWidget* StdMeshersGUI_StdHypothesisCreator::getHelperWidget ( ) const
protectedvirtualinherited

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

Reimplemented from SMESHGUI_GenericHypothesisCreator.

QLabel * SMESHGUI_GenericHypothesisCreator::getLabel ( int  i) const
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 StdMeshersGUI_StdHypothesisCreator::valueChanged().

bool SMESHGUI_GenericHypothesisCreator::getNoGeomMesh ( ) const
inherited
QString SMESHGUI_GenericHypothesisCreator::getVariableName ( const char *  methodName) const
protectedinherited
QStringList SMESHGUI_GenericHypothesisCreator::getVariablesFromDlg ( ) const
protectedvirtualinherited
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().

bool SMESHGUI_GenericHypothesisCreator::hasInitParamsHypothesis ( ) const
protectedinherited
QString StdMeshersGUI_CartesianParamCreator::helpPage ( ) const
virtual

Returns a name of help page.

Reimplemented from SMESHGUI_GenericHypothesisCreator.

QString StdMeshersGUI_StdHypothesisCreator::hypTypeName ( const QString &  t) const
protectedvirtualinherited

String to insert in "SMESH_%1_HYPOTHESIS" to get hypothesis type name from message resouce file.

Parameters
t- hypothesis type
Return values
QString- result string

Referenced by StdMeshersGUI_StdHypothesisCreator::caption(), StdMeshersGUI_StdHypothesisCreator::icon(), and StdMeshersGUI_StdHypothesisCreator::type().

QPixmap StdMeshersGUI_StdHypothesisCreator::icon ( ) const
protectedvirtualinherited
SMESH::SMESH_Hypothesis_var SMESHGUI_GenericHypothesisCreator::initParamsHypothesis ( const bool  strictly = false) const
protectedinherited
bool StdMeshersGUI_StdHypothesisCreator::initVariableName ( SMESH::SMESH_Hypothesis_var  theHyp,
StdParam theParams,
const char *  theMethod 
) const
protectedinherited
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 aGeomEntry, SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(), SMESHGUI_GenericHypothesisCreator::getShapeEntry(), StdMeshersGUI_StdHypothesisCreator::myHelperWidget, StdMeshersGUI_SubShapeSelectorWdg::SetGeomShapeEntry(), StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs(), and StdMeshersGUI_SubShapeSelectorWdg::ShowPreview().

Referenced by StdMeshersGUI_StdHypothesisCreator::stdParams().

void StdMeshersGUI_CartesianParamCreator::onAxisDirChange ( const QString &  )
privateslot

Increment myDirTic and update the preview of axes.

References Max(), myDirTic, myOrthogonalChk, myXDirSpin, myYDirSpin, myZDirSpin, and onOrthogonalAxes().

Referenced by buildFrame().

void StdMeshersGUI_CartesianParamCreator::onGridModeChanged ( int  )
privateslot

SLOT called when the grid definintion mode changes.

References StdMeshersGUI::GridAxisTab::isGridBySpacing(), myAxisTabs, and myFixedPointGrp.

Referenced by buildFrame().

void StdMeshersGUI_CartesianParamCreator::onOptimalAxes ( bool  )
privateslot
void StdMeshersGUI_CartesianParamCreator::onOrthogonalAxes ( bool  isOrtho)
privateslot
void StdMeshersGUI_StdHypothesisCreator::onReject ( )
protectedvirtualinherited
void StdMeshersGUI_CartesianParamCreator::onResetAxes ( bool  )
privateslot

Sets axes || to the axes of global CS.

References myDirTic, myXDirSpin, myYDirSpin, myZDirSpin, SMESHGUI_SpinBox::SetValue(), and updateAxesPreview().

Referenced by buildFrame().

void StdMeshersGUI_CartesianParamCreator::onSelectionChange ( )
privateslot
void SMESHGUI_GenericHypothesisCreator::onValueChanged ( )
protectedvirtualslotinherited
void SMESHGUI_GenericHypothesisCreator::setMainShapeEntry ( const QString &  theEntry)
inherited
void SMESHGUI_GenericHypothesisCreator::setNoGeomMesh ( const bool  noGeom)
inherited
void SMESHGUI_GenericHypothesisCreator::setShapeEntry ( const QString &  theEntry)
inherited
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(), 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_SubShapeSelectorWdg::SetGeomShapeEntry(), StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs(), StdMeshersGUI_FixedPointsParamWdg::SetListOfPoints(), StdMeshersGUI_FixedPointsParamWdg::SetListOfSegments(), SMESHGUI_SpinBox::SetValue(), and StdMeshersGUI_SubShapeSelectorWdg::ShowPreview().

QString SMESHGUI_GenericHypothesisCreator::stdParamValues ( const ListOfStdParams params)
staticprotectedinherited
QString StdMeshersGUI_StdHypothesisCreator::type ( ) const
protectedvirtualinherited

Return hypothesis type name to show in dlg.

Return values
QString-

Reimplemented from SMESHGUI_GenericHypothesisCreator.

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

bool StdMeshersGUI_CartesianParamCreator::updateAxesPreview ( )
privateslot
void StdMeshersGUI_StdHypothesisCreator::valueChanged ( QWidget paramWidget)
protectedvirtualinherited
template<class T >
T* StdMeshersGUI_StdHypothesisCreator::widget ( int  i) const
protectedinherited

Field Documentation

QCheckBox* StdMeshersGUI_CartesianParamCreator::myAddEdges
private
double StdMeshersGUI_CartesianParamCreator::myAxesLen
private

Referenced by buildFrame(), and updateAxesPreview().

SMESHGUI_MeshEditPreview* StdMeshersGUI_CartesianParamCreator::myAxesPreview
private
QButtonGroup* StdMeshersGUI_CartesianParamCreator::myAxisBtnGrp
private

Referenced by buildFrame(), and onSelectionChange().

int StdMeshersGUI_CartesianParamCreator::myDirTic[3]
private
QGroupBox* StdMeshersGUI_CartesianParamCreator::myFixedPointGrp
private
QWidget* StdMeshersGUI_StdHypothesisCreator::myHelperWidget
protectedinherited
QLineEdit* StdMeshersGUI_CartesianParamCreator::myName
private
double StdMeshersGUI_CartesianParamCreator::myOrigin[3]
private

Referenced by buildFrame(), and updateAxesPreview().

QCheckBox* StdMeshersGUI_CartesianParamCreator::myOrthogonalChk
private
SMESHGUI_SpinBox* StdMeshersGUI_CartesianParamCreator::myPointSpin[3]
private
SMESHGUI_SpinBox* StdMeshersGUI_CartesianParamCreator::myThreshold
private