navit  0.5.3-trunk
graphics_qt5.h
Go to the documentation of this file.
1 
20 #ifndef __graphics_qt_h
21 #define __graphics_qt_h
22 
23 #ifndef USE_QWIDGET
24 #define USE_QWIDGET 1
25 #endif
26 
27 #ifndef USE_QML
28 #define USE_QML 0
29 #endif
30 
31 #include <QBrush>
32 #include <QGuiApplication>
33 #include <QPainter>
34 #include <QPen>
35 #include <QPixmap>
36 #include <glib.h>
37 #if USE_QML
38 #include <QObject>
39 #include <QQmlApplicationEngine>
40 #include <QQuickWindow>
41 #endif
42 #if USE_QWIDGET
43 #include "QNavitWidget.h"
44 #endif
45 
46 #ifndef HAVE_FREETYPE
47 #define HAVE_FREETYPE 0
48 #endif
49 
50 #ifndef SAILFISH_OS
51 #define SAILFISH_OS 1
52 #endif
53 
54 #if HAVE_FREETYPE
56 #endif
57 
58 struct graphics_gc_priv;
59 struct graphics_priv;
60 
61 #if USE_QML
62 class GraphicsPriv : public QObject {
63  Q_OBJECT
64 public: GraphicsPriv(struct graphics_priv* gp);
65  ~GraphicsPriv();
66  void emit_update();
67 
68  struct graphics_priv* gp;
69 
70 signals:
71  void update();
72 };
73 #endif
74 
75 struct graphics_priv {
76 #if USE_QML
77  QQmlApplicationEngine* engine;
78  GraphicsPriv* GPriv;
79  QQuickWindow* window;
80 #endif
81 #if USE_QWIDGET
83 #endif
84  QPixmap* pixmap;
85  QPainter* painter;
86  int use_count;
87  int disable;
88  int x;
89  int y;
90  int scroll_x;
91  int scroll_y;
93 #if HAVE_FREETYPE
94  struct font_priv* (*font_freetype_new)(void* meth);
95  struct font_freetype_methods freetype_methods;
96 #endif
97 #ifdef SAILFISH_OS
100 #endif
102  GHashTable* overlays;
103  struct graphics_priv* parent;
104  bool root;
105  int argc;
106  char* argv[4];
107 };
108 
109 struct graphics_gc_priv {
111  QPen* pen;
112  QBrush* brush;
113 };
114 /* central exported application info */
115 extern QGuiApplication* navit_app;
116 
117 void resize_callback(struct graphics_priv* gr, int w, int h);
118 
119 #endif
struct callback * display_on_cb
Definition: graphics_qt5.h:98
QPixmap * pixmap
Definition: graphics_qt5.h:84
Definition: font_freetype.c:73
int h
Definition: graphics_cocoa.m:69
struct graphics_gc_priv * background_graphics_gc_priv
Definition: graphics_qt5.h:92
Interface to the FreeType 2 library, to render text as bitmaps.
int y
Definition: graphics_qt5.h:89
int scroll_y
Definition: graphics_qt5.h:91
int x
Definition: graphics_qt5.h:88
int w
Definition: graphics_cocoa.m:69
Definition: font_freetype.h:36
int argc
Definition: graphics_qt5.h:105
int use_count
Definition: graphics_qt5.h:86
GHashTable * overlays
Definition: graphics_qt5.h:102
struct parent parent
struct callback_list * callbacks
Definition: graphics_qt5.h:101
Definition: graphics_android.c:37
QBrush * brush
Definition: graphics_qt5.h:112
Definition: callback.c:37
QPainter * painter
Definition: graphics_qt5.h:85
Definition: event_glib.c:82
int disable
Definition: graphics_qt5.h:87
Definition: callback.c:27
QPen * pen
Definition: graphics_qt5.h:111
QGuiApplication * navit_app
Definition: graphics_qt5.cpp:78
Definition: window.h:23
Definition: graphics_android.c:76
static char * argv[]
Definition: graphics_qt_qpainter.cpp:512
struct event_timeout * display_on_ev
Definition: graphics_qt5.h:99
struct graphics_priv * graphics_priv
Definition: graphics_qt5.h:110
int scroll_x
Definition: graphics_qt5.h:90
void resize_callback(struct graphics_priv *gr, int w, int h)
Definition: graphics_qt5.cpp:672
QNavitWidget * widget
Definition: graphics_qt5.h:82
Definition: QNavitWidget.h:30
bool root
Definition: graphics_qt5.h:104