]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Undoes of the previous modifications.
authornds <nds@opencascade.com>
Tue, 6 Oct 2015 14:06:47 +0000 (17:06 +0300)
committernds <nds@opencascade.com>
Tue, 6 Oct 2015 14:08:13 +0000 (17:08 +0300)
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.cpp

index 8cf2d67cc4814de14ea0e2b46333810dc8b69ea1..2687b72a26e6be3c496b77629b6b31b515ce44da 100644 (file)
@@ -31,6 +31,8 @@
 #include <iostream>
 #endif
 
+//#define APPLY_BY_ENTER_OR_TAB
+
 ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
                                                            const Config_WidgetAPI* theData,
                                                            const std::string& theParentId)
@@ -85,9 +87,12 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
   mySpinBox->setToolTip(aTTip);
 
   aControlLay->addRow(myLabel, mySpinBox);
+#ifdef APPLY_BY_ENTER_OR_TAB
   // Apply widget value change by enter/tab event.
-  //connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesChanged()));
   connect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged()));
+#else
+  connect(mySpinBox, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesChanged()));
+#endif
 }
 
 ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue()
index 622600ee2df9700f1cf06230e760eaa0f7272651..54e737c11c62e58e8f36d077065038c0c213fe8a 100644 (file)
@@ -34,6 +34,8 @@
 #include <iostream>
 #endif
 
+//#define APPLY_BY_ENTER_OR_TAB
+
 ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent,
                                                            const Config_WidgetAPI* theData,
                                                            const std::string& theParentId)
@@ -84,9 +86,12 @@ ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent,
   mySpinBox->setToolTip(aTTip);
 
   aControlLay->addRow(myLabel, mySpinBox);
+#ifdef APPLY_BY_ENTER_OR_TAB
   // Apply widget value change by enter/tab event.
-  //connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesChanged()));
   connect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged()));
+#else
+  connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesChanged()));
+#endif
 }
 
 ModuleBase_WidgetIntValue::~ModuleBase_WidgetIntValue()
index 3e25988ebf7def9cb3b1f376a2a7d9c44e1657f8..bb75fd068fcd9a26621298727daefa66ce4962fd 100644 (file)
@@ -52,6 +52,8 @@ const double MaxCoordinate = 1e12;
 
 static QStringList MyFeaturesForCoincedence;
 
+//#define APPLY_BY_ENTER_OR_TAB
+
 PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, 
                                              ModuleBase_IWorkshop* theWorkshop,
                                              const Config_WidgetAPI* theData,
@@ -88,9 +90,12 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
     myXSpin->setToolTip(tr("X"));
     aGroupLay->addWidget(myXSpin, 0, 1);
 
+#ifdef APPLY_BY_ENTER_OR_TAB
     // Apply widget value change by enter/tab event.
-    //connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
     connect(myXSpin, SIGNAL(editingFinished()), this, SLOT(onValuesChanged()));
+#else
+    connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
+#endif
   }
   {
     QLabel* aLabel = new QLabel(myGroupBox);
@@ -103,9 +108,12 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
     myYSpin->setToolTip(tr("Y"));
     aGroupLay->addWidget(myYSpin, 1, 1);
 
+#ifdef APPLY_BY_ENTER_OR_TAB
     // Apply widget value change by enter/tab event.
-    //connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
     connect(myYSpin, SIGNAL(editingFinished()), this, SLOT(onValuesChanged()));
+#else
+    connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SLOT(onValuesChanged()));
+#endif
   }
   QVBoxLayout* aLayout = new QVBoxLayout(this);
   ModuleBase_Tools::zeroMargins(aLayout);
index 297727d4e57f314a049446147b8234ac0937b613..a644d55cc5c83dbf8643aebd827cb75246c720f8 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <QMouseEvent>
 
+//#define APPLY_BY_ENTER_OR_TAB
+
 PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
                                                              ModuleBase_IWorkshop* theWorkshop,
                                                              const Config_WidgetAPI* theData,
@@ -34,11 +36,14 @@ PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
   myFirstPntName = theData->getProperty("first_point");
 
   // Reconnect to local slot
+#ifdef APPLY_BY_ENTER_OR_TAB
   // Apply widget value change by enter/tab event.
-  //disconnect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
-  //connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
   disconnect(mySpinBox, SIGNAL(editingFinished()), this, SIGNAL(valuesChanged()));
   connect(mySpinBox, SIGNAL(editingFinished()), this, SLOT(onValuesChanged()));
+#else
+  disconnect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
+  connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
+#endif
 }
 
 PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance()