AfriGIS Map SDK (BB10)  v 1.0.0
Provides easy integration of AfriGIS Maps into BB10 platform.
OpenGLView.hpp
1 /*
2  * Copyright (c) 2011-2012 Research In Motion Limited.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef OPENGLVIEW_HPP
19 #define OPENGLVIEW_HPP
20 
21 #include <stdlib.h>
22 #include <screen/screen.h>
23 #include <sys/platform.h>
24 
25 #include <bps/navigator.h>
26 #include <bps/screen.h>
27 #include <bps/bps.h>
28 #include <bps/event.h>
29 
30 #include <EGL/egl.h>
31 #include <GLES/gl.h>
32 #include <GLES/glext.h>
33 
34 #include <ft2build.h>
35 #include FT_FREETYPE_H
36 
37 #include "png.h"
38 #include "jpeglib.h"
39 
40 #include <QtCore/QObject>
41 #include <QtCore/QVariant>
42 
43 
44 
50 class OpenGLView : public QObject {
51 
52  Q_OBJECT
53 
54 public:
55 
60  QString viewID;
61 
66  double translateX,translateY;
67 
72  double scaleX,scaleY;
73 
79 
84  virtual ~OpenGLView(){}
85 
86  //virtual int initialize(EGLContext egl_ctx, EGLConfig egl_conf, EGLDisplay egl_disp, screen_context_t screen_cxt, int usage) = 0;
87  //virtual void handleScreenEvent(bps_event_t *event);
88  //virtual void handleNavigatorEvent(bps_event_t *event);
89 
94  virtual void update() = 0;
95 
100  virtual void render() = 0;
101 
106  virtual void renderNow() = 0;
107 
112  virtual void pan(float moveX,float moveY)=0;
113 
118  virtual void zoom(float moveX,float moveY,double scaleX,double scaleY)=0;
119 
124  virtual void setMap()=0;
125 
126  //virtual void cleanup() = 0;
127 
128 
129 public slots:
130 
135  virtual void loadTiles()=0;
136 
137 
138 };
139 
140 #endif /* OPENGLVIEW_HPP */
141 
OpenGLView()
private.
Definition: OpenGLView.hpp:78
double translateX
private.
Definition: OpenGLView.hpp:66
double scaleX
private.
Definition: OpenGLView.hpp:72
virtual void pan(float moveX, float moveY)=0
private.
virtual void render()=0
private.
QString viewID
private.
Definition: OpenGLView.hpp:60
virtual void zoom(float moveX, float moveY, double scaleX, double scaleY)=0
private.
virtual void update()=0
private.
private.
Definition: OpenGLView.hpp:50
virtual void loadTiles()=0
private.
virtual void setMap()=0
private.
virtual void renderNow()=0
private.
virtual ~OpenGLView()
private.
Definition: OpenGLView.hpp:84