SHAPER  9.12.0
PartSet_MouseProcessor.h
1 // Copyright (C) 2014-2023 CEA, EDF
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef PartSet_MouseProcessor_H
21 #define PartSet_MouseProcessor_H
22 
23 #include "PartSet.h"
24 
25 #include <memory>
26 
27 #ifdef _MSC_VER
28 #pragma warning(disable: 4100)
29 #endif
30 
33 class QMouseEvent;
34 
40 {
41 public:
45  PARTSET_EXPORT virtual void mouseMoved(ModuleBase_IViewWindow* theWindow,
46  QMouseEvent* theEvent) {}
50  PARTSET_EXPORT virtual void mousePressed(ModuleBase_IViewWindow* theWindow,
51  QMouseEvent* theEvent) {}
55  PARTSET_EXPORT virtual void mouseReleased(ModuleBase_IViewWindow* theWindow,
56  QMouseEvent* theEvent) {}
60  PARTSET_EXPORT virtual void mouseDoubleClick(ModuleBase_IViewWindow* theWindow,
61  QMouseEvent* theEvent) {}
62 
64  virtual void setPreSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePreSelected,
65  ModuleBase_IViewWindow* theWnd,
66  QMouseEvent* theEvent) {}
67 };
68 
69 #endif
Interface to ViewWindow object which contains 3d scene.
Definition: ModuleBase_IViewWindow.h:34
Presentation.
Definition: ModuleBase_ViewerPrs.h:37
This is an interface to allow processing of mouse events.
Definition: PartSet_MouseProcessor.h:40
virtual void mouseDoubleClick(ModuleBase_IViewWindow *theWindow, QMouseEvent *theEvent)
Processing the mouse double click event in the viewer.
Definition: PartSet_MouseProcessor.h:60
virtual void mouseMoved(ModuleBase_IViewWindow *theWindow, QMouseEvent *theEvent)
Processing the mouse move event in the viewer.
Definition: PartSet_MouseProcessor.h:45
virtual void mousePressed(ModuleBase_IViewWindow *theWindow, QMouseEvent *theEvent)
Processing the mouse press event in the viewer.
Definition: PartSet_MouseProcessor.h:50
virtual void setPreSelection(const std::shared_ptr< ModuleBase_ViewerPrs > &thePreSelected, ModuleBase_IViewWindow *theWnd, QMouseEvent *theEvent)
Fill preselection used in mouseReleased.
Definition: PartSet_MouseProcessor.h:64
virtual void mouseReleased(ModuleBase_IViewWindow *theWindow, QMouseEvent *theEvent)
Processing the mouse release event in the viewer.
Definition: PartSet_MouseProcessor.h:55