X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=31b427e799edbb67aab81b9f202a29d5e6514515;hb=05ebfe85d9599602aa910ba503f2521976a075cb;hp=83e8c5723729fe91d6c3b18b00e87cdf1b8f88b7;hpb=c63ee099ad2b149bd70136839c973e8910137bc5;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 83e8c5723..31b427e79 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -89,6 +89,8 @@ #include #include +#include CORBA_SERVER_HEADER(SMESH_MeshEditor) + using namespace std; @@ -308,14 +310,21 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule, GroupCoordinatesLayout->setAlignment(Qt::AlignTop); GroupCoordinatesLayout->setSpacing(6); GroupCoordinatesLayout->setMargin(11); + TextLabel_X = new QLabel(GroupCoordinates, "TextLabel_X"); + TextLabel_X->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); TextLabel_X->setText(tr("SMESH_X" )); GroupCoordinatesLayout->addWidget(TextLabel_X, 0, 0); + TextLabel_Y = new QLabel(GroupCoordinates, "TextLabel_Y"); + //TextLabel_Y->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); + TextLabel_Y->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); TextLabel_Y->setText(tr("SMESH_Y" )); GroupCoordinatesLayout->addWidget(TextLabel_Y, 0, 2); TextLabel_Z = new QLabel(GroupCoordinates, "TextLabel_Z"); + //TextLabel_Z->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); + TextLabel_Z->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); TextLabel_Z->setText(tr("SMESH_Z" )); GroupCoordinatesLayout->addWidget(TextLabel_Z, 0, 4); @@ -358,9 +367,9 @@ void SMESHGUI_NodesDlg::Init () step = 25.0; /* min, max, step and decimals for spin boxes */ - SpinBox_X->RangeStepAndValidator(-999.999, +999.999, step, 3); - SpinBox_Y->RangeStepAndValidator(-999.999, +999.999, step, 3); - SpinBox_Z->RangeStepAndValidator(-999.999, +999.999, step, 3); + SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); SpinBox_X->SetValue(0.0); SpinBox_Y->SetValue(0.0); SpinBox_Z->SetValue(0.0); @@ -599,3 +608,20 @@ void SMESHGUI_NodesDlg::ActivateThisDialog() SelectionIntoArgument(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_NodesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +}