Moka Ihm Qt
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
gl-multi-window.qt.hh
Go to the documentation of this file.
1 /*
2  * Moka : Un modeleur de 3-G-cartes.
3  * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS,
6  * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/
7  *
8  * This file is part of Moka
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef GLWINDOW_MULTI_QT_HH
25 #define GLWINDOW_MULTI_QT_HH
26 
27 //------------- Include controler ----------------
28 #include "controler.hh"
29 #include "controler-gmap.hh"
30 
31 //------ Include autres classes developees -------
32 #include "creation-objet.qt.hh"
33 #include "dialog-operations.qt.hh"
34 #include "gl-window.qt.hh"
35 
36 #ifdef MODULE_ARCHITECTURE
37 #include "flap-selection.qt.hh"
38 #endif //MODULE_ARCHITECTURE
39 //------------------ Include QT -------------------
40 
41 class Window ;
42 class GLWindow ;
43 
44 class GLMultiWindow : public GLWindow
45 {
46 
47  Q_OBJECT
48 
49 public:
50 
57  GLMultiWindow ( QWorkspace * parent , Window * owner , GLWindow * share ,
58  SelectBar * selection ) ;
59 
63  virtual ~GLMultiWindow ( ) ;
64 
69  TViewId getViewId ( ) const ;
70 
75  virtual string getViewTypeString() const;
76 
80  virtual void closeEvent ( QCloseEvent * e ) ;
81 
86  virtual TViewId getCliquedViewId ( ) const ;
87 
92  virtual TViewId getDoubleCliquedViewId ( ) const ;
93 
94 protected:
95 
99  virtual void initializeGL ( ) ;
100 
104  virtual void paintGL ( ) ;
105 
109  virtual void creation ( ) ;
110 
115  virtual void mousePressEvent ( QMouseEvent * e ) ;
116 
121  virtual void mouseReleaseEvent ( QMouseEvent * e ) ;
122 
127  virtual void mouseMoveEvent ( QMouseEvent * e ) ;
128 
133  virtual void mouseDoubleClickEvent ( QMouseEvent * e ) ;
134 
135 private:
136 
137  // Methode indiquant dans quel cadre se trouve cette position
138  int cadre ( int x , int y ) ;
139 
140  // Identifiants associes aux 4 vues (cf. controler-views.hh):
141  TViewId FViewIds [ 4 ] ;
142 
143  // Numero de la vue cliquee : 0=Haut-Gauche, 1=Haut-droit,
144  // 2=Bas-Gauche, 3=Bas-droit
145  int FCliqued;
146 
147  // Numero de la vue double-cliquee : 0=Haut-Gauche, 1=Haut-droit,
148  // 2=Bas-Gauche, 3=Bas-droit
149  int FDoubleCliqued;
150 } ;
151 
152 #endif