MouseInterface.hh 3.53 KB
 Jan Möbius committed Aug 29, 2008 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ``````//============================================================================= // // OpenFlipper // Copyright (C) 2008 by Computer Graphics Group, RWTH Aachen // www.openflipper.org // //----------------------------------------------------------------------------- // // License // // OpenFlipper is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. `````` Jan Möbius committed Jan 14, 2009 15 ``````// `````` Jan Möbius committed Aug 29, 2008 16 17 18 19 ``````// OpenFlipper is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. `````` Jan Möbius committed Jan 14, 2009 20 ``````// `````` Jan Möbius committed Aug 29, 2008 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ``````// You should have received a copy of the GNU Lesser General Public License // along with OpenFlipper. If not, see . // //----------------------------------------------------------------------------- // // \$Revision\$ // \$Author\$ // \$Date\$ // //============================================================================= // // C++ Interface: Basic Interface for mouse events // `````` Jan Möbius committed Jan 14, 2009 38 ``````// Description: `````` Jan Möbius committed Aug 29, 2008 39 40 41 42 43 44 ``````// // // Author: Jan Moebius , (C) 2007 `````` Jan Möbius committed Jan 14, 2009 45 46 ``````#ifndef MOUSEINTERFACE_HH #define MOUSEINTERFACE_HH `````` Jan Möbius committed Aug 29, 2008 47 48 `````` #include `````` Jan Möbius committed Jan 14, 2009 49 50 51 52 `````` /** \brief Interface for all plugins which have to react on mouse events * * When using mouse events in your plugins implement this interface. Remember that `````` Jan Möbius committed Aug 29, 2008 53 `````` * all plugins may get these signals. Therefore you hav to check if the current pickingMode `````` Jan Möbius committed Jan 30, 2009 54 55 56 57 58 59 60 61 `````` * you want to react on is active before doing anything. Only the slotMouseEventIdentify is * independent of picking modes. * * The slotMouseWheelEvent anf slotMouseEvent Only get called when the system is in picking * mode. * * slotMouseEventIdentify will be used when question mode is active. */ `````` Jan Möbius committed Aug 29, 2008 62 ``````class MouseInterface { `````` Jan Möbius committed Jan 14, 2009 63 `````` `````` Jan Möbius committed Aug 29, 2008 64 `````` private slots : `````` Jan Möbius committed Jan 14, 2009 65 `````` `````` Jan Möbius committed Aug 29, 2008 66 `````` /** \brief Wheel Event from Main App `````` Jan Möbius committed Jan 14, 2009 67 `````` * `````` Jan Möbius committed Aug 29, 2008 68 69 `````` * This slot is called if a wheel event occured in the Viewer and is extended by * the current Mode set in the Viewer. You can add additional Picking Modes to `````` Jan Möbius committed Jan 14, 2009 70 `````` * the Viewer by using the picking interface. `````` Jan Möbius committed Aug 29, 2008 71 72 73 74 `````` * This slot will only get called in pickingMode. * @param _event Mousevent * @param _mode Name of the current Picking Mode. */ `````` Dirk Wilden committed Sep 30, 2008 75 `````` virtual void slotMouseWheelEvent(QWheelEvent * /*_event*/, const std::string & /*_mode*/) {}; `````` Jan Möbius committed Jan 14, 2009 76 `````` `````` Jan Möbius committed Aug 29, 2008 77 `````` /** \brief Mouse Event from Main App ( Picking Mode ) `````` Jan Möbius committed Jan 14, 2009 78 79 80 `````` * * This slot is called if a mouse event occured in the Viewer * This slot will only get called in pickingMode. `````` Jan Möbius committed Aug 29, 2008 81 `````` * Right button clicks will not be passed to the plugins as this is reserved for `````` Jan Möbius committed Jan 14, 2009 82 83 `````` * the context Menu. * `````` Jan Möbius committed Aug 29, 2008 84 85 `````` * @param _event Mousevent */ `````` Dirk Wilden committed Sep 30, 2008 86 `````` virtual void slotMouseEvent( QMouseEvent* /*_event*/ ) {}; `````` Jan Möbius committed Jan 14, 2009 87 `````` `````` Jan Möbius committed Aug 29, 2008 88 `````` /** \brief Mouse Event from Main App ( Identify Mode ) `````` Jan Möbius committed Jan 14, 2009 89 90 91 `````` * * This slot is called if a mouse event occured in the Viewer * This slot will only get called in identifyMode. `````` Jan Möbius committed Aug 29, 2008 92 `````` * Right button clicks will not be passed to the plugins as this is reserved for `````` Jan Möbius committed Jan 14, 2009 93 94 `````` * the context Menu. * `````` Jan Möbius committed Aug 29, 2008 95 `````` * @param _event Mousevent `````` Jan Möbius committed Jan 14, 2009 96 `````` */ `````` Jan Möbius committed Aug 29, 2008 97 `````` virtual void slotMouseEventIdentify() {}; `````` Jan Möbius committed Jan 14, 2009 98 99 100 `````` public : `````` Jan Möbius committed Aug 29, 2008 101 102 `````` /// Destructor virtual ~MouseInterface() {}; `````` Jan Möbius committed Jan 14, 2009 103 `````` `````` Jan Möbius committed Aug 29, 2008 104 105 106 ``````}; Q_DECLARE_INTERFACE(MouseInterface,"OpenFlipper.MouseInterface/1.0") `````` Jan Möbius committed Jan 14, 2009 107 `````` `````` Jan Möbius committed Aug 29, 2008 108 ``#endif // MOUSEINTERFACE_HH``