blob: 7bf939fcb20c427cda56b53058e1ef9a398787a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#pragma once
#include "drape_head/qtoglcontextfactory.hpp"
#include "map/feature_vec_model.hpp"
#include "map/navigator.hpp"
#include "render/scales_processor.hpp"
#include "drape/batcher.hpp"
#include "drape/gpu_program_manager.hpp"
#include "drape/uniform_values_storage.hpp"
//#define USE_TESTING_ENGINE
#if defined(USE_TESTING_ENGINE)
#include "drape_head/testing_engine.hpp"
#define DrapeEngine TestingEngine
#else
#include "drape_frontend/drape_engine.hpp"
#endif
#include <QtGui/QWindow>
#include <QtCore/QTimerEvent>
class DrapeSurface : public QWindow
{
Q_OBJECT
public:
DrapeSurface();
~DrapeSurface();
protected:
void exposeEvent(QExposeEvent * e);
void mousePressEvent(QMouseEvent * e);
void mouseMoveEvent(QMouseEvent * e);
void mouseReleaseEvent(QMouseEvent * e);
void wheelEvent(QWheelEvent * e);
private:
void CreateEngine();
void UpdateCoverage();
Q_SLOT void sizeChanged(int);
private:
m2::PointF GetDevicePosition(QPoint const & p);
bool m_dragState;
ScalesProcessor m_scales;
model::FeaturesFetcher m_model;
Navigator m_navigator;
private:
typedef dp::MasterPointer<dp::OGLContextFactory> TContextFactoryPtr;
typedef dp::MasterPointer<df::DrapeEngine> TEnginePrt;
TContextFactoryPtr m_contextFactory;
TEnginePrt m_drapeEngine;
};
|