#include <iostream>
#endif
+//#define APPLY_BY_ENTER_OR_TAB
+
ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
const Config_WidgetAPI* theData,
const std::string& theParentId)
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()
#include <iostream>
#endif
+//#define APPLY_BY_ENTER_OR_TAB
+
ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent,
const Config_WidgetAPI* theData,
const std::string& theParentId)
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()
static QStringList MyFeaturesForCoincedence;
+//#define APPLY_BY_ENTER_OR_TAB
+
PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
const Config_WidgetAPI* theData,
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);
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);
#include <QMouseEvent>
+//#define APPLY_BY_ENTER_OR_TAB
+
PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
const Config_WidgetAPI* theData,
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()