Welcome to mirror list, hosted at ThFree Co, Russian Federation.

drape_surface.hpp « qt - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: af845fd36c7316d6f4bff4c756232256af3747cd (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
#pragma once

#include "qt/qtoglcontextfactory.hpp"

#include "map/framework.hpp"
#include "drape_frontend/drape_engine.hpp"

#include <QtGui/QWindow>

namespace qt
{

class DrapeSurface : public QWindow
{
  Q_OBJECT

public:
  DrapeSurface();
  ~DrapeSurface();

  void LoadState();
  void SaveState();

  Framework & GetFramework() { return m_framework; }

protected:
  void exposeEvent(QExposeEvent * e);
  void mousePressEvent(QMouseEvent * e);
  void mouseMoveEvent(QMouseEvent * e);
  void mouseReleaseEvent(QMouseEvent * e);
  void wheelEvent(QWheelEvent * e);

private:
  void CreateEngine();

  Q_SLOT void sizeChanged(int);

private:
  m2::PointF GetDevicePosition(QPoint const & p);

  bool m_dragState;

private:
  Framework m_framework;
  dp::MasterPointer<dp::OGLContextFactory> m_contextFactory;
};

} // namespace qt