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 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
//---------------------------------------------------------------------------
#ifndef geviewH
#define geviewH
//---------------------------------------------------------------------------
#include <QMainWindow>
#include <QTimer>
#include "ui_geview.h"
#include "rtklib.h"
#ifdef QWEBKIT
class QWebView;
#endif
#ifdef QWEBENGINE
class QWebEngineView;
class GEPageState : public QObject
{
Q_OBJECT
Q_PROPERTY(QString text MEMBER text NOTIFY textChanged)
Q_PROPERTY(QString view MEMBER view NOTIFY viewChanged)
public:
explicit GEPageState(QObject *parent=NULL): QObject(parent){}
QString getText() {return text;}
QString getView() {return view;}
signals:
void textChanged(const QString &text);
void viewChanged(const QString &view);
private:
QString text;
QString view;
};
#endif
class QShowEvent;
//---------------------------------------------------------------------------
class GoogleEarthView : public QMainWindow, private Ui::GoogleEarthView
{
Q_OBJECT
public slots:
void FormCreate();
void BtnGENormClick();
void BtnGETiltClick();
void BtnOpt1Click();
void BtnHeadingClick();
void BtnCloseClick();
void BtnFixCentClick();
void BtnEnaAltClick();
void BtnShrinkPressed();
void BtnShrinkReleased();
void BtnExpandPressed();
void BtnExpandReleased();
void BtnRotLPressed();
void BtnRotLReleased();
void BtnRotRPressed();
void BtnRotRReleased();
void BtnOptClick();
void Timer1Timer();
void Timer2Timer();
void PageLoaded(bool);
private:
int State,Expand,Rotate,MarkVis[2],TrackVis[2];
double Lat,Lon,Range,Heading,LatSet,LonSet,RangeSet,HeadingSet;
double MarkPos[2][2];
QTimer Timer1,Timer2;
bool loaded;
#ifdef QWEBKIT
QWebView *WebBrowser;
#endif
#ifdef QWEBENGINE
QWebEngineView *WebBrowser;
GEPageState *pageState;
#endif
void UpdateOpts (void);
void UpdateEnable(void);
void ExecFunc (const QString &func);
public:
explicit GoogleEarthView(QWidget *parent=NULL);
void Init (void);
void Clear (void);
void SetView (double lat, double lon, double range, double heading);
void SetCent (double lat, double lon);
void SetRange (double range);
void SetHeading (double angle);
void SetMark (int index, const double *pos);
void ShowMark (int index);
void HideMark (int index);
void ClearTrack (int index);
int UpdateTrack(int index, solbuf_t *sol);
void ShowTrack (int index);
void HideTrack (int index);
void UpdatePoint(void);
void ShowPoint (void);
void HidePoint (void);
void SetOpts (const int *opts);
void GetOpts (int *opts);
};
//---------------------------------------------------------------------------
#endif
|