Dialog to make a mesh pass through a point. More...
#include <SMESHGUI_MakeNodeAtPointDlg.h>

Public Member Functions | |
| SMESHGUI_MakeNodeAtPointDlg () | |
| Dialog to publish a sub-shape of the mesh main shape by selecting mesh elements. | |
| virtual void | show () |
| virtual void | setContentActive (const bool) |
| set all content to enable (parameter is true) or disable state | |
Static Public Member Functions | |
| static int | prefix (const QString &) |
| Return hard-coded prefix using to differ overlapping types. | |
Protected Member Functions | |
| SUIT_Desktop * | desktop () const |
| find desktop of active application | |
| SUIT_ResourceMgr * | resourceMgr () const |
| gets resource manager | |
Private Slots | |
| void | ButtonToggled (bool) |
| SLOT called when any button is toggled. | |
Private Member Functions | |
| QWidget * | createMainFrame (QWidget *) |
Private Attributes | |
| QPushButton * | myCoordBtn |
| SMESHGUI_SpinBox * | myX |
| SMESHGUI_SpinBox * | myY |
| SMESHGUI_SpinBox * | myZ |
| QGroupBox * | myNodeToMoveGrp |
| QPushButton * | myIdBtn |
| QLineEdit * | myId |
| SMESHGUI_SpinBox * | myCurrentX |
| SMESHGUI_SpinBox * | myCurrentY |
| SMESHGUI_SpinBox * | myCurrentZ |
| SMESHGUI_SpinBox * | myDX |
| SMESHGUI_SpinBox * | myDY |
| SMESHGUI_SpinBox * | myDZ |
| QCheckBox * | myAutoSearchChkBox |
| QCheckBox * | myPreviewChkBox |
| QString | myHelpFileName |
Friends | |
| class | SMESHGUI_MakeNodeAtPointOp |
Dialog to make a mesh pass through a point.
Definition at line 86 of file SMESHGUI_MakeNodeAtPointDlg.h.
| SMESHGUI_MakeNodeAtPointDlg::SMESHGUI_MakeNodeAtPointDlg | ( | ) |
Dialog to publish a sub-shape of the mesh main shape by selecting mesh elements.
Definition at line 89 of file SMESHGUI_MakeNodeAtPointDlg.cxx.
References createMainFrame(), and SPACING.
: SMESHGUI_Dialog( 0, false, true ) { setWindowTitle(tr("CAPTION")); QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame()); aDlgLay->setMargin(0); aDlgLay->setSpacing(SPACING); QWidget* aMainFrame = createMainFrame (mainFrame()); aDlgLay->addWidget(aMainFrame); aDlgLay->setStretchFactor(aMainFrame, 1); }
| void SMESHGUI_MakeNodeAtPointDlg::ButtonToggled | ( | bool | on | ) | [private, slot] |
SLOT called when any button is toggled.
| bool | - on or off |
Definition at line 271 of file SMESHGUI_MakeNodeAtPointDlg.cxx.
References myAutoSearchChkBox, myCoordBtn, myCurrentX, myCurrentY, myCurrentZ, myDX, myDY, myDZ, myId, myIdBtn, and SMESHGUI_SpinBox.SetValue().
Referenced by createMainFrame().
{
const QObject* aSender = sender();
if ( on ) {
if ( aSender == myCoordBtn ) // button to set coord by node selection
{
if ( myIdBtn->isEnabled() )
myIdBtn->setChecked( !on );
}
else if ( aSender == myIdBtn ) // button to select a node to move
{
myCoordBtn->setChecked( !on );
}
}
if ( aSender == myAutoSearchChkBox ) // automatic node search
{
if ( on ) {
myCurrentX->SetValue(0);
myCurrentY->SetValue(0);
myCurrentZ->SetValue(0);
myDX->SetValue(0);
myDY->SetValue(0);
myDZ->SetValue(0);
myId->setText("");
myId->setReadOnly ( true );
myIdBtn->setChecked( false );
myIdBtn->setEnabled( false );
myCoordBtn->setChecked( true );
}
else {
myId->setReadOnly ( false );
myIdBtn->setEnabled( true );
}
}
}
Definition at line 109 of file SMESHGUI_MakeNodeAtPointDlg.cxx.
References ButtonToggled(), COORD_MAX, COORD_MIN, SMESH.GetResourceMgr(), SMESHGUI.GetSMESHGUI(), MARGIN, myAutoSearchChkBox, myCoordBtn, myCurrentX, myCurrentY, myCurrentZ, myDX, myDY, myDZ, myId, myIdBtn, myNodeToMoveGrp, myPreviewChkBox, myX, myY, myZ, SMESHGUI_SpinBox.RangeStepAndValidator(), and SPACING.
Referenced by SMESHGUI_MakeNodeAtPointDlg().
{
QWidget* aFrame = new QWidget(theParent);
SUIT_ResourceMgr* rm = SMESH::GetResourceMgr( SMESHGUI::GetSMESHGUI() );
QPixmap iconMoveNode (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
QPixmap iconSelect (rm->loadPixmap("SMESH", tr("ICON_SELECT")));
// constructor
QGroupBox* aPixGrp = new QGroupBox(tr("MOVE_NODE"), aFrame);
QButtonGroup* aBtnGrp = new QButtonGroup(this);
QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
aPixGrpLayout->setMargin(MARGIN);
aPixGrpLayout->setSpacing(SPACING);
QRadioButton* aRBut = new QRadioButton(aPixGrp);
aRBut->setIcon(iconMoveNode);
aRBut->setChecked(true);
aPixGrpLayout->addWidget(aRBut);
aBtnGrp->addButton(aRBut, 0);
// coordinates
QGroupBox* aCoordGrp = new QGroupBox(tr("DESTINATION"), aFrame);
QHBoxLayout* aCoordGrpLayout = new QHBoxLayout(aCoordGrp);
aCoordGrpLayout->setMargin(MARGIN);
aCoordGrpLayout->setSpacing(SPACING);
myCoordBtn = new QPushButton(aCoordGrp);
myCoordBtn->setIcon(iconSelect);
myCoordBtn->setCheckable(true);
QLabel* aXLabel = new QLabel(tr("SMESH_X"), aCoordGrp);
myX = new SMESHGUI_SpinBox(aCoordGrp);
QLabel* aYLabel = new QLabel(tr("SMESH_Y"), aCoordGrp);
myY = new SMESHGUI_SpinBox(aCoordGrp);
QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
myZ = new SMESHGUI_SpinBox(aCoordGrp);
myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
aCoordGrpLayout->addWidget(myCoordBtn);
aCoordGrpLayout->addWidget(aXLabel);
aCoordGrpLayout->addWidget(myX);
aCoordGrpLayout->addWidget(aYLabel);
aCoordGrpLayout->addWidget(myY);
aCoordGrpLayout->addWidget(aZLabel);
aCoordGrpLayout->addWidget(myZ);
aCoordGrpLayout->setStretchFactor(myX, 1);
aCoordGrpLayout->setStretchFactor(myY, 1);
aCoordGrpLayout->setStretchFactor(myZ, 1);
// node ID
myNodeToMoveGrp = new QGroupBox(tr("NODE_2MOVE"), aFrame);
QLabel* idLabel = new QLabel(tr("NODE_2MOVE_ID"), myNodeToMoveGrp);
myIdBtn = new QPushButton(myNodeToMoveGrp);
myIdBtn->setIcon(iconSelect);
myIdBtn->setCheckable(true);
myId = new QLineEdit(myNodeToMoveGrp);
myId->setValidator(new SMESHGUI_IdValidator(this, 1));
QWidget* aCoordWidget = new QWidget(myNodeToMoveGrp);
QLabel* aCurrentXLabel = new QLabel(tr("SMESH_X"), aCoordWidget);
myCurrentX = new SMESHGUI_SpinBox(aCoordWidget);
myCurrentX->setButtonSymbols(QAbstractSpinBox::NoButtons);
myCurrentX->setReadOnly(true);
QLabel* aCurrentYLabel = new QLabel(tr("SMESH_Y"), aCoordWidget);
myCurrentY = new SMESHGUI_SpinBox(aCoordWidget);
myCurrentY->setButtonSymbols(QAbstractSpinBox::NoButtons);
myCurrentY->setReadOnly(true);
QLabel* aCurrentZLabel = new QLabel(tr("SMESH_Z"), aCoordWidget);
myCurrentZ = new SMESHGUI_SpinBox(aCoordWidget);
myCurrentZ->setButtonSymbols(QAbstractSpinBox::NoButtons);
myCurrentZ->setReadOnly(true);
QLabel* aDXLabel = new QLabel(tr("SMESH_DX"), aCoordWidget);
myDX = new SMESHGUI_SpinBox(aCoordWidget);
myDX->setButtonSymbols(QAbstractSpinBox::NoButtons);
myDX->setReadOnly(true);
QLabel* aDYLabel = new QLabel(tr("SMESH_DY"), aCoordWidget);
myDY = new SMESHGUI_SpinBox(aCoordWidget);
myDY->setButtonSymbols(QAbstractSpinBox::NoButtons);
myDY->setReadOnly(true);
QLabel* aDZLabel = new QLabel(tr("SMESH_DZ"), aCoordWidget);
myDZ = new SMESHGUI_SpinBox(aCoordWidget);
myDZ->setButtonSymbols(QAbstractSpinBox::NoButtons);
myDZ->setReadOnly(true);
myCurrentX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myCurrentY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myCurrentZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
QGridLayout* aCoordLayout = new QGridLayout(aCoordWidget);
aCoordLayout->setMargin(0);
aCoordLayout->setSpacing(SPACING);
aCoordLayout->addWidget(aCurrentXLabel, 0, 0);
aCoordLayout->addWidget(myCurrentX, 0, 1);
aCoordLayout->addWidget(aCurrentYLabel, 0, 2);
aCoordLayout->addWidget(myCurrentY, 0, 3);
aCoordLayout->addWidget(aCurrentZLabel, 0, 4);
aCoordLayout->addWidget(myCurrentZ, 0, 5);
aCoordLayout->addWidget(aDXLabel, 1, 0);
aCoordLayout->addWidget(myDX, 1, 1);
aCoordLayout->addWidget(aDYLabel, 1, 2);
aCoordLayout->addWidget(myDY, 1, 3);
aCoordLayout->addWidget(aDZLabel, 1, 4);
aCoordLayout->addWidget(myDZ, 1, 5);
aCoordLayout->setColumnStretch(1, 1);
aCoordLayout->setColumnStretch(3, 1);
aCoordLayout->setColumnStretch(5, 1);
myAutoSearchChkBox = new QCheckBox( tr("AUTO_SEARCH"), myNodeToMoveGrp);
myPreviewChkBox = new QCheckBox( tr("PREVIEW"), myNodeToMoveGrp);
QGridLayout* myNodeToMoveGrpLayout = new QGridLayout(myNodeToMoveGrp);
myNodeToMoveGrpLayout->setSpacing(SPACING);
myNodeToMoveGrpLayout->setMargin(MARGIN);
myNodeToMoveGrpLayout->addWidget( idLabel, 0, 0 );
myNodeToMoveGrpLayout->addWidget( myIdBtn, 0, 1 );
myNodeToMoveGrpLayout->addWidget( myId, 0, 2 );
myNodeToMoveGrpLayout->addWidget( aCoordWidget, 1, 0, 1, 3 );
myNodeToMoveGrpLayout->addWidget( myAutoSearchChkBox, 2, 0, 1, 3 );
myNodeToMoveGrpLayout->addWidget( myPreviewChkBox, 3, 0, 1, 3 );
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
aLay->addWidget(aPixGrp);
aLay->addWidget(aCoordGrp);
aLay->addWidget(myNodeToMoveGrp);
connect(myCoordBtn, SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
connect(myIdBtn, SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
connect(myAutoSearchChkBox, SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
myIdBtn->setChecked(true);
myAutoSearchChkBox->setChecked(true);
return aFrame;
}
| SUIT_Desktop * SMESHGUI_Dialog::desktop | ( | ) | const [protected, inherited] |
find desktop of active application
Definition at line 93 of file SMESHGUI_Dialog.cxx.
References ex13_hole1partial.d.
| int SMESHGUI_Dialog::prefix | ( | const QString & | name | ) | [static, inherited] |
Return hard-coded prefix using to differ overlapping types.
Definition at line 110 of file SMESHGUI_Dialog.cxx.
Referenced by SMESHGUI_Dialog.SMESHGUI_Dialog(), and SMESHGUI_SelectionOp.typeById().
| SUIT_ResourceMgr * SMESHGUI_Dialog::resourceMgr | ( | ) | const [protected, inherited] |
gets resource manager
Definition at line 126 of file SMESHGUI_Dialog.cxx.
Referenced by SMESHGUI_ComputeDlg.createMainFrame(), and SMESHGUI_GroupOnShapeDlg.SMESHGUI_GroupOnShapeDlg().
{
return SUIT_Session::session()->resourceMgr();
}
| void SMESHGUI_Dialog::setContentActive | ( | const bool | active | ) | [virtual, inherited] |
set all content to enable (parameter is true) or disable state
Definition at line 79 of file SMESHGUI_Dialog.cxx.
Referenced by SMESHGUI_Operation.setDialogActive().
{
mainFrame()->setEnabled( active );
setButtonEnabled( active, OK );
setButtonEnabled( active, Apply );
setButtonEnabled( active, Cancel );
setButtonEnabled( active, Close );
setButtonEnabled( active, Help );
}
| void SMESHGUI_Dialog::show | ( | ) | [virtual, inherited] |
Definition at line 69 of file SMESHGUI_Dialog.cxx.
Referenced by SMESHGUI_MeshOp.onCloseShapeByMeshDlg(), SMESHGUI_MeshOp.onPublishShapeByMeshDlg(), SMESHGUI_BaseComputeOp.showComputeResult(), SMESHGUI_BaseComputeOp.showEvaluateResult(), SMESHGUI_ShapeByMeshOp.startOperation(), SMESHGUI_MeshOrderOp.startOperation(), SMESHGUI_MeshOp.startOperation(), SMESHGUI_MakeNodeAtPointOp.startOperation(), SMESHGUI_GroupOnShapeOp.startOperation(), SMESHGUI_FindElemByPointOp.startOperation(), and SMESHGUI_ConvToQuadOp.startOperation().
{
adjustSize();
LightApp_Dialog::show();
}
friend class SMESHGUI_MakeNodeAtPointOp [friend] |
Definition at line 114 of file SMESHGUI_MakeNodeAtPointDlg.h.
QCheckBox* SMESHGUI_MakeNodeAtPointDlg.myAutoSearchChkBox [private] |
Definition at line 109 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.isValid(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.SMESHGUI_MakeNodeAtPointOp().
QPushButton* SMESHGUI_MakeNodeAtPointDlg.myCoordBtn [private] |
Definition at line 96 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), and SMESHGUI_MakeNodeAtPointOp.onSelectionDone().
Definition at line 103 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
Definition at line 104 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
Definition at line 105 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
SMESHGUI_SpinBox* SMESHGUI_MakeNodeAtPointDlg.myDX [private] |
Definition at line 106 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
SMESHGUI_SpinBox* SMESHGUI_MakeNodeAtPointDlg.myDY [private] |
Definition at line 107 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
SMESHGUI_SpinBox* SMESHGUI_MakeNodeAtPointDlg.myDZ [private] |
Definition at line 108 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
QString SMESHGUI_MakeNodeAtPointDlg.myHelpFileName [private] |
Definition at line 112 of file SMESHGUI_MakeNodeAtPointDlg.h.
QLineEdit* SMESHGUI_MakeNodeAtPointDlg.myId [private] |
Definition at line 102 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), SMESHGUI_MakeNodeAtPointOp.isValid(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), SMESHGUI_MakeNodeAtPointOp.SMESHGUI_MakeNodeAtPointOp(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
QPushButton* SMESHGUI_MakeNodeAtPointDlg.myIdBtn [private] |
Definition at line 101 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by ButtonToggled(), createMainFrame(), and SMESHGUI_MakeNodeAtPointOp.onSelectionDone().
Definition at line 100 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by createMainFrame().
QCheckBox* SMESHGUI_MakeNodeAtPointDlg.myPreviewChkBox [private] |
Definition at line 110 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by createMainFrame(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp.SMESHGUI_MakeNodeAtPointOp().
SMESHGUI_SpinBox* SMESHGUI_MakeNodeAtPointDlg.myX [private] |
Definition at line 97 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by createMainFrame(), SMESHGUI_MakeNodeAtPointOp.isValid(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), SMESHGUI_MakeNodeAtPointOp.SMESHGUI_MakeNodeAtPointOp(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
SMESHGUI_SpinBox* SMESHGUI_MakeNodeAtPointDlg.myY [private] |
Definition at line 98 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by createMainFrame(), SMESHGUI_MakeNodeAtPointOp.isValid(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), SMESHGUI_MakeNodeAtPointOp.SMESHGUI_MakeNodeAtPointOp(), and SMESHGUI_MakeNodeAtPointOp.startOperation().
SMESHGUI_SpinBox* SMESHGUI_MakeNodeAtPointDlg.myZ [private] |
Definition at line 99 of file SMESHGUI_MakeNodeAtPointDlg.h.
Referenced by createMainFrame(), SMESHGUI_MakeNodeAtPointOp.isValid(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), SMESHGUI_MakeNodeAtPointOp.SMESHGUI_MakeNodeAtPointOp(), and SMESHGUI_MakeNodeAtPointOp.startOperation().