/// \return the state whether the widget can accept the focus
virtual bool focusTo();
+ /// Select the internal content if it can be selected. It is empty in the default realization
+ virtual void selectContent() {}
+
/// The method called when widget is activated
void activate();
return true;
}
+void ModuleBase_WidgetDoubleValue::selectContent()
+{
+ mySpinBox->selectAll();
+}
+
QList<QWidget*> ModuleBase_WidgetDoubleValue::getControls() const
{
QList<QWidget*> aList;
virtual ~ModuleBase_WidgetDoubleValue();
+ /// Select the internal content if it can be selected. It is empty in the default realization
+ virtual void selectContent();
+
/// Returns list of widget controls
/// \return a control list
virtual QList<QWidget*> getControls() const;
aPreviousAttributeWidget = aWidgets[i];
}
// If the current widget is a selector, do nothing, it processes the mouse press
- if (aPreviousAttributeWidget && !aPreviousAttributeWidget->isViewerSelector())
+ if (aPreviousAttributeWidget && !aPreviousAttributeWidget->isViewerSelector()) {
aPreviousAttributeWidget->focusTo();
+ aPreviousAttributeWidget->selectContent();
+ }
}
}
}
return isDone;
}
+void PartSet_WidgetPoint2D::selectContent()
+{
+ myXSpin->selectAll();
+}
+
bool PartSet_WidgetPoint2D::setPoint(double theX, double theY)
{
if (fabs(theX) >= MaxCoordinate)
virtual bool setSelection(QList<ModuleBase_ViewerPrs>& theValues,
const bool theToValidate);
+ /// Select the internal content if it can be selected. It is empty in the default realization
+ virtual void selectContent();
+
/// Returns list of widget controls
/// \return a control list
virtual QList<QWidget*> getControls() const;