Salome HOME
Fixed crash when attribute External in feature Projection changed.
[modules/shaper.git] / src / PartSet / PartSet_MouseProcessor.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_MouseProcessor.hxx
4 // Created:     21 Jul 2016
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef PartSet_MouseProcessor_H
8 #define PartSet_MouseProcessor_H
9
10 #include "PartSet.h"
11
12 #include <memory>
13
14 class ModuleBase_IViewWindow;
15 class ModuleBase_ViewerPrs;
16 class QMouseEvent;
17
18 /**
19  * This is an interface to allow processing of mouse events. Implementation of necessary methods
20 * should be done in a child.
21 */
22 class PartSet_MouseProcessor
23 {
24 public:
25   /// Processing the mouse move event in the viewer
26   /// \param theWindow a view window
27   /// \param theEvent a mouse event
28   PARTSET_EXPORT virtual void mouseMoved(ModuleBase_IViewWindow* theWindow,
29                                          QMouseEvent* theEvent) {}
30   /// Processing the mouse press event in the viewer
31   /// \param theWindow a view window
32   /// \param theEvent a mouse event
33   PARTSET_EXPORT virtual void mousePressed(ModuleBase_IViewWindow* theWindow,
34                                            QMouseEvent* theEvent) {}
35   /// Processing the mouse release event in the viewer
36   /// \param theWindow a view window
37   /// \param theEvent a mouse event
38   PARTSET_EXPORT virtual void mouseReleased(ModuleBase_IViewWindow* theWindow,
39                                             QMouseEvent* theEvent) {}
40   /// Processing the mouse double click event in the viewer
41   /// \param theWindow a view window
42   /// \param theEvent a mouse event
43   PARTSET_EXPORT virtual void mouseDoubleClick(ModuleBase_IViewWindow* theWindow,
44                                                QMouseEvent* theEvent) {}
45
46   /// Fill preselection used in mouseReleased
47   virtual void setPreSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePreSelected,
48                                ModuleBase_IViewWindow* theWnd,
49                                QMouseEvent* theEvent) {}
50 };
51
52 #endif