File: mapview.h

package info (click to toggle)
rtklib 2.4.3.b34%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 114,300 kB
  • sloc: cpp: 57,065; ansic: 53,007; makefile: 994; fortran: 987; javascript: 309; sh: 25
file content (90 lines) | stat: -rw-r--r-- 2,175 bytes parent folder | download
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//---------------------------------------------------------------------------
#ifndef gmviewH
#define gmviewH
//---------------------------------------------------------------------------
#include <QDialog>
#include <QTimer>

#include "ui_mapview.h"

#ifdef QWEBKIT
class QWebView;
#endif
#ifdef QWEBENGINE
class QWebEngineView;
class MapViewPageState : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString text MEMBER text NOTIFY textChanged)
public:
    explicit MapViewPageState(QObject *parent = NULL): QObject(parent){}
    QString getText() {return text;}
signals:
    void textChanged(const QString &text);
private:
    QString text;
};
#endif

class QResizeEvent;
class QShowEvent;
class MapViewOptDialog;
//---------------------------------------------------------------------------
class MapView : public QDialog, private Ui::MapView
{
    Q_OBJECT

public slots:
    void BtnCloseClick();
    void Timer1Timer();
    void BtnZoomOutClick();
    void BtnZoomInClick();
    void BtnSyncClick();
    void PageLoaded(bool);

    void BtnOptClick();
    void MapSel1Click();
    void MapSel2Click();
    void Timer2Timer();

protected:
    void resizeEvent(QResizeEvent*);
     void showEvent(QShowEvent*);

private:
#ifdef QWEBKIT
    QWebView *WebBrowser;
#endif
#ifdef QWEBENGINE
    QWebEngineView *WebBrowser;
    MapViewPageState *pageState;
#endif
    int MarkState[2];
    double Lat,Lon;
    double MarkPos[2][2];
    QTimer Timer1, Timer2;
    bool loaded;

    MapViewOptDialog *mapViewOptDialog;

    void ShowMapLL(void);
    void ShowMapGM(void);
    void ShowMap(int map);
    void SetView(int map, double lat, double lon, int zoom);
    void AddMark(int map, int index, double lat, double lon, int state);
    void UpdateMap(void);
    void SelectMap(int map);
    int  GetState(int map);
    void ExecFunc(int map, const QString &func);

public:
    int MapSel;

    explicit MapView(QWidget *parent = NULL);
    void SetCent(double lat, double lon);
    void SetMark(int index, double lat, double lon);
    void ShowMark(int index);
    void HideMark(int index);
};
//---------------------------------------------------------------------------
#endif