Changeset 8909 in ntrip for trunk/BNC/src/map/bncmapwin.cpp


Ignore:
Timestamp:
Mar 22, 2020, 1:28:42 PM (4 years ago)
Author:
stuerze
Message:

try to reanimate map view using QWebEngineWidgets only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/map/bncmapwin.cpp

    r8260 r8909  
    3535 * Created:    08-Jun-2013
    3636 *
    37  * Changes:
     37 * Changes:    A. Stuerze
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    5656  _currLon =  8.66496871; // BKG longitude
    5757
    58 #ifdef QT_WEBENGINE
    5958  _webView = new QWebEngineView(this);
    60 #else
    61   _webView = new QWebView(this);
    62 #endif
    6359
    6460  connect(_webView, SIGNAL(loadFinished(bool)), this, SLOT(slotInitMap(bool)));
     
    6864  bncSettings settings;
    6965  _staID = settings.value("PPP/plotCoordinates").toByteArray();
    70 
    71   // Proxy Settings
    72   // --------------
    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   }
    7966
    8067  loadHtmlPage();
     
    141128  }
    142129  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));
    144131}
    145132
     
    168155
    169156  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));
    171158}
    172159
Note: See TracChangeset for help on using the changeset viewer.