Salome HOME
refs #432: refactoring of the shape class
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Displayer.h
index c3dcfce3f95c365ec4e518bfc39423ade1d2f243..f99815ae0511ddeec48ac7a15e9846e3845e7a43 100644 (file)
@@ -65,17 +65,22 @@ public:
    */
   virtual QString  GetType() const;
 
+  /*
+   * Get the current cursor view position and save it in the displayer
+   * to be used in the obtaining the view coordinates of the cursor.
+   * \param theViewWindow a view window. If a view window is null, an active view is used
+   * only OCC and VTK views are processed
+   */
+  void             SaveCursorViewPosition( SUIT_ViewWindow* theViewWindow = 0 );
   /**
    * \brief Get the coodinates from the view window, projected on XOY plane
    * \param theViewWindow a view window
-   * \param theCursorPos a cursor position point
    * \param theXCoordinate a X coordinate
    * \param theXCoordinate an Y coordinate
    * \param theXCoordinate a Z coordinate, has a zero value because of the plane
    * \return true if the coordinates are got
    */
   bool             GetCursorViewCoordinates( SUIT_ViewWindow* theViewWindow,
-                                             const QPoint& theCursorPos,
                                              double& theXCoordinate,
                                              double& theYCoordinate,
                                              double& theZCoordinate );
@@ -124,6 +129,9 @@ private:
   typedef QMap< ObjectKind, HYDROGUI_PrsDriver* > PrsDriversMap;
   PrsDriversMap                   myPrsDriversMap;
   vtkNew<vtkWorldPointPicker>     myPicker;
+  int                             myXPosition;
+  int                             myYPosition;
+  bool                            myIsPositionSaved;
 };
 
 #endif