HyperspaceExplorer 0.7.1
|
00001 /* 00002 Hyperspace Explorer - visualizing higher-dimensional geometry 00003 Copyright (C) 2010 Lene Preuss <lene.preuss@gmail.com> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License along 00016 with this program; if not, write to the Free Software Foundation, Inc., 00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 00019 */ 00020 00021 #ifndef MOUSEHANDLER_H 00022 #define MOUSEHANDLER_H 00023 00024 #include "4DView.h" 00025 00027 00028 class C4DView::MouseHandler4D { 00029 public: 00031 MouseHandler4D(C4DView *); 00032 ~MouseHandler4D(); 00033 00035 void mouseMoveEvent(QMouseEvent *); 00037 void mousePressEvent(QMouseEvent *); 00039 void mouseReleaseEvent( QMouseEvent *); 00041 void mouseDoubleClickEvent( QMouseEvent *); 00042 00043 private: 00045 void setm_LeftDownPos(QPoint b) { m_LeftDownPos = b; } 00047 QPoint LeftDownPos() const { return m_LeftDownPos; } 00049 void setm_MidDownPos(QPoint b) { m_MidDownPos = b; } 00051 QPoint MidDownPos() const { return m_MidDownPos; } 00053 void setm_RightDownPos(QPoint b) { m_RightDownPos = b; } 00055 QPoint RightDownPos() const { return m_RightDownPos; } 00056 00058 void setTakingSpinValues(bool b) { m_TakingSpinValues = b; } 00060 bool TakingSpinValues() const { return m_TakingSpinValues; } 00061 00062 C4DView *parent; 00063 00064 QPoint m_LeftDownPos; 00065 QPoint m_MidDownPos; 00066 QPoint m_RightDownPos; 00067 00069 bool m_TakingSpinValues; 00070 00071 }; 00072 00073 #endif