1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef PartSet_MouseProcessor_H
21 #define PartSet_MouseProcessor_H
27 class ModuleBase_IViewWindow;
28 class ModuleBase_ViewerPrs;
32 * This is an interface to allow processing of mouse events. Implementation of necessary methods
33 * should be done in a child.
35 class PartSet_MouseProcessor
38 /// Processing the mouse move event in the viewer
39 /// \param theWindow a view window
40 /// \param theEvent a mouse event
41 PARTSET_EXPORT virtual void mouseMoved(ModuleBase_IViewWindow* theWindow,
42 QMouseEvent* theEvent) {}
43 /// Processing the mouse press event in the viewer
44 /// \param theWindow a view window
45 /// \param theEvent a mouse event
46 PARTSET_EXPORT virtual void mousePressed(ModuleBase_IViewWindow* theWindow,
47 QMouseEvent* theEvent) {}
48 /// Processing the mouse release event in the viewer
49 /// \param theWindow a view window
50 /// \param theEvent a mouse event
51 PARTSET_EXPORT virtual void mouseReleased(ModuleBase_IViewWindow* theWindow,
52 QMouseEvent* theEvent) {}
53 /// Processing the mouse double click event in the viewer
54 /// \param theWindow a view window
55 /// \param theEvent a mouse event
56 PARTSET_EXPORT virtual void mouseDoubleClick(ModuleBase_IViewWindow* theWindow,
57 QMouseEvent* theEvent) {}
59 /// Fill preselection used in mouseReleased
60 virtual void setPreSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePreSelected,
61 ModuleBase_IViewWindow* theWnd,
62 QMouseEvent* theEvent) {}