Changeset 8909 in ntrip for trunk/BNC/src/map
- Timestamp:
- Mar 22, 2020, 1:28:42 PM (5 years ago)
- Location:
- trunk/BNC/src/map
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/map/bncmapwin.cpp
r8260 r8909 35 35 * Created: 08-Jun-2013 36 36 * 37 * Changes: 37 * Changes: A. Stuerze 38 38 * 39 39 * -----------------------------------------------------------------------*/ … … 56 56 _currLon = 8.66496871; // BKG longitude 57 57 58 #ifdef QT_WEBENGINE59 58 _webView = new QWebEngineView(this); 60 #else61 _webView = new QWebView(this);62 #endif63 59 64 60 connect(_webView, SIGNAL(loadFinished(bool)), this, SLOT(slotInitMap(bool))); … … 68 64 bncSettings settings; 69 65 _staID = settings.value("PPP/plotCoordinates").toByteArray(); 70 71 // Proxy Settings72 // --------------73 QString proxyHost = settings.value("proxyHost").toString();74 int proxyPort = settings.value("proxyPort").toInt();75 if (!proxyHost.isEmpty()) {76 QNetworkProxy proxy(QNetworkProxy::HttpProxy, proxyHost, proxyPort);77 _webView->page()->networkAccessManager()->setProxy(proxy);78 }79 66 80 67 loadHtmlPage(); … … 141 128 } 142 129 QString location = QString("%1, %2, %3, %4").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8).arg(mapWinDotSize).arg(mapWinDotColor); 143 _webView->page()-> mainFrame()->evaluateJavaScript(QString("initialize( %1 )").arg(location));130 _webView->page()->runJavaScript(QString("gotoLocation( %1 )").arg(location)); 144 131 } 145 132 … … 168 155 169 156 QString location = QString("%1, %2").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8); 170 _webView->page()-> mainFrame()->evaluateJavaScript(QString("gotoLocation( %1 )").arg(location));157 _webView->page()->runJavaScript(QString("gotoLocation( %1 )").arg(location)); 171 158 } 172 159 -
trunk/BNC/src/map/bncmapwin.h
r8264 r8909 25 25 #ifndef BNCMAPWIN_H 26 26 #define BNCMAPWIN_H 27 28 #ifdef QT_WEBENGINE 29 #include <QWebEngineView> 30 #include <QWebEnginePage> 31 #else 32 #include <QWebView> 33 #include <QWebFrame> 34 #endif 27 #include <QWebEngineView> 28 #include <QWebEnginePage> 35 29 #include <QLabel> 36 30 #include <QHBoxLayout> 37 31 #include <QByteArray> 38 32 #include <QDialog> 39 #include <QNetworkProxy>40 33 #include <QVector> 41 34 #include "bnctime.h" … … 63 56 void loadHtmlPage(); 64 57 void gotoLocation(double lat, double lon); 65 #ifdef QT_WEBENGINE66 58 QWebEngineView* _webView; 67 #else 68 QWebView* _webView; 69 #endif 70 QLabel* _statusLabel; 71 double _currLat; 72 double _currLon; 73 QByteArray _staID; 59 QWebEnginePage* _webPage; 60 QLabel* _statusLabel; 61 double _currLat; 62 double _currLon; 63 QByteArray _staID; 74 64 }; 75 65
Note:
See TracChangeset
for help on using the changeset viewer.