]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx
Salome HOME
Copyright update 2022
[modules/geom.git] / src / GEOMToolsGUI / GEOMToolsGUI_DeflectionDlg.cxx
index 428c91c47a398332a3f129a4d517a8aac6242641..279bc648a16a98f3adb42c70e493597bc2ddb5b6 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -43,7 +43,7 @@
 // purpose  : Constructs a GEOMToolsGUI_DeflectionDlg which is a child of 'parent', with the
 //            name 'name' and widget flags set to 'f'.
 //            The dialog will by default be modeless, unless you set 'modal' to
-//            TRUE to construct a modal dialog.
+//            true to construct a modal dialog.
 //=================================================================================
 GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
@@ -52,7 +52,7 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   setModal(true);
 
   setWindowTitle(tr("GEOM_DEFLECTION_TLT"));
-  setSizeGripEnabled(TRUE);
+  setSizeGripEnabled(true);
   QGridLayout* MyDialogLayout = new QGridLayout(this);
   MyDialogLayout->setSpacing(6);
   MyDialogLayout->setMargin(11);
@@ -78,7 +78,7 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   SpinBox->setAcceptNames( false );
   SpinBox->setPrecision( aPrecision );
   SpinBox->setDecimals( aPrecision );
-  SpinBox->setRange( DEFLECTION_MIN, 1.0 );
+  SpinBox->setRange( GEOM::minDeflection(), 1.0 );
   SpinBox->setSingleStep( 1.0e-04 );
   // Add a hint for the user saying how to tune precision
   QString userPropName = QObject::tr( QString( "GEOM_PREF_%1" ).arg( quantity ).toLatin1().constData() );
@@ -101,8 +101,8 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   QPushButton* buttonOk = new QPushButton (GroupButtons);
   buttonOk->setObjectName("buttonOk");
   buttonOk->setText(tr("GEOM_BUT_OK"));
-  buttonOk->setAutoDefault(TRUE);
-  buttonOk->setDefault(TRUE);
+  buttonOk->setAutoDefault(true);
+  buttonOk->setDefault(true);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
 
   GroupButtonsLayout->addItem(new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
@@ -110,13 +110,13 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   QPushButton* buttonCancel = new QPushButton (GroupButtons);
   buttonCancel->setObjectName("buttonCancel");
   buttonCancel->setText(tr("GEOM_BUT_CANCEL"));
-  buttonCancel->setAutoDefault(TRUE);
+  buttonCancel->setAutoDefault(true);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 1);
 
   QPushButton* buttonHelp = new QPushButton (GroupButtons);
   buttonHelp->setObjectName("buttonHelp");
   buttonHelp->setText(tr("GEOM_BUT_HELP"));
-  buttonHelp->setAutoDefault(TRUE);
+  buttonHelp->setAutoDefault(true);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 2);
   /***************************************************************/
 
@@ -130,7 +130,7 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
   connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
 
-  // Move widget on the botton right corner of main widget
+  // Move widget on the bottom right corner of main widget
   SUIT_Tools::centerWidget(this, parent);
 }