]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom.git into Dev_1.1.0
authorsbh <sergey.belash@opencascade.com>
Fri, 6 Feb 2015 16:41:09 +0000 (19:41 +0300)
committersbh <sergey.belash@opencascade.com>
Fri, 6 Feb 2015 16:41:09 +0000 (19:41 +0300)
21 files changed:
src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py
src/GeomAPI/GeomAPI_AISObject.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_ResultBody.cpp
src/ModuleBase/ModuleBase_IModule.cpp
src/ModuleBase/ModuleBase_IModule.h
src/ModuleBase/ModuleBase_IViewer.h
src/NewGeom/NewGeom_SalomeViewer.cpp
src/NewGeom/NewGeom_SalomeViewer.h
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_WidgetSketchLabel.h
src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp
src/SketchPlugin/SketchPlugin_Feature.h
src/SketchPlugin/SketchPlugin_Plugin.cpp
src/SketchPlugin/SketchPlugin_Sketch.h
src/XGUI/XGUI_ContextMenuMgr.h
src/XGUI/XGUI_ViewerProxy.cpp
src/XGUI/XGUI_ViewerProxy.h

index e69b259fe73e248ffcc950f15fd775f2cc918af8..c4bf4a6ae239da7b1736a17d79125dbb6a98d0c2 100644 (file)
@@ -40,6 +40,7 @@ class ExportFeature(ModelAPI.ModelAPI_Feature):
 
     ## Exports all bodies
     def exportBodies(self):
+        global ShapeIndex
         kResultBodyType = "Bodies"
         aPartSize = self.Part.size(kResultBodyType)
         if aPartSize == 0:
@@ -56,7 +57,7 @@ class ExportFeature(ModelAPI.ModelAPI_Feature):
             aDump = aShape.getShapeStream()
             # Load shape to SALOME Geom
             aBrep = self.geompy.RestoreShape(aDump)
-            self.geompy.addToStudy(aBrep, "NewGeomShape_{0}".format(idx + 1))
+            self.geompy.addToStudy(aBrep, aBodyResult.data().name())
             self.geomObjects.append([aShape, aBrep])
 
     ## Exports all groups
index aea1179d62076fc4aaddd0a1c44f53950acf8787..5e0c21b44ae344824eff4008ce15cf299a561dab 100644 (file)
@@ -274,6 +274,8 @@ void GeomAPI_AISObject::setColor(const int& theColor)
   if (!aDimAIS.IsNull()) {
     aDimAIS->DimensionAspect()->SetCommonColor(aColor);
   }
+  Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
+  aContext->SetColor(anAIS, aColor, false);
 }
 
 void GeomAPI_AISObject::setWidth(const double& theWidth)
@@ -296,6 +298,8 @@ void GeomAPI_AISObject::setColor(int theR, int theG, int theB)
   if (!aDimAIS.IsNull()) {
     aDimAIS->DimensionAspect()->SetCommonColor(aColor);
   }
+  Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
+  aContext->SetColor(anAIS, aColor, false);
 }
 
 bool GeomAPI_AISObject::empty() const
index b6bbd8e153894b384a4e6b7bd64c98f536a7a62c..00111809ff5b962302a2faa9b69b8c15c8ee8b5a 100644 (file)
@@ -384,6 +384,7 @@ void Model_AttributeSelection::selectBody(
       return;
     }
   }
+  //BRepTools::Write(aNewShape, "Selection0.brep");
   aSel.Select(aNewShape, aContext); 
 }
 
@@ -615,8 +616,10 @@ std::string Model_AttributeSelection::namingName()
   TopoDS_Shape aSubShape = aSubSh->impl<TopoDS_Shape>();
   TopoDS_Shape aContext  = aCont->shape()->impl<TopoDS_Shape>();
 #ifdef DEB_NAMING
+  if(aSubShape.ShapeType() == TopAbs_COMPOUND) {
   BRepTools::Write(aSubShape, "Selection.brep");
   BRepTools::Write(aContext, "Context.brep");
+  }
 #endif
   std::shared_ptr<Model_Document> aDoc = 
     std::dynamic_pointer_cast<Model_Document>(aCont->document());
@@ -632,7 +635,11 @@ std::string Model_AttributeSelection::namingName()
          case TopAbs_EDGE:
                  {
                  // name structure: F1 | F2 [| F3 | F4], where F1 & F2 the faces which gives the Edge in trivial case
-                 // if it is not atrivial case we use localization by neighbours. F3 & F4 - neighbour faces             
+                 // if it is not atrivial case we use localization by neighbours. F3 & F4 - neighbour faces    
+                 if (BRep_Tool::Degenerated(TopoDS::Edge(aSubShape))) {
+                         aName = "Degenerated_Edge";
+                         break;
+                 }    
                  TopTools_IndexedDataMapOfShapeListOfShape aMap;
                  TopExp::MapShapesAndAncestors(aContext, TopAbs_EDGE, TopAbs_FACE, aMap);
                  TopTools_IndexedMapOfShape aSMap; // map for ancestors of the sub-shape
@@ -716,12 +723,24 @@ std::string Model_AttributeSelection::namingName()
                        //n = aList.Extent();
 #endif
                        int n = aList.Extent();
-                       if(n < 3) { // open topology case => via edges
+                       if(n < 3) { // open topology case or Compound case => via edges
                          TopTools_IndexedDataMapOfShapeListOfShape aMap;
                      TopExp::MapShapesAndAncestors(aContext, TopAbs_VERTEX, TopAbs_EDGE, aMap);
-                         const TopTools_ListOfShape& aList2  = aMap.FindFromKey(aSubShape);
-                         if(aList2.Extent() >= 2)  { // regular solution
-                               TopTools_ListIteratorOfListOfShape itl(aList2);
+                         const TopTools_ListOfShape& aList22  = aMap.FindFromKey(aSubShape);
+                         if(aList22.Extent() >= 2)  { // regular solution
+#ifdef FIX_BUG1
+                       
+                           // bug! duplication; fix is below
+                           aFMap.Clear();
+                           TopTools_ListOfShape aListE;
+                           TopTools_ListIteratorOfListOfShape itl2(aList22);
+                       for (int i = 1;itl2.More();itl2.Next(),i++) {
+                           if(aFMap.Add(itl2.Value()))
+                                 aListE.Append(itl2.Value());
+                               }
+                           n = aListE.Extent();
+#endif
+                               TopTools_ListIteratorOfListOfShape itl(aListE);
                        for (int i = 1;itl.More();itl.Next(),i++) {
                              const TopoDS_Shape& anEdge = itl.Value();
                              std::string anEdgeName = GetShapeName(aDoc, anEdge, selectionLabel());
@@ -730,6 +749,9 @@ std::string Model_AttributeSelection::namingName()
                              else 
                                aName += "|" + anEdgeName;
                                }
+                         }//reg
+                         else { // dangle vertex: if(aList22.Extent() == 1)
+                                 //it should be already in DF
                          }
                        } 
                        else {
index 134a3f32d94de46ad088415ca96e530d22b9434c..1351c260e9febc2b81081eafeb6d0ed91b308ecc 100644 (file)
@@ -33,7 +33,7 @@
 // DEB
 //#include <TCollection_AsciiString.hxx>
 //#include <TDF_Tool.hxx>
-#define DEB_IMPORT 1
+//#define DEB_IMPORT 1
 
 Model_ResultBody::Model_ResultBody()
 {
@@ -435,6 +435,49 @@ void Model_ResultBody::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
        }
   }
 }
+
+//=======================================================================
+int findAmbiguities(const TopoDS_Shape&           theShapeIn,                                  
+                                         TopTools_ListOfShape&   theList) 
+{
+  int aNumEdges(0);
+  theList.Clear();
+  TopTools_IndexedDataMapOfShapeListOfShape subShapeAndAncestors;
+  TopAbs_ShapeEnum aTS(TopAbs_EDGE);
+  TopAbs_ShapeEnum aTA(TopAbs_FACE);
+  TopTools_MapOfShape aMap1, aMap2; // map1 - for edge ancestors; map2 - for keys => edges
+  TopTools_ListOfShape aKeyList;
+  TopExp::MapShapesAndAncestors(theShapeIn, aTS, aTA, subShapeAndAncestors);
+  for (Standard_Integer i = 1; i <= subShapeAndAncestors.Extent(); i++) {
+    const TopoDS_Shape& aKeyEdge1 = subShapeAndAncestors.FindKey(i);
+    const TopTools_ListOfShape& ancestors1 = subShapeAndAncestors.FindFromIndex(i);
+       aMap1.Clear();
+    TopTools_ListIteratorOfListOfShape it(ancestors1);
+       for(;it.More();it.Next()) aMap1.Add(it.Value()); // fill map with key ancestors => aKey1
+       for (Standard_Integer j = 1; j <= subShapeAndAncestors.Extent(); j++) {
+         if (i == j) continue;
+      const TopoDS_Shape& aKeyEdge2 = subShapeAndAncestors.FindKey(j);
+      const TopTools_ListOfShape& ancestors2 = subShapeAndAncestors.FindFromIndex(j);
+         if(ancestors1.Extent() == ancestors2.Extent() && ancestors1.Extent() > 1) {
+               int aNum (ancestors2.Extent());
+           TopTools_ListIteratorOfListOfShape it(ancestors2);
+           for(;it.More();it.Next()) 
+                       if(aMap1.Contains(it.Value())) aNum--;
+               if(aNum == 0) {
+                 if(aMap2.Add(aKeyEdge1)) 
+                       aKeyList.Append(aKeyEdge1);
+                 if(aMap2.Add(aKeyEdge2))
+                       aKeyList.Append(aKeyEdge2);
+               }
+         }
+       } // at the end ==> List of edges to be named in addition       
+  }
+  aNumEdges = aKeyList.Extent();
+  if(aNumEdges)
+       theList.Assign(aKeyList);       
+  return aNumEdges; 
+}
+
 //=======================================================================
 void Model_ResultBody::loadFirstLevel(
                     std::shared_ptr<GeomAPI_Shape> theShape, const std::string& theName, int&  theTag)
@@ -467,6 +510,16 @@ void Model_ResultBody::loadFirstLevel(
     itrShape->setImpl(new TopoDS_Shape(aShape));
        loadNextLevels(itrShape, theName, theTag); 
   }
+  TopTools_ListOfShape   aList;
+  if(findAmbiguities(aShape, aList)) {
+       TopTools_ListIteratorOfListOfShape it(aList);
+    for (; it.More(); it.Next(),theTag++) {
+         builder(theTag)->Generated(it.Value());
+         TCollection_AsciiString aStr(theTag);
+         aName = theName + aStr.ToCString();
+         buildName(theTag, aName);
+       }
+  }
 }
 
 //=======================================================================
index fd2686df308b3bc672761701127e048f974182b7..f7637f9d77128f8c720878d0d6a274720e97ea64 100644 (file)
@@ -97,6 +97,7 @@ void ModuleBase_IModule::createFeatures()
 {
   registerValidators();
   registerFilters();
+  registerProperties();
 
   Config_ModuleReader aXMLReader = Config_ModuleReader();
   aXMLReader.readAll();
index 88fa049d45e5549396bffe806882ffa4b77b1530..01896bb8fa3610406fe3e357df9130c9eeff5704 100644 (file)
@@ -128,6 +128,9 @@ protected slots:
   /// Register selection filters for this module\r
   virtual void registerFilters() {}\r
 \r
+  /// Register properties of this module\r
+  virtual void registerProperties() {}\r
+\r
   /// Returns new instance of operation object (used in createOperation for customization)\r
   virtual ModuleBase_Operation* getNewOperation(const std::string& theFeatureId);\r
 \r
index ba7ee1b28f536114857a3d6e195018efd5a86e49..3cf3bc5ab332613847b717ad872f65de38ee6f00 100644 (file)
@@ -75,6 +75,10 @@ Q_OBJECT
   /// Update current viewer
   virtual void update() = 0;
 
+  /// Method returns True if the viewer can process editing objects 
+  /// by mouse drugging. If this is impossible thet it has to return False.
+  virtual bool canDragByMouse() const { return true; }
+
 signals:
   /// Signal emited when last view window is closed
   void lastViewClosed();
index 0613d66243959e0efcc1ed29da32efc6039d2639..c3c887ae8e71763f04ae01fdc30409815be02ff5 100644 (file)
@@ -153,11 +153,19 @@ void NewGeom_SalomeViewer::onMouseMove(SUIT_ViewWindow* theView, QMouseEvent* th
 {
   OCCViewer_ViewWindow* aViewWnd = dynamic_cast<OCCViewer_ViewWindow*>(theView);
   Handle(AIS_InteractiveContext) aContext = AISContext();
-  if (aContext->HasDetected())
+  if (aContext->HasDetected()) // Set focus to provide key events in the view
     aViewWnd->getViewPort()->setFocus(Qt::MouseFocusReason);
   emit mouseMove(myView, theEvent);
 }
 
+//**********************************************
+bool NewGeom_SalomeViewer::canDragByMouse() const
+{
+  OCCViewer_Viewer* aViewer = mySelector->viewer();
+  return (aViewer->interactionStyle() != 0);
+}
+
+
 //**********************************************
 void NewGeom_SalomeViewer::onKeyPress(SUIT_ViewWindow* theView, QKeyEvent* theEvent)
 {
index 1809dd2430ed674a1f8bda6452b2ccda8aa9caa1..1d471d1dcc97ea11d04d0479e291c804aae2b6c6 100644 (file)
@@ -113,6 +113,9 @@ Q_OBJECT
   /// Update current viewer
   virtual void update();
 
+  /// Method returns True if the viewer can process editing objects 
+  /// by mouse drugging. If this is impossible thet it has to return False.
+  virtual bool canDragByMouse() const;
 
  private slots:
   void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
index 7fe2956f1a9d516ff55781c83c23dde2b344fd96..cd0f44109e5537405f39ef6e23bef37f2e84b40a 100644 (file)
@@ -51,6 +51,7 @@
 //#include <SketchPlugin_ConstraintRigid.h>
 
 #include <Events_Loop.h>
+#include <Config_PropManager.h>
 
 #include <StdSelect_TypeOfFace.hxx>
 #include <TopoDS_Vertex.hxx>
@@ -136,6 +137,14 @@ void PartSet_Module::registerFilters()
             new ModuleBase_FilterCustom(aSelectFilter));
 }
 
+void PartSet_Module::registerProperties()
+{
+  Config_PropManager::registerProp("Sketch planes", "planes_size", "Size", Config_Prop::Double,
+                                   PLANE_SIZE);
+  Config_PropManager::registerProp("Sketch planes", "planes_thickness", "Thickness",
+                                   Config_Prop::Integer, SKETCH_WIDTH);
+}
+
 void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation) 
 {
   if (theOperation->isEditOperation())
index 5bd2296297b61616e3f711c588359fa6e0d7bceb..13cfba1d9ac4cdf3a8fd61ffea08028e68911db8 100644 (file)
@@ -123,6 +123,9 @@ protected slots:
   /// Register selection filters for this module
   virtual void registerFilters();
 
+  /// Register properties of this module
+  virtual void registerProperties();
+
  private slots:
    /// Processing of vertex selected
    void onVertexSelected();
index 018001423cf4587155181f284f09482fffc8b65f..80fd683fef3c97a3d289cdb4cbced777e9b0fc52 100644 (file)
@@ -143,7 +143,14 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
   if (!(theEvent->buttons() & Qt::LeftButton))
     return;
 
+  // Clear dragging mode
+  myIsDragging = false;
+
   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
+  ModuleBase_IViewer* aViewer = aWorkshop->viewer();
+  if (!aViewer->canDragByMouse())
+    return;
+
   ModuleBase_Operation* aOperation = aWorkshop->currentOperation();
   if (aOperation && aOperation->isEditOperation()) {
     ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
@@ -154,9 +161,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
     }
   }
 
-  // Clear dragging mode
-  myIsDragging = false;
-
   // Use only for sketch operations
   if (aOperation && myCurrentSketch) {
     if (!PartSet_Tools::sketchPlane(myCurrentSketch))
@@ -176,7 +180,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
       return;
 
     // MoveTo in order to highlight current object
-    ModuleBase_IViewer* aViewer = aWorkshop->viewer();
     aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
 
     // Remember highlighted objects for editing
@@ -226,13 +229,15 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
 void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
 {
   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
+  ModuleBase_IViewer* aViewer = aWorkshop->viewer();
+  if (!aViewer->canDragByMouse())
+    return;
   ModuleBase_Operation* aOp = aWorkshop->currentOperation();
   if (aOp) {
     if (sketchOperationIdList().contains(aOp->id())) {
   get2dPoint(theWnd, theEvent, myClickedPoint);
 
       // Only for sketcher operations
-      ModuleBase_IViewer* aViewer = aWorkshop->viewer();
       if (myIsDragging) {
         if (myDragDone) {
           //aOp->commit();
index afe12cd2d39ce60e64dc1994fcb02387218cf796..159624efa7cd8309d092f426e3a7558f9427fc1b 100644 (file)
@@ -38,8 +38,6 @@
 #include <QTimer>
 #include <QApplication>
 
-#define PLANE_SIZE          "200"     
-#define SKETCH_WIDTH        "4"
 
 
 PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
@@ -214,7 +212,7 @@ AISObjectPtr PartSet_WidgetSketchLabel::createPreviewPlane(std::shared_ptr<GeomA
                                                            std::shared_ptr<GeomAPI_Dir> theNorm, 
                                                            const int theRGB[3])
 {
-  double aSize = Config_PropManager::integer("Sketch planes", "Size of planes", PLANE_SIZE);
+  double aSize = Config_PropManager::integer("Sketch planes", "planes_size", PLANE_SIZE);
   std::shared_ptr<GeomAPI_Shape> aFace = GeomAlgoAPI_FaceBuilder::square(theOrigin, theNorm, aSize);
   AISObjectPtr aAIS = AISObjectPtr(new GeomAPI_AISObject());
   aAIS->createShape(aFace);
index 9c9ffad2cc8a4007c626792c5d06b205821b9e44..d7b412f16b0024dffdfa9951693193d55c2595ca 100644 (file)
@@ -24,6 +24,12 @@ class QTimer;
 class XGUI_OperationMgr;
 class XGUI_Workshop;
 
+/// the plane edge width
+#define SKETCH_WIDTH        "4"
+
+/// face of the square-face displayed for selection of general plane
+#define PLANE_SIZE          "200"
+
 /**
 * \ingroup Modules
 * A model widget implementation for a label which provides specific behaviour 
index 5a7b9d5f9781283302182a23c2e8ad6a6013be56..00e973d1a0a04923945d885946fec94b6c1f5951 100644 (file)
@@ -44,6 +44,13 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious
 
     if (!aConst) 
       return thePrevious;
+
+    std::shared_ptr<SketchPlugin_Feature> aSketchFea = 
+      std::dynamic_pointer_cast<SketchPlugin_Feature>(ModelAPI_Feature::feature(aConst));
+    if (aSketchFea.get() != NULL) {
+      if (aSketchFea->isExternal())
+        return thePrevious;
+    }
     aShape = aConst->shape();
   }
   else {
index acf95e2a67554a19c01394ce5a55f7ceec15c8ad..66d59467b5682dfb6fc6ebcf95a0aeb1083edb73 100644 (file)
@@ -60,7 +60,7 @@ class SketchPlugin_Feature : public ModelAPI_Feature, public GeomAPI_ICustomPrs
   {
     AttributeSelectionPtr aAttr = data()->selection(EXTERNAL_ID());
     if (aAttr)
-      return aAttr->context().get() == NULL;
+      return aAttr->context().get() != NULL;
     return false;
   }
 
@@ -68,8 +68,11 @@ class SketchPlugin_Feature : public ModelAPI_Feature, public GeomAPI_ICustomPrs
   virtual void customisePresentation(AISObjectPtr thePrs)
   {
     // if this is an edge
-    if (thePrs->getShapeType() == 6)
+    if (thePrs->getShapeType() == 6) {
       thePrs->setWidth(3);
+      if (isExternal())
+        thePrs->setColor(0,255,0);
+    }
     // if this is a vertex
     //else if (thePrs->getShapeType() == 7)
     //  thePrs->setPointMarker(6, 2.);
index 452e07401f313c26d1d867ccaf2f0182f2b86f06..030f786f18b1d78d2e5d0f218b0dd3e0d98ebb85 100644 (file)
@@ -53,12 +53,6 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
   ModelAPI_Session::get()->registerPlugin(this);
 
   // register sketcher properties
-  Config_PropManager::registerProp("Sketch planes", "planes_color", "Color", Config_Prop::Color,
-                                   SKETCH_PLANE_COLOR);
-  Config_PropManager::registerProp("Sketch planes", "planes_size", "Size", Config_Prop::Double,
-                                   PLANE_SIZE);
-  Config_PropManager::registerProp("Sketch planes", "planes_thickness", "Thickness",
-                                   Config_Prop::Integer, SKETCH_WIDTH);
 
   Config_PropManager::registerProp("Visualization", "parallel_color", "Parallel constraint color",
                                    Config_Prop::Color, PARALLEL_COLOR);
index 84cda7dfba7a5604b83de15b59adb4ac64eb887c..cb3efbea6864f5cdc90751c99b056ed842421587 100644 (file)
 #include <GeomAPI_IPresentable.h>
 #include <list>
 
-/// the plane edge color
-#define SKETCH_PLANE_COLOR "#700000" 
-
-/// the plane edge width
-#define SKETCH_WIDTH        "4"
-
-/// face of the square-face displayed for selection of general plane
-#define PLANE_SIZE          "200"     
-
 /**\class SketchPlugin_Sketch
  * \ingroup Plugins
  * \brief Feature for creation of the new part in PartSet.
index 7fc3d6bfa9a45f4655fc92f6c805c6983e2cc6b6..a263c96979ce76c5e6d83b3bff37d52b73014f46 100644 (file)
@@ -46,7 +46,7 @@ Q_OBJECT
   void connectViewer() const;
 
   /// Add menu atems for viewer into the given menu (used in SALOME mode)
-  /// \param a popup menu to be shown in the viewer
+  /// \param theMenu a popup menu to be shown in the viewer
   void addViewerItems(QMenu* theMenu) const;
 
 signals:
index a4a55cca5f10ed96c784d60b5f06ca19b55dbb28..ec70496183d244a53a2d071c79e4f23bf9f9f130 100644 (file)
@@ -263,3 +263,14 @@ void XGUI_ViewerProxy::update()
 {
   myWorkshop->displayer()->updateViewer();
 }
+
+//***************************************
+bool XGUI_ViewerProxy::canDragByMouse() const
+{
+  if (myWorkshop->isSalomeMode()) {
+    ModuleBase_IViewer* aViewer = myWorkshop->salomeConnector()->viewer();
+    return aViewer->canDragByMouse();
+  } else {
+    return true;
+  }
+}
\ No newline at end of file
index e0894ff0f06724e4d6403102350e2925343a97b4..acd152d23685994672d71022f89b639febba10ce 100644 (file)
@@ -69,6 +69,10 @@ Q_OBJECT
   /// Update current viewer
   virtual void update();
 
+  /// Method returns True if the viewer can process editing objects 
+  /// by mouse drugging. If this is impossible thet it has to return False.
+  virtual bool canDragByMouse() const;
+
 private slots:
   void onTryCloseView(AppElements_ViewWindow*);
   void onDeleteView(AppElements_ViewWindow*);