Salome HOME
Issue #1278 In the sketch the creation line is not functional when I check the box...
authornds <nds@opencascade.com>
Wed, 30 Mar 2016 05:36:17 +0000 (08:36 +0300)
committernds <nds@opencascade.com>
Wed, 30 Mar 2016 05:36:17 +0000 (08:36 +0300)
src/ModuleBase/ModuleBase_IPropertyPanel.cpp
src/ModuleBase/ModuleBase_IPropertyPanel.h
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_OperationFeature.cpp
src/ModuleBase/ModuleBase_WidgetBoolValue.h
src/ModuleBase/ModuleBase_WidgetChoice.h
src/ModuleBase/ModuleBase_WidgetLabel.h
src/ModuleBase/ModuleBase_WidgetSwitch.h
src/ModuleBase/ModuleBase_WidgetToolbox.h
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_Workshop.cpp

index c37673303ecbfd26953efe867ab139dfc33c0e08..eb338776b20a50e9c0672bdf8076b55e1a6448f9 100644 (file)
@@ -39,7 +39,7 @@ ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget
     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)
index c9f51e1224e2ba79976de4aab0f46f8c9facc9b1..f463cefbed9bf7fd657e2eecc3d90455d9859da9 100644 (file)
@@ -64,11 +64,11 @@ public:
   /// 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);
index c2859e975ae3b5ffaa3853496236fe40d56641da..9162f46755355deba90d325f7c9c62f6ad10d1f8 100644 (file)
@@ -93,7 +93,7 @@ Q_OBJECT
 
   /// 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
index c460480fdaabbab81ad64db869900ee7c9f81c9b..f331ed72fda1f511a3f7db7a7f711dd8a069813d 100755 (executable)
@@ -365,7 +365,7 @@ ModuleBase_ModelWidget* ModuleBase_OperationFeature::activateByPreselection(
         // 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)) {
index 58561d35eeb2f07689a86acdb453853699681238..c3764bdcce79dd1b734e0bda89f0da9f452c621b 100644 (file)
@@ -29,7 +29,7 @@ Q_OBJECT
 
   virtual ~ModuleBase_WidgetBoolValue();
 
-  virtual bool canSetValue() const { return false; };
+  virtual bool canAcceptFocus() const { return false; };
 
   virtual QList<QWidget*> getControls() const;
 
index 0cdf589ee398c9c1adf1a441bc76ba130ff5cee4..e0f90d7203fbe9135913cb29cf6914dcf3a6123c 100644 (file)
@@ -46,7 +46,7 @@ Q_OBJECT
 
   /// 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();
 
index b024b17c9c000cc0a11cd6ad805226ad57a067e2..97454bf6f771c737fbd266395db9cb5ff77fa627 100644 (file)
@@ -29,7 +29,7 @@ Q_OBJECT
 
   /// 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()
   {
index 8b127f4d2a5f62da8e0e92912dbe49d45cc61633..1121d11fd1a42dc38342bbb6622b60624b993971 100644 (file)
@@ -33,7 +33,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetSwitch : public ModuleBase_PagedContain
 
   /// 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
index 08d851a142fdfa2c7ae2763fc1ce8e709f1a6a53..f92d79f4c2cc706f113825751ba72a488a64cd10 100644 (file)
@@ -30,7 +30,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetToolbox : public ModuleBase_PagedContai
 
   /// 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
index 5930c5e9f864373b331c38340b4e55ba5b07f1c7..8b1ab4f03e5f035e1222f19c354945b178e60566 100755 (executable)
@@ -164,7 +164,7 @@ void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget)
 
 void XGUI_PropertyPanel::onFocusInWidget(ModuleBase_ModelWidget* theWidget)
 {
-  if (theWidget->canSetValue())
+  if (theWidget->canAcceptFocus())
     activateWidget(theWidget);
 }
 
index 73894bc4b4878c30045cd16f82f814ee7ebeb333..0b7c71c35780de47233bbc5851b50171774cb501 100755 (executable)
@@ -872,7 +872,7 @@ void XGUI_Workshop::onWidgetStateChanged(int thePreviousState)
 void XGUI_Workshop::onValuesChanged()
 {
   ModuleBase_ModelWidget* aSenderWidget = (ModuleBase_ModelWidget*)(sender());
-  if (!aSenderWidget || aSenderWidget->canSetValue())
+  if (!aSenderWidget || aSenderWidget->canAcceptFocus())
     return;
 
   ModuleBase_ModelWidget* anActiveWidget = 0;