Salome HOME
Provide preselection of Line and Point for Distance
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 8 Dec 2014 13:58:12 +0000 (16:58 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 8 Dec 2014 13:58:12 +0000 (16:58 +0300)
14 files changed:
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_Operation.cpp
src/ModuleBase/ModuleBase_Operation.h
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.h
src/ModuleBase/ModuleBase_WidgetValue.cpp [deleted file]
src/ModuleBase/ModuleBase_WidgetValue.h [deleted file]
src/ModuleBase/ModuleBase_WidgetValueFeature.cpp [deleted file]
src/ModuleBase/ModuleBase_WidgetValueFeature.h [deleted file]
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2d.h
src/PartSet/PartSet_WidgetPoint2dDistance.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.h

index 394f67673b034285a02565742f36c04bd4b0064b..e80812b3c6fd7ee67df00b0f92aaae63ad1d24e4 100644 (file)
@@ -15,8 +15,6 @@ SET(PROJECT_HEADERS
        ModuleBase_WidgetSwitch.h
        ModuleBase_WidgetShapeSelector.h
        ModuleBase_IWorkshop.h
-       ModuleBase_WidgetValue.h
-       ModuleBase_WidgetValueFeature.h
        ModuleBase_Definitions.h
        ModuleBase_SelectionValidator.h
        ModuleBase_ISelection.h
@@ -46,8 +44,6 @@ SET(PROJECT_SOURCES
        ModuleBase_WidgetFactory.cpp
        ModuleBase_WidgetSwitch.cpp
        ModuleBase_WidgetShapeSelector.cpp
-       ModuleBase_WidgetValue.cpp
-       ModuleBase_WidgetValueFeature.cpp       
        ModuleBase_WidgetChoice.cpp
        ModuleBase_WidgetFileSelector.cpp
        ModuleBase_DoubleSpinBox.cpp
index c8a91fb93a04f42b2d04c4377bc065c35154fd2b..af9e6a8cd0c396cc3acbc64974ed5366318a0ffe 100644 (file)
@@ -6,6 +6,7 @@
 #define MODULEBASE_MODELWIDGET_H
 
 #include <ModuleBase.h>
+#include <ModuleBase_ViewerPrs.h>
 
 #include <ModelAPI_Feature.h>
 
@@ -14,7 +15,6 @@
 #include <memory>
 
 class Config_WidgetAPI;
-class ModuleBase_WidgetValue;
 class QKeyEvent;
 
 /**\class ModuleBase_ModelWidget
@@ -58,7 +58,7 @@ Q_OBJECT
   /// Set the given wrapped value to the current widget
   /// This value should be processed in the widget according to the needs
   /// \param theValue the wrapped widget value
-  virtual bool setValue(ModuleBase_WidgetValue* theValue)
+  virtual bool setSelection(ModuleBase_ViewerPrs theValue)
   {
     return false;
   }
index eca9c1c2ae9097aa802bee7b97d48c91c4cfa9ce..89b1957d30a4585c5d0827674d2c6875c7645df6 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "ModuleBase_OperationDescription.h"
 #include "ModuleBase_ModelWidget.h"
-#include "ModuleBase_WidgetValueFeature.h"
 #include "ModuleBase_ViewerPrs.h"
 #include "ModuleBase_IPropertyPanel.h"
 #include "ModuleBase_ISelection.h"
@@ -243,18 +242,18 @@ bool ModuleBase_Operation::activateByPreselection()
   
   ModuleBase_ModelWidget* aWgt, *aFilledWgt = 0;
   QList<ModuleBase_ModelWidget*>::const_iterator aWIt;
-  QList<ModuleBase_WidgetValueFeature*>::const_iterator aPIt;
+  QList<ModuleBase_ViewerPrs>::const_iterator aPIt;
   bool isSet = false;
   for (aWIt = aWidgets.constBegin(), aPIt = myPreSelection.constBegin();
        (aWIt != aWidgets.constEnd()) && (aPIt != myPreSelection.constEnd());
        ++aWIt) {
     aWgt = (*aWIt);
-    ModuleBase_WidgetValueFeature* aValue = (*aPIt);
+    ModuleBase_ViewerPrs aValue = (*aPIt);
     if (!aWgt->canSetValue())
       continue;
 
     ++aPIt;
-    if (!aWgt->setValue(aValue)) {
+    if (!aWgt->setSelection(aValue)) {
       isSet = false;
       break;
     } else {
@@ -304,16 +303,17 @@ void ModuleBase_Operation::initSelection(ModuleBase_ISelection* theSelection,
 
   // convert the selection values to the values, which are set to the operation widgets
 
-  Handle(V3d_View) aView = theViewer->activeView();
-  foreach (ModuleBase_ViewerPrs aPrs, aPreSelected) {
-    ModuleBase_WidgetValueFeature* aValue = new ModuleBase_WidgetValueFeature();
-    aValue->setObject(aPrs.object());
-
-    double aX, anY;
-    if (getViewerPoint(aPrs, theViewer, aX, anY))
-      aValue->setPoint(std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
-    myPreSelection.append(aValue);
-  }
+  //Handle(V3d_View) aView = theViewer->activeView();
+  //foreach (ModuleBase_ViewerPrs aPrs, aPreSelected) {
+  //  ModuleBase_WidgetValueFeature* aValue = new ModuleBase_WidgetValueFeature();
+  //  aValue->setObject(aPrs.object());
+
+  //  double aX, anY;
+  //  if (getViewerPoint(aPrs, theViewer, aX, anY))
+  //    aValue->setPoint(std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
+  //  myPreSelection.append(aValue);
+  //}
+  myPreSelection = aPreSelected;
 }
 
 //void ModuleBase_Operation::onWidgetActivated(ModuleBase_ModelWidget* theWidget)
@@ -349,9 +349,7 @@ bool ModuleBase_Operation::getViewerPoint(ModuleBase_ViewerPrs thePrs,
 
 void ModuleBase_Operation::clearPreselection()
 {
-  while (!myPreSelection.isEmpty()) {
-    delete myPreSelection.takeFirst();
-  }
+  myPreSelection.clear();
 }
 
 void ModuleBase_Operation::setPropertyPanel(ModuleBase_IPropertyPanel* theProp) 
index 4a155ebe2dcad48dab509c54fa8b5414f47bef12..acefc9ee8613acb1222096260aab10763487fb55 100644 (file)
@@ -23,7 +23,6 @@ class ModuleBase_OperationDescription;
 class ModuleBase_IPropertyPanel;
 class ModuleBase_ISelection;
 class ModuleBase_IViewer;
-class ModuleBase_WidgetValueFeature;
 
 class QKeyEvent;
 
@@ -264,7 +263,7 @@ signals:
   QStringList myNestedFeatures;
 
   /// List of pre-selected object 
-  QList<ModuleBase_WidgetValueFeature*> myPreSelection;
+  QList<ModuleBase_ViewerPrs> myPreSelection;
 
   /// Access to property panel
   ModuleBase_IPropertyPanel* myPropertyPanel;
index 0f3c87e4869229594993b7f869ccb77cf95dd2e3..0a15d04b6e674b3fc1f8c181d610d4f069ed83fe 100644 (file)
@@ -8,7 +8,6 @@
 #include <ModuleBase_IWorkshop.h>
 #include <ModuleBase_IViewer.h>
 #include <ModuleBase_Tools.h>
-#include <ModuleBase_WidgetValueFeature.h>
 
 #include <Config_WidgetAPI.h>
 #include <Events_Loop.h>
@@ -244,65 +243,69 @@ void ModuleBase_WidgetShapeSelector::onSelectionChanged()
   // In order to make reselection possible
   // TODO: check with MPV clearAttribute();
 
-  QObjectPtrList aObjects = myWorkshop->selection()->selectedPresentations();
-  if (aObjects.size() > 0) {
-    ObjectPtr aObject = aObjects.first();
-    if ((!mySelectedObject) && (!aObject))
-      return;
+  //QObjectPtrList aObjects = myWorkshop->selection()->selectedPresentations();
+  QList<ModuleBase_ViewerPrs> aSelected = myWorkshop->selection()->getSelected();
+  if (aSelected.size() > 0)
+    setSelection(aSelected.first());
+}
 
-    // Check that the selected object is result (others can not be accepted)
-    ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
-    if (!aRes)
-      return;
+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::setSelection(ModuleBase_ViewerPrs theValue)
+{
+  ObjectPtr aObject = theValue.object();
+  if ((!mySelectedObject) && (!aObject))
+    return false;
 
-    if (myFeature) {
-      // We can not select a result of our feature
-      const std::list<std::shared_ptr<ModelAPI_Result>>& aResList = myFeature->results();
-      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aIt;
-      for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) {
-        if ((*aIt) == aRes)
-          return;
-      }
+  // Check that the selected object is result (others can not be accepted)
+  ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
+  if (!aRes)
+    return false;
+
+  if (myFeature) {
+    // We can not select a result of our feature
+    const std::list<std::shared_ptr<ModelAPI_Result>>& aResList = myFeature->results();
+    std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aIt;
+    for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) {
+      if ((*aIt) == aRes)
+        return false;
     }
-    // Check that object belongs to active document or PartSet
-    DocumentPtr aDoc = aRes->document();
-    SessionPtr aMgr = ModelAPI_Session::get();
-    if (!(aDoc == aMgr->activeDocument()) && !(aDoc == aMgr->moduleDocument()))
-      return;
+  }
+  // Check that object belongs to active document or PartSet
+  DocumentPtr aDoc = aRes->document();
+  SessionPtr aMgr = ModelAPI_Session::get();
+  if (!(aDoc == aMgr->activeDocument()) && !(aDoc == aMgr->moduleDocument()))
+    return false;
 
-    // Check that the result has a shape
-    GeomShapePtr aShape = ModelAPI_Tools::shape(aRes);
-    if (!aShape)
-      return;
+  // Check that the result has a shape
+  GeomShapePtr aShape = ModelAPI_Tools::shape(aRes);
+  if (!aShape)
+    return false;
 
-    /// Check that object has acceptable type
-    if (!acceptObjectType(aObject)) 
-      return;
+  /// Check that object has acceptable type
+  if (!acceptObjectType(aObject)) 
+    return false;
 
-    // Get sub-shapes from local selection
-    if (myUseSubShapes) {
-      NCollection_List<TopoDS_Shape> aShapeList;
-      std::list<ObjectPtr> aOwners;
-      myWorkshop->selection()->selectedShapes(aShapeList, aOwners);
-      if (aShapeList.Extent() > 0) {
-        aShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
-        aShape->setImpl(new TopoDS_Shape(aShapeList.First()));
-      }
+  // Get sub-shapes from local selection
+  if (myUseSubShapes) {
+    if (!theValue.shape().IsNull()) {
+      aShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
+      aShape->setImpl(new TopoDS_Shape(theValue.shape()));
     }
+  }
 
-    // Check that the selection corresponds to selection type
-    if (myUseSubShapes) {
-      if (!acceptSubShape(aShape))
-        return;
-    } else {
-      if (!acceptObjectShape(aObject))
-        return;
-    }
-    if (isValid(aObject, aShape)) {
-      setObject(aObject, aShape);
-      emit focusOutWidget(this);
-    }
+  // Check that the selection corresponds to selection type
+  if (myUseSubShapes) {
+    if (!acceptSubShape(aShape))
+      return false;
+  } else {
+    if (!acceptObjectShape(aObject))
+      return false;
   }
+  if (isValid(aObject, aShape)) {
+    setObject(aObject, aShape);
+    emit focusOutWidget(this);
+  }
+  return true;
 }
 
 //********************************************************************
@@ -443,21 +446,17 @@ void ModuleBase_WidgetShapeSelector::raisePanel() const
 }
 
 //********************************************************************
-bool ModuleBase_WidgetShapeSelector::setValue(ModuleBase_WidgetValue* theValue)
-{
-  if (theValue) {
-    ModuleBase_WidgetValueFeature* aFeatureValue =
-        dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
-    if (aFeatureValue && aFeatureValue->object()) {
-      ObjectPtr aObject = aFeatureValue->object();
-      if (acceptObjectShape(aObject)) {
-        setObject(aObject);
-        return true;
-      }
-    }
-  }
-  return false;
-}
+//bool ModuleBase_WidgetShapeSelector::setSelection(ModuleBase_ViewerPrs theValue)
+//{
+//  if (theValue.object()) {
+//    ObjectPtr aObject = theValue.object();
+//    if (acceptObjectShape(aObject)) {
+//      setObject(aObject);
+//      return true;
+//    }
+//  }
+//  return false;
+//}
 
 //********************************************************************
 void ModuleBase_WidgetShapeSelector::activate()
index 0e479e1789d5628efcd8e14e8c1183642a28b2d9..d2b27af6be70e660be1cb3a6c7d4cc486fda34e3 100644 (file)
@@ -58,7 +58,7 @@ Q_OBJECT
   /// Set the given wrapped value to the current widget
   /// This value should be processed in the widget according to the needs
   /// \param theValue the wrapped widget value
-  virtual bool setValue(ModuleBase_WidgetValue* theValue);
+  virtual bool setSelection(ModuleBase_ViewerPrs theValue);
 
 
   /// The methiod called when widget is activated
diff --git a/src/ModuleBase/ModuleBase_WidgetValue.cpp b/src/ModuleBase/ModuleBase_WidgetValue.cpp
deleted file mode 100644 (file)
index 83a9d27..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// File:        ModuleBase_WidgetValue.cpp
-// Created:     25 Apr 2014
-// Author:      Natalia ERMOLAEVA
-
-#include <ModuleBase_WidgetValue.h>
-
-ModuleBase_WidgetValue::ModuleBase_WidgetValue()
-{
-}
-
-ModuleBase_WidgetValue::~ModuleBase_WidgetValue()
-{
-}
diff --git a/src/ModuleBase/ModuleBase_WidgetValue.h b/src/ModuleBase/ModuleBase_WidgetValue.h
deleted file mode 100644 (file)
index 38b8e51..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// File:        ModuleBase_WidgetValue.h
-// Created:     25 Apr 2014
-// Author:      Natalia ERMOLAEVA
-
-#ifndef ModuleBase_WidgetValue_H
-#define ModuleBase_WidgetValue_H
-
-#include <ModuleBase.h>
-
-/**\class ModuleBase_WidgetValue
- * \ingroup GUI
- * \brief Custom widget value. An abstract class to be redefined and to be set in the model widget
- */
-class MODULEBASE_EXPORT ModuleBase_WidgetValue
-{
- public:
-  /// Constructor
-  ModuleBase_WidgetValue();
-  /// Destructor
-  virtual ~ModuleBase_WidgetValue();
-};
-
-#endif
diff --git a/src/ModuleBase/ModuleBase_WidgetValueFeature.cpp b/src/ModuleBase/ModuleBase_WidgetValueFeature.cpp
deleted file mode 100644 (file)
index 43d3a7c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// File:        ModuleBase_WidgetValueFeature.cpp
-// Created:     25 Apr 2014
-// Author:      Natalia ERMOLAEVA
-
-#include <ModuleBase_WidgetValueFeature.h>
-
-#include <GeomAPI_Pnt2d.h>
-
-ModuleBase_WidgetValueFeature::ModuleBase_WidgetValueFeature()
-{
-}
-
-ModuleBase_WidgetValueFeature::~ModuleBase_WidgetValueFeature()
-{
-}
-
-void ModuleBase_WidgetValueFeature::setObject(const ObjectPtr& theFeature)
-{
-  myResult = theFeature;
-}
-
-const ObjectPtr& ModuleBase_WidgetValueFeature::object() const
-{
-  return myResult;
-}
-
-void ModuleBase_WidgetValueFeature::setPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
-{
-  myPoint = thePoint;
-}
-
-const std::shared_ptr<GeomAPI_Pnt2d>& ModuleBase_WidgetValueFeature::point() const
-{
-  return myPoint;
-}
diff --git a/src/ModuleBase/ModuleBase_WidgetValueFeature.h b/src/ModuleBase/ModuleBase_WidgetValueFeature.h
deleted file mode 100644 (file)
index d11a6bf..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// File:        ModuleBase_WidgetValueFeature.h
-// Created:     25 Apr 2014
-// Author:      Natalia ERMOLAEVA
-
-#ifndef ModuleBase_WidgetValueFeature_H
-#define ModuleBase_WidgetValueFeature_H
-
-#include <ModuleBase.h>
-#include <ModuleBase_WidgetValue.h>
-
-#include <ModelAPI_Result.h>
-
-#include <memory>
-
-class GeomAPI_Pnt2d;
-
-/**\class ModuleBase_WidgetValueFeature
- * \ingroup GUI
- * \brief Custom widget value. The widget contains a feature and 2D point.
- */
-class ModuleBase_WidgetValueFeature : public ModuleBase_WidgetValue
-{
- public:
-  /// Constructor
-  MODULEBASE_EXPORT ModuleBase_WidgetValueFeature();
-  /// Destructor
-  MODULEBASE_EXPORT virtual ~ModuleBase_WidgetValueFeature();
-
-  /// Fill the widget values by given point
-  /// \param thePoint the point
-  MODULEBASE_EXPORT void setObject(const ObjectPtr& theFeature);
-
-  /// Returns the widget values by given point
-  /// \return theFeature the current feature
-  MODULEBASE_EXPORT const ObjectPtr& object() const;
-
-  /// Fill the widget values by given point
-  /// \param thePoint the point
-  MODULEBASE_EXPORT void setPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
-
-  /// Returns the widget point
-  /// \return the current point
-  MODULEBASE_EXPORT const std::shared_ptr<GeomAPI_Pnt2d>& point() const;
-
- private:
-  ObjectPtr myResult;
-  std::shared_ptr<GeomAPI_Pnt2d> myPoint;
-};
-
-#endif
index 8c7ce43fc482323b5fdcdb79f6936abf7f2f430e..d21d25f0a835ed19efefaa56446cf9425e840b4c 100644 (file)
@@ -11,7 +11,6 @@
 #include <XGUI_SelectionMgr.h>
 #include <XGUI_Selection.h>
 
-#include <ModuleBase_WidgetValueFeature.h>
 #include <ModuleBase_DoubleSpinBox.h>
 #include <ModuleBase_Tools.h>
 #include <ModuleBase_IViewWindow.h>
@@ -89,19 +88,15 @@ PartSet_WidgetPoint2D::~PartSet_WidgetPoint2D()
 {
 }
 
-bool PartSet_WidgetPoint2D::setValue(ModuleBase_WidgetValue* theValue)
+bool PartSet_WidgetPoint2D::setSelection(ModuleBase_ViewerPrs theValue)
 {
+  Handle(V3d_View) aView = myWorkshop->viewer()->activeView();
   bool isDone = false;
-  if (theValue) {
-    ModuleBase_WidgetValueFeature* aFeatureValue =
-        dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
-    if (aFeatureValue) {
-      std::shared_ptr<GeomAPI_Pnt2d> aPoint = aFeatureValue->point();
-      if (aPoint) {
-        setPoint(aPoint->x(), aPoint->y());
-        isDone = true;
-      }
-    }
+  TopoDS_Shape aShape = theValue.shape();
+  double aX, aY;
+  if (getPoint2d(aView, aShape, aX, aY)) {
+    setPoint(aX, aY);
+    isDone = true;
   }
   return isDone;
 }
@@ -213,6 +208,24 @@ void PartSet_WidgetPoint2D::deactivate()
   myWorkshop->moduleConnector()->deactivateSubShapesSelection();
 }
 
+bool PartSet_WidgetPoint2D::getPoint2d(const Handle(V3d_View)& theView, 
+                                       const TopoDS_Shape& theShape, 
+                                       double& theX, double& theY) const
+{
+  if (!theShape.IsNull()) {
+    if (theShape.ShapeType() == TopAbs_VERTEX) {
+      const TopoDS_Vertex& aVertex = TopoDS::Vertex(theShape);
+      if (!aVertex.IsNull()) {
+        // A case when point is taken from existing vertex
+        gp_Pnt aPoint = BRep_Tool::Pnt(aVertex);
+        PartSet_Tools::convertTo2D(aPoint, mySketch, theView, theX, theY);
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
 
 void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
 {
@@ -222,23 +235,15 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous
   aSelection->selectedShapes(aShapes, aObjects);
   if (aShapes.Extent() > 0) {
     TopoDS_Shape aShape = aShapes.First();
-    if (!aShape.IsNull()) {
-      if (aShape.ShapeType() == TopAbs_VERTEX) {
-        const TopoDS_Vertex& aVertex = TopoDS::Vertex(aShape);
-        if (!aVertex.IsNull()) {
-          // A case when point is taken from existing vertex
-          gp_Pnt aPoint = BRep_Tool::Pnt(aVertex);
-          double aX, aY;
-          PartSet_Tools::convertTo2D(aPoint, mySketch, theWnd->v3dView(), aX, aY);
-          setPoint(aX, aY);
-
-          PartSet_Tools::setConstraints(mySketch, feature(), attributeID(),aX, aY);
-          emit vertexSelected(aObjects.front(), aShape);
-          QApplication::processEvents();
-          emit focusOutWidget(this);
-          return;
-        }
-      }
+    double aX, aY;
+    if (getPoint2d(theWnd->v3dView(), aShape, aX, aY)) {
+      setPoint(aX, aY);
+
+      PartSet_Tools::setConstraints(mySketch, feature(), attributeID(),aX, aY);
+      emit vertexSelected(aObjects.front(), aShape);
+      QApplication::processEvents();
+      emit focusOutWidget(this);
+      return;
     }
   }
   // A case when point is taken from mouse event
index 0e8ae42b158cf60a807716a5268eae56ee111721..4971997a80ad9ad862e2344f9d4d750a336c40b9 100644 (file)
@@ -12,9 +12,9 @@
 #include <QObject>
 
 #include <TopoDS_Shape.hxx>
+#include <V3d_View.hxx>
 
 class ModelAPI_Feature;
-class ModuleBase_WidgetValue;
 class ModuleBase_IWorkshop;
 class ModuleBase_DoubleSpinBox;
 class ModuleBase_IViewWindow;
@@ -44,7 +44,7 @@ Q_OBJECT
   /// Set the given wrapped value to the current widget
   /// This value should be processed in the widget according to the needs
   /// \param theValue the wrapped widget value
-  virtual bool setValue(ModuleBase_WidgetValue* theValue);
+  virtual bool setSelection(ModuleBase_ViewerPrs theValue);
 
   /// Saves the internal parameters to the given feature
   /// \param theObject a model feature to be changed
@@ -97,6 +97,9 @@ protected slots:
   void onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent);
 
  private:
+   bool getPoint2d(const Handle(V3d_View)& theView, const TopoDS_Shape& theShape, 
+                   double& theX, double& theY) const;
+
   XGUI_Workshop* myWorkshop;
 
   QGroupBox* myGroupBox;  ///< the parent group box for all intenal widgets
index 29c0ad56b66f643e65626ae763fd879d33526ac9..9fdbc3f2773d6962fb5f509a73b7421f7efbbc8a 100644 (file)
@@ -5,7 +5,6 @@
 #include "PartSet_WidgetPoint2dDistance.h"
 #include "PartSet_Tools.h"
 
-#include <ModuleBase_WidgetValueFeature.h>
 #include <ModuleBase_DoubleSpinBox.h>
 #include <ModuleBase_IViewWindow.h>
 
index 7c2364780f69eebdc2d99579dce5aa8f88dd59dd..84d962a06982de936d8ec59b1b8bef002602ac5a 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <ModelAPI_CompositeFeature.h>
 
-//class ModuleBase_WidgetValue;
 class GeomAPI_Pnt2d;
 class XGUI_Workshop;
 class ModuleBase_IViewWindow;