![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef MOUSEZOOMBOX_H 00022 #define MOUSEZOOMBOX_H 00023 00024 #include <tulip/GLInteractor.h> 00025 00026 class QMouseEvent; 00027 class QKeyEvent; 00028 00029 namespace tlp { 00030 00031 class Graph; 00032 00033 class TLP_QT_SCOPE MouseBoxZoomer : public GLInteractorComponent { 00034 private: 00035 Qt::MouseButton mButton; 00036 Qt::KeyboardModifier kModifier; 00037 public: 00038 MouseBoxZoomer(Qt::MouseButton button = Qt::LeftButton, 00039 Qt::KeyboardModifier modifier = Qt::NoModifier); 00040 ~MouseBoxZoomer(); 00041 bool draw(GlMainWidget *); 00042 bool eventFilter(QObject *, QEvent *); 00043 00044 private: 00045 unsigned int x, y; 00046 int w, h; 00047 bool started; 00048 Graph *graph; 00049 }; 00050 00051 00052 } 00053 #endif //MOUSEZOOMBOX_H 00054 ///@endcond