Salome HOME
Issue #1852 In the Sketcher, replace all disabled real inputs by labels
authornds <nds@opencascade.com>
Thu, 1 Dec 2016 09:45:03 +0000 (12:45 +0300)
committernds <nds@opencascade.com>
Thu, 1 Dec 2016 09:45:24 +0000 (12:45 +0300)
src/Config/Config_Keywords.h
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_LabelValue.cpp [new file with mode: 0644]
src/ModuleBase/ModuleBase_LabelValue.h [new file with mode: 0644]
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/ModuleBase/ModuleBase_WidgetLabelValue.cpp [new file with mode: 0644]
src/ModuleBase/ModuleBase_WidgetLabelValue.h [new file with mode: 0644]
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2d.h
src/SketchPlugin/plugin-Sketch.xml

index a99495114dbbe0fc85b3752f2f67d1009cb305c0..503215422131cb418e995957ff35aaf21e283dbd 100644 (file)
@@ -27,6 +27,7 @@ const static char* PROPERTY_PANEL_ID = "property_panel_id";
 // Widgets
 const static char* WDG_INFO = "label";
 const static char* WDG_DOUBLEVALUE = "doublevalue";
+const static char* WDG_DOUBLEVALUELABEL = "labelvalue";
 const static char* WDG_INTEGERVALUE = "integervalue";
 const static char* WDG_BOOLVALUE = "boolvalue";
 const static char* WDG_STRINGVALUE = "stringvalue";
index 7ff157483b100c09364b88cac572cd5837919885..e71e3501b06b423634c4ba07451d648d01f5066c 100644 (file)
@@ -22,6 +22,7 @@ SET(PROJECT_HEADERS
   ModuleBase_IViewer.h
   ModuleBase_IWidgetCreator.h
   ModuleBase_IWorkshop.h
+  ModuleBase_LabelValue.h
   ModuleBase_ModelWidget.h
   ModuleBase_Operation.h
   ModuleBase_OperationAction.h
@@ -53,6 +54,7 @@ SET(PROJECT_HEADERS
   ModuleBase_WidgetFileSelector.h
   ModuleBase_WidgetIntValue.h
   ModuleBase_WidgetLabel.h
+  ModuleBase_WidgetLabelValue.h
   ModuleBase_WidgetLineEdit.h
   ModuleBase_WidgetMultiSelector.h
   ModuleBase_WidgetOptionalBox.h
@@ -84,6 +86,7 @@ SET(PROJECT_SOURCES
   ModuleBase_IViewer.cpp
   ModuleBase_IWidgetCreator.cpp
   ModuleBase_IWorkshop.cpp
+  ModuleBase_LabelValue.cpp
   ModuleBase_ModelWidget.cpp
   ModuleBase_Operation.cpp
   ModuleBase_OperationAction.cpp
@@ -114,6 +117,7 @@ SET(PROJECT_SOURCES
   ModuleBase_WidgetFileSelector.cpp
   ModuleBase_WidgetIntValue.cpp
   ModuleBase_WidgetLabel.cpp
+  ModuleBase_WidgetLabelValue.cpp
   ModuleBase_WidgetLineEdit.cpp
   ModuleBase_WidgetMultiSelector.cpp
   ModuleBase_WidgetOptionalBox.cpp
diff --git a/src/ModuleBase/ModuleBase_LabelValue.cpp b/src/ModuleBase/ModuleBase_LabelValue.cpp
new file mode 100644 (file)
index 0000000..15ac008
--- /dev/null
@@ -0,0 +1,44 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        ModuleBase_IWorkshop.cpp
+// Created:     30 Nov 2016
+// Author:      Natalia ERMOLAEVA
+
+#include <ModuleBase_LabelValue.h>
+#include <ModuleBase_IconFactory.h>
+
+#include <QHBoxLayout>
+#include <QLabel>
+
+ModuleBase_LabelValue::ModuleBase_LabelValue(QWidget* theParent, const QString& theText,
+                                             const QString& theToolTip, const QString& theIcon)
+: QWidget(theParent)
+{
+  QHBoxLayout* aLayout = new QHBoxLayout(this);
+  aLayout->setContentsMargins(2, 0, 0, 0);
+  aLayout->setSpacing(0);
+
+  myLabel = new QLabel(QString("%1 : ").arg(theText), this);
+  if (!theIcon.isEmpty()) {
+    myLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(theIcon));
+    aLayout->setSpacing(4);
+  }
+  myLabel->setToolTip(!theToolTip.isEmpty() ? theToolTip : theText);
+  aLayout->addWidget(myLabel);
+
+  myLabelValue = new QLabel("", this);
+  aLayout->addWidget(myLabelValue, 1);
+
+  aLayout->addStretch(1);
+}
+
+ModuleBase_LabelValue::~ModuleBase_LabelValue()
+{
+}
+
+void ModuleBase_LabelValue::setValue(const double theValue)
+{
+  myValue = theValue;
+  myLabelValue->setText(QString::number(theValue));
+  myLabelValue->setToolTip(QString::number(theValue));
+}
diff --git a/src/ModuleBase/ModuleBase_LabelValue.h b/src/ModuleBase/ModuleBase_LabelValue.h
new file mode 100644 (file)
index 0000000..69e1df9
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        ModuleBase_LabelValue.h
+// Created:     30 Nov 2016
+// Author:      Natalia ERMOLAEVA
+
+#ifndef ModuleBase_LabelValue_H
+#define ModuleBase_LabelValue_H
+
+#include "ModuleBase.h"
+
+#include <QWidget>
+
+class QLabel;
+
+/**
+* \ingroup GUI
+* Implementation of model widget for a label control
+*/
+class MODULEBASE_EXPORT ModuleBase_LabelValue : public QWidget
+{
+  Q_OBJECT
+public:
+  /// Constructor
+  /// \param theParent the parent object
+  /// \param theText a text value
+  /// \param theToolTip a tool tip value
+  /// \param theIcon a icon value
+  ModuleBase_LabelValue(QWidget* theParent, const QString& theText,
+                        const QString& theToolTip = "",
+                        const QString& theIcon = "");
+
+  virtual ~ModuleBase_LabelValue();
+
+  /// Fills the label value with the given value
+  /// \param theValue a value
+  void setValue(const double theValue);
+
+  /// Returns double value
+  /// \return the value
+  double value() const { return myValue; }
+
+protected:
+  QLabel* myLabel;  ///< A label information control
+  QLabel* myLabelValue; ///< A label value control
+
+  double myValue; ///< A cashed value to avoid a string conversion
+};
+
+#endif
index d4c1b9ef45dd19471cde84189f6e9d5454e07df1..c58af6149797a657ad03b16cde0c3232dd55d605 100644 (file)
@@ -17,6 +17,7 @@
 #include <ModuleBase_WidgetShapeSelector.h>
 #include <ModuleBase_WidgetFeatureSelector.h>
 #include <ModuleBase_WidgetDoubleValue.h>
+#include <ModuleBase_WidgetLabelValue.h>
 #include <ModuleBase_WidgetIntValue.h>
 #include <ModuleBase_WidgetBoolValue.h>
 #include <ModuleBase_WidgetFileSelector.h>
@@ -286,6 +287,8 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory::createWidgetByType(const std::
     result = new ModuleBase_WidgetLabel(theParent, myWidgetApi);
   } else if (theType == WDG_DOUBLEVALUE) {
     result = new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi);
+  } else if (theType == WDG_DOUBLEVALUELABEL) {
+    result = new ModuleBase_WidgetLabelValue(theParent, myWidgetApi);
   } else if (theType == WDG_INTEGERVALUE) {
     result = new ModuleBase_WidgetIntValue(theParent, myWidgetApi);
   } else if (theType == WDG_SHAPE_SELECTOR) {
diff --git a/src/ModuleBase/ModuleBase_WidgetLabelValue.cpp b/src/ModuleBase/ModuleBase_WidgetLabelValue.cpp
new file mode 100644 (file)
index 0000000..aafbb4b
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
+// File:        ModuleBase_WidgetLabelValue.cpp
+// Created:     30 Nov 2016
+// Author:      Natalia ERMOLAEVA
+
+#include "ModuleBase_WidgetLabelValue.h"
+
+#include <Config_WidgetAPI.h>
+#include <Config_Keywords.h>
+#include <ModuleBase_LabelValue.h>
+
+#include <ModelAPI_AttributeDouble.h>
+
+#include <QLabel>
+#include <QVBoxLayout>
+
+ModuleBase_WidgetLabelValue::ModuleBase_WidgetLabelValue(QWidget* theParent,
+                                               const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData)
+{
+  QVBoxLayout* aLayout = new QVBoxLayout(this);
+  aLayout->setContentsMargins(0, 0, 0, 0);
+  aLayout->setSpacing(0);
+
+  QString aText = QString::fromStdString(theData->widgetLabel());
+  QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
+  QString aToolTip = QString::fromStdString(theData->widgetTooltip());
+
+  myLabel = new ModuleBase_LabelValue(theParent, aText, aToolTip, aLabelIcon);
+  aLayout->addWidget(myLabel);
+}
+
+ModuleBase_WidgetLabelValue::~ModuleBase_WidgetLabelValue()
+{
+}
+
+QList<QWidget*> ModuleBase_WidgetLabelValue::getControls() const
+{
+  return QList<QWidget*>();
+}
+
+bool ModuleBase_WidgetLabelValue::restoreValueCustom()
+{
+  DataPtr aData = myFeature->data();
+  AttributeDoublePtr anAttribute = aData->real(attributeID());
+  double aValue = 0;
+  if (anAttribute.get() && anAttribute->isInitialized())
+    aValue = anAttribute->value();
+  myLabel->setValue(aValue);
+  return true;
+}
+
+bool ModuleBase_WidgetLabelValue::storeValueCustom()
+{
+  return true;
+}
diff --git a/src/ModuleBase/ModuleBase_WidgetLabelValue.h b/src/ModuleBase/ModuleBase_WidgetLabelValue.h
new file mode 100644 (file)
index 0000000..f1fb4d6
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        ModuleBase_WidgetLabelValue.h
+// Created:     30 Nov 2016
+// Author:      Natalia ERMOLAEVA
+
+#ifndef ModuleBase_WidgetLabelValue_H
+#define ModuleBase_WidgetLabelValue_H
+
+#include "ModuleBase.h"
+#include "ModuleBase_ModelWidget.h"
+
+class ModuleBase_LabelValue;
+
+/**
+* \ingroup GUI
+* Implementation of model widget for a label control
+*/
+class MODULEBASE_EXPORT ModuleBase_WidgetLabelValue : public ModuleBase_ModelWidget
+{
+Q_OBJECT
+ public:
+  /// Constructor
+  /// \param theParent the parent object
+  /// \param theData the widget configuation. The attribute of the model widget is obtained from
+  ModuleBase_WidgetLabelValue(QWidget* theParent, const Config_WidgetAPI* theData);
+
+  virtual ~ModuleBase_WidgetLabelValue();
+
+  virtual bool restoreValueCustom();
+
+  virtual QList<QWidget*> getControls() const;
+
+protected:
+  /// Saves the internal parameters to the given feature
+  /// \return True in success
+  virtual bool storeValueCustom();
+
+private:
+  ModuleBase_LabelValue* myLabel;  ///< A label control
+};
+
+#endif
index df82c9b5f53c7206c70830319f0b8e1dbab66126..0abbeab322dbf8e59626151f0c8a271b3b8bfa8b 100644 (file)
@@ -20,6 +20,7 @@
 #include <ModuleBase_ISelection.h>
 #include <ModuleBase_ViewerPrs.h>
 #include <ModuleBase_WidgetValidator.h>
+#include <ModuleBase_LabelValue.h>
 
 #include <Config_Keywords.h>
 #include <Config_WidgetAPI.h>
@@ -90,33 +91,34 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
   aGroupLay->setColumnStretch(1, 1);
   {
     QLabel* aLabel = new QLabel(myGroupBox);
-    aLabel->setText(tr("X "));
-    aGroupLay->addWidget(aLabel, 0, 0);
-
-    myXSpin = new ModuleBase_ParamSpinBox(myGroupBox);
-    myXSpin->setAcceptVariables(aAcceptVariables);
-    myXSpin->setMinimum(-DBL_MAX);
-    myXSpin->setMaximum(DBL_MAX);
-    myXSpin->setToolTip(tr("X"));
+
+    myXSpin = new ModuleBase_LabelValue(myGroupBox, tr("X"));
+    //ModuleBase_ParamSpinBox(myGroupBox);
+    //myXSpin->setAcceptVariables(aAcceptVariables);
+    //myXSpin->setMinimum(-DBL_MAX);
+    //myXSpin->setMaximum(DBL_MAX);
+    //myXSpin->setToolTip(tr("X"));
     aGroupLay->addWidget(myXSpin, 0, 1);
 
-    connect(myXSpin, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
-    myXSpin->setValueEnabled(isValueEnabled());
+    //connect(myXSpin, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
+    //myXSpin->setValueEnabled(isValueEnabled());
   }
   {
-    QLabel* aLabel = new QLabel(myGroupBox);
-    aLabel->setText(tr("Y "));
-    aGroupLay->addWidget(aLabel, 1, 0);
-
-    myYSpin = new ModuleBase_ParamSpinBox(myGroupBox);
-    myYSpin->setAcceptVariables(aAcceptVariables);
-    myYSpin->setMinimum(-DBL_MAX);
-    myYSpin->setMaximum(DBL_MAX);
-    myYSpin->setToolTip(tr("Y"));
+    //QLabel* aLabel = new QLabel(myGroupBox);
+    //aLabel->setText(tr("Y "));
+    //aGroupLay->addWidget(aLabel, 1, 0);
+
+    myYSpin = new ModuleBase_LabelValue(myGroupBox, tr("Y"));
+    //ModuleBase_ParamSpinBox(myGroupBox);
+    //myYSpin = new ModuleBase_ParamSpinBox(myGroupBox);
+    //myYSpin->setAcceptVariables(aAcceptVariables);
+    //myYSpin->setMinimum(-DBL_MAX);
+    //myYSpin->setMaximum(DBL_MAX);
+    //myYSpin->setToolTip(tr("Y"));
     aGroupLay->addWidget(myYSpin, 1, 1);
 
-    connect(myYSpin, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
-    myYSpin->setValueEnabled(isValueEnabled());
+    //connect(myYSpin, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
+    //myYSpin->setValueEnabled(isValueEnabled());
   }
   QVBoxLayout* aLayout = new QVBoxLayout(this);
   ModuleBase_Tools::zeroMargins(aLayout);
@@ -174,7 +176,7 @@ bool PartSet_WidgetPoint2D::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr
 bool PartSet_WidgetPoint2D::resetCustom()
 {
   bool aDone = false;
-  if (!isUseReset() || isComputedDefault() || myXSpin->hasVariable() || myYSpin->hasVariable()) {
+  if (!isUseReset() || isComputedDefault() /*|| myXSpin->hasVariable() || myYSpin->hasVariable()*/) {
     aDone = false;
   }
   else {
@@ -189,8 +191,11 @@ bool PartSet_WidgetPoint2D::resetCustom()
       double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
       // it is important to block the spin box control in order to do not through out the
       // locking of the validating state.
-      ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0);
-      ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0);
+      myXSpin->setValue(isOk ? aDefValue : 0.0);
+      myYSpin->setValue(isOk ? aDefValue : 0.0);
+
+      //ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0);
+      //ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0);
       storeValueCustom();
       aDone = true;
     }
@@ -225,7 +230,7 @@ bool PartSet_WidgetPoint2D::setSelection(QList<ModuleBase_ViewerPrsPtr>& theValu
 
 void PartSet_WidgetPoint2D::selectContent()
 {
-  myXSpin->selectAll();
// myXSpin->selectAll();
 }
 
 bool PartSet_WidgetPoint2D::setPoint(double theX, double theY)
@@ -235,8 +240,11 @@ bool PartSet_WidgetPoint2D::setPoint(double theX, double theY)
   if (fabs(theY) >= MaxCoordinate)
     return false;
 
-  ModuleBase_Tools::setSpinValue(myXSpin, theX);
-  ModuleBase_Tools::setSpinValue(myYSpin, theY);
+  myXSpin->setValue(theX);
+  myYSpin->setValue(theY);
+
+  //ModuleBase_Tools::setSpinValue(myXSpin, theX);
+  //ModuleBase_Tools::setSpinValue(myYSpin, theY);
 
   storeValue();
   return true;
@@ -256,10 +264,11 @@ bool PartSet_WidgetPoint2D::storeValueCustom()
 
   // if text is not empty then setValue will be ignored
   // so we should set the text at first
-  aPoint->setText(myXSpin->hasVariable() ? myXSpin->text().toStdString() : "",
-                  myYSpin->hasVariable() ? myYSpin->text().toStdString() : "");
-  aPoint->setValue(!myXSpin->hasVariable() ? myXSpin->value() : aPoint->x(),
-                   !myYSpin->hasVariable() ? myYSpin->value() : aPoint->y());
+  //aPoint->setText(myXSpin->hasVariable() ? myXSpin->text().toStdString() : "",
+  //                myYSpin->hasVariable() ? myYSpin->text().toStdString() : "");
+  //aPoint->setValue(!myXSpin->hasVariable() ? myXSpin->value() : aPoint->x(),
+  //                 !myYSpin->hasVariable() ? myYSpin->value() : aPoint->y());
+  aPoint->setValue(myXSpin->value(), myYSpin->value());
 
   // after movement the solver will call the update event: optimization
   moveObject(myFeature);
@@ -280,22 +289,26 @@ bool PartSet_WidgetPoint2D::restoreValueCustom()
   bool isDouble = false;
   double aVal = 0;
   if (aTextX.isEmpty()) {
-    ModuleBase_Tools::setSpinValue(myXSpin, aPoint->x());
+    myXSpin->setValue(aPoint->x());
+    //ModuleBase_Tools::setSpinValue(myXSpin, aPoint->x());
   } else {
     aVal = aTextX.toDouble(&isDouble);
-    if (isDouble)
+    myXSpin->setValue(aVal);
+    /*if (isDouble)
       ModuleBase_Tools::setSpinValue(myXSpin, aVal);
     else
-      ModuleBase_Tools::setSpinText(myXSpin, aTextX);
+      ModuleBase_Tools::setSpinText(myXSpin, aTextX);*/
   }
   if (aTextY.isEmpty()) {
-    ModuleBase_Tools::setSpinValue(myYSpin, aPoint->y());
+    myYSpin->setValue(aPoint->y());
+    //ModuleBase_Tools::setSpinValue(myYSpin, aPoint->y());
   } else {
     aVal = aTextY.toDouble(&isDouble);
-    if (isDouble)
-      ModuleBase_Tools::setSpinValue(myYSpin, aVal);
-    else
-      ModuleBase_Tools::setSpinText(myYSpin, aTextY);
+    myYSpin->setValue(aVal);
+    //if (isDouble)
+    //  ModuleBase_Tools::setSpinValue(myYSpin, aVal);
+    //else
+    //  ModuleBase_Tools::setSpinText(myYSpin, aTextY);
   }
   //if (aTextX.empty() || aTextY.empty()) {
   //  ModuleBase_Tools::setSpinValue(myXSpin, aPoint->x());
@@ -310,8 +323,8 @@ bool PartSet_WidgetPoint2D::restoreValueCustom()
 void PartSet_WidgetPoint2D::storeCurentValue()
 {
   // do not use cash if a variable is used
-  if (myXSpin->hasVariable() || myYSpin->hasVariable())
-    return;
+  //if (myXSpin->hasVariable() || myYSpin->hasVariable())
+  //  return;
 
   myValueIsCashed = true;
   myIsFeatureVisibleInCash = XGUI_Displayer::isVisible(
@@ -329,8 +342,10 @@ bool PartSet_WidgetPoint2D::restoreCurentValue()
 
   myValueIsCashed = false;
   myIsFeatureVisibleInCash = true;
-  ModuleBase_Tools::setSpinValue(myXSpin, myXValueInCash);
-  ModuleBase_Tools::setSpinValue(myYSpin, myYValueInCash);
+  myXSpin->setValue(myXValueInCash);
+  myYSpin->setValue(myYValueInCash);
+  //ModuleBase_Tools::setSpinValue(myXSpin, myXValueInCash);
+  //ModuleBase_Tools::setSpinValue(myYSpin, myYValueInCash);
 
   // store value to the model
   storeValueCustom();
@@ -367,6 +382,10 @@ void PartSet_WidgetPoint2D::activateCustom()
   }
 }
 
+void PartSet_WidgetPoint2D::setHighlighted(bool isHighlighted)
+{
+}
+
 void PartSet_WidgetPoint2D::deactivate()
 {
   // the value of the control should be stored to model if it was not
@@ -667,7 +686,8 @@ void PartSet_WidgetPoint2D::initializeValueByActivate()
 
 bool PartSet_WidgetPoint2D::processEnter()
 {
-  bool isModified = getValueState() == ModifiedInPP;
+  return false;
+  /*bool isModified = getValueState() == ModifiedInPP;
   if (isModified) {
     bool isXModified = myXSpin->hasFocus();
     emit valuesChanged();
@@ -676,7 +696,7 @@ bool PartSet_WidgetPoint2D::processEnter()
     else
       myYSpin->selectAll();
   }
-  return isModified;
+  return isModified;*/
 }
 
 bool PartSet_WidgetPoint2D::useSelectedShapes() const
index a12e35d0fb875673dc0922527229a77eec33914a..ab56c058bad766e19a38cadfc5f412d7e8729b12 100755 (executable)
@@ -22,6 +22,7 @@ class ModelAPI_Feature;
 class ModuleBase_IWorkshop;
 class ModuleBase_ParamSpinBox;
 class ModuleBase_IViewWindow;
+class ModuleBase_LabelValue;
 class GeomAPI_Pnt2d;
 class ModuleBase_IWorkshop;
 
@@ -138,6 +139,9 @@ protected:
   /// The methiod called when widget is activated
   virtual void activateCustom();
 
+  //! Switch On/Off highlighting of the widget
+  virtual void setHighlighted(bool isHighlighted);
+
   /// Returns true if the feature contains Point2D attribute with the same coordinates
   /// The attribute of the widget is not processed.
   /// \param theFeature a feature
@@ -197,8 +201,10 @@ protected:
 private:
 
   QGroupBox* myGroupBox;  ///< the parent group box for all intenal widgets
-  ModuleBase_ParamSpinBox* myXSpin;  ///< the spin box for the X coordinate
-  ModuleBase_ParamSpinBox* myYSpin;  ///< the spin box for the Y coordinate
+  //ModuleBase_ParamSpinBox* myXSpin;  ///< the spin box for the X coordinate
+  //ModuleBase_ParamSpinBox* myYSpin;  ///< the spin box for the Y coordinate
+  ModuleBase_LabelValue* myXSpin; ///< the label for the X coordinate
+  ModuleBase_LabelValue* myYSpin; ///< the label for the Y coordinate
 
    /// value used as selection in mouse release method
   std::shared_ptr<ModuleBase_ViewerPrs> myPreSelected;
index bc8d02f5b6216cf49b5ff24a49f212bd4c88414f..b646f0ca3ee0654477bb99dfa9ee83b2687fcf4c 100644 (file)
@@ -31,7 +31,7 @@
                                  enable_value="enable_by_preferences"/>
         <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"
                                  enable_value="enable_by_preferences"/>
-        <doublevalue id="LineLength" accept_expressions="0" label="Length:" default="computed" icon="icons/Sketch/distance_value.png"
+        <labelvalue id="LineLength" accept_expressions="0" label="Length:" default="computed" icon="icons/Sketch/distance_value.png"
                      tooltip="Line length" obligatory="0" enable_value="false"/>
         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
         <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
                                      enable_value="enable_by_preferences"/>
           </box>
         </toolbox>
-        <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon="icons/Sketch/radius.png"
+        <labelvalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon="icons/Sketch/radius.png"
                      tooltip="Set radius" obligatory="0" enable_value="enable_by_preferences">
           <validator id="GeomValidators_Positive"/>
-        </doublevalue>
-        <doublevalue id="ArcAngle" label="Angle:" icon="icons/Sketch/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"
+        </labelvalue>
+        <labelvalue id="ArcAngle" label="Angle:" icon="icons/Sketch/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"
                      enable_value="enable_by_preferences"/>
-        <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"
-                   enable_value="enable_by_preferences"/>
+        <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature>
 
       <!--  SketchConstraintFillet  -->
             clear_in_neutral_point="false">
           <validator id="SketchPlugin_FilletVertexValidator"/>
         </sketch_multi_selector>
-        <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false"
+        <labelvalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false"
                      enable_value="enable_by_preferences">
           <validator id="GeomValidators_Positive"/>
-        </doublevalue>
+        </labelvalue>
         <validator id="PartSet_FilletSelection"/>
       </feature>
       <!--  SketchConstraintSplit  -->