00001 /* 00002 * Moka : Un modeleur de 3-G-cartes. 00003 * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC 00004 * http://www.sic.sp2mi.univ-poitiers.fr/ 00005 * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS, 00006 * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/ 00007 * 00008 * This file is part of Moka 00009 * 00010 * This program is free software: you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 #ifndef GLWINDOW_MULTI_QT_HH 00025 #define GLWINDOW_MULTI_QT_HH 00026 00027 //------------- Include controler ---------------- 00028 #include "controler.hh" 00029 #include "controler-gmap.hh" 00030 00031 //------ Include autres classes developees ------- 00032 #include "creation-objet.qt.hh" 00033 #include "dialog-operations.qt.hh" 00034 #include "gl-window.qt.hh" 00035 00036 #ifdef MODULE_ARCHITECTURE 00037 #include "flap-selection.qt.hh" 00038 #endif //MODULE_ARCHITECTURE 00039 //------------------ Include QT ------------------- 00040 00041 class Window ; 00042 class GLWindow ; 00043 00044 class GLMultiWindow : public GLWindow 00045 { 00046 00047 Q_OBJECT 00048 00049 public: 00050 00057 GLMultiWindow ( QWorkspace * parent , Window * owner , GLWindow * share , 00058 SelectBar * selection ) ; 00059 00063 virtual ~GLMultiWindow ( ) ; 00064 00069 TViewId getViewId ( ) const ; 00070 00075 virtual string getViewTypeString() const; 00076 00080 virtual void closeEvent ( QCloseEvent * e ) ; 00081 00086 virtual TViewId getCliquedViewId ( ) const ; 00087 00092 virtual TViewId getDoubleCliquedViewId ( ) const ; 00093 00094 protected: 00095 00099 virtual void initializeGL ( ) ; 00100 00104 virtual void paintGL ( ) ; 00105 00109 virtual void creation ( ) ; 00110 00115 virtual void mousePressEvent ( QMouseEvent * e ) ; 00116 00121 virtual void mouseReleaseEvent ( QMouseEvent * e ) ; 00122 00127 virtual void mouseMoveEvent ( QMouseEvent * e ) ; 00128 00133 virtual void mouseDoubleClickEvent ( QMouseEvent * e ) ; 00134 00135 private: 00136 00137 // Methode indiquant dans quel cadre se trouve cette position 00138 int cadre ( int x , int y ) ; 00139 00140 // Identifiants associes aux 4 vues (cf. controler-views.hh): 00141 TViewId FViewIds [ 4 ] ; 00142 00143 // Numero de la vue cliquee : 0=Haut-Gauche, 1=Haut-droit, 00144 // 2=Bas-Gauche, 3=Bas-droit 00145 int FCliqued; 00146 00147 // Numero de la vue double-cliquee : 0=Haut-Gauche, 1=Haut-droit, 00148 // 2=Bas-Gauche, 3=Bas-droit 00149 int FDoubleCliqued; 00150 } ; 00151 00152 #endif