if (!aValidators->isCase(aWgt->feature(), aWgt->attributeID()))
continue; // this attribute is not participated in the current case
- if (!aWgt->canSetValue())
+ if (!aWgt->canAcceptFocus())
continue;
/// workaround for the same attributes used in different stacked widgets(attribute types)
/// Sets widget processed by preselection
virtual void setPreselectionWidget(ModuleBase_ModelWidget* theWidget) = 0;
- /// Returns the first widget, where canSetValue returns true
+ /// Returns the first widget, where canAcceptFocus returns true
/// \return a widget or null
ModuleBase_ModelWidget* findFirstAcceptingValueWidget();
- /// Returns the first widget, where canSetValue returns true
+ /// Returns the first widget, where canAcceptFocus returns true
/// \return a widget or null
static ModuleBase_ModelWidget* findFirstAcceptingValueWidget(
const QList<ModuleBase_ModelWidget*>& theWidgets);
/// Defines if it is supported to set the value in this widget
/// By default it returns true
- virtual bool canSetValue() const { return true; };
+ virtual bool canAcceptFocus() const { return true; };
//! Returns the widget error, get it from the attribute validator and state of the widget
//! If the feature is correct, it returns an empty value
// 1. apply the selection to controls
for (aWIt = aWidgets.constBegin(); aWIt != aWidgets.constEnd(); ++aWIt) {
aWgt = (*aWIt);
- if (!aWgt->canSetValue())
+ if (!aWgt->canAcceptFocus())
continue;
aPropertyPanel->setPreselectionWidget(aWgt);
if (!aWgt->setSelection(myPreSelection, true)) {
virtual ~ModuleBase_WidgetBoolValue();
- virtual bool canSetValue() const { return false; };
+ virtual bool canAcceptFocus() const { return false; };
virtual QList<QWidget*> getControls() const;
/// Defines if it is supported to set the value in this widget
/// It returns false because this is an info widget
- virtual bool canSetValue() const { return false; };
+ virtual bool canAcceptFocus() const { return false; };
virtual bool focusTo();
/// Defines if it is supported to set the value in this widget
/// It returns false because this is an info widget
- virtual bool canSetValue() const { return false; };
+ virtual bool canAcceptFocus() const { return false; };
virtual bool restoreValueCustom()
{
/// Defines if it is supported to set the value in this widget
/// It returns false because this is an info widget
- virtual bool canSetValue() const { return false; };
+ virtual bool canAcceptFocus() const { return false; };
/// Add a page to the widget
/// \param theWidget a page widget
/// Defines if it is supported to set the value in this widget
/// \return false because this is an info widget
- virtual bool canSetValue() const { return false; };
+ virtual bool canAcceptFocus() const { return false; };
/// Add a page to the widget
/// \param theWidget a page widget
void XGUI_PropertyPanel::onFocusInWidget(ModuleBase_ModelWidget* theWidget)
{
- if (theWidget->canSetValue())
+ if (theWidget->canAcceptFocus())
activateWidget(theWidget);
}
void XGUI_Workshop::onValuesChanged()
{
ModuleBase_ModelWidget* aSenderWidget = (ModuleBase_ModelWidget*)(sender());
- if (!aSenderWidget || aSenderWidget->canSetValue())
+ if (!aSenderWidget || aSenderWidget->canAcceptFocus())
return;
ModuleBase_ModelWidget* anActiveWidget = 0;