X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=b89009898cd88a49bd08ff2f08c09a682757b83f;hb=21aa7e25de01eac6444e65f3ead4e8692b54ea19;hp=9ac5b9cc6504d64254aae9af50bbf12332e5bbcb;hpb=57b43b4d010e2d0a1529d3c131bbb9d416e63258;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 9ac5b9cc6..b89009898 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -89,6 +89,8 @@ #include #include +#include CORBA_SERVER_HEADER(SMESH_MeshEditor) + using namespace std; @@ -153,7 +155,7 @@ namespace SMESH { aCellLocationsArray->SetNumberOfTuples(1); aCells->InitTraversal(); - vtkIdType npts; + vtkIdType npts = 0; aCellLocationsArray->SetValue(0, aCells->GetTraversalLocation(npts)); aGrid->SetCells(aCellTypesArray, aCellLocationsArray, aCells); @@ -309,13 +311,16 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule, 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->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->setText(tr("SMESH_Z" )); GroupCoordinatesLayout->addWidget(TextLabel_Z, 0, 4); @@ -358,9 +363,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, 3); + SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); SpinBox_X->SetValue(0.0); SpinBox_Y->SetValue(0.0); SpinBox_Z->SetValue(0.0); @@ -493,9 +498,15 @@ void SMESHGUI_NodesDlg::ClickOnHelp() if (app) app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName); else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } @@ -599,3 +610,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(); + } +}