Changeset 8260 in ntrip for trunk


Ignore:
Timestamp:
Jan 18, 2018, 11:34:35 AM (6 years ago)
Author:
stuerze
Message:

see #105: adaptations to allow for QtWebkit or QtWebEngine according to it's availability

Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r6446 r8260  
    3535 * Created:    08-Jun-2013
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    5656  _currLon =  8.66496871; // BKG longitude
    5757
     58#ifdef QT_WEBENGINE
     59  _webView = new QWebEngineView(this);
     60#else
    5861  _webView = new QWebView(this);
     62#endif
     63
    5964  connect(_webView, SIGNAL(loadFinished(bool)), this, SLOT(slotInitMap(bool)));
    6065
     
    7580  loadHtmlPage();
    7681
    77   _webView->show(); 
     82  _webView->show();
    7883
    7984  _statusLabel = new QLabel;
     
    99104}
    100105
    101 // 
     106//
    102107////////////////////////////////////////////////////////////////////////////
    103108void bncMapWin::loadHtmlPage() {
     
    123128}
    124129
    125 // 
     130//
    126131////////////////////////////////////////////////////////////////////////////
    127132void bncMapWin::slotInitMap(bool isOk) {
     
    139144}
    140145
    141 // 
     146//
    142147////////////////////////////////////////////////////////////////////////////
    143148void bncMapWin::gotoLocation(double lat, double lon) {
     
    166171}
    167172
    168 // 
     173//
    169174////////////////////////////////////////////////////////////////////////////
    170175void bncMapWin::slotNewPosition(QByteArray staID, bncTime /* time */, QVector<double> xx) {
  • trunk/BNC/src/map/bncmapwin.h

    r8252 r8260  
    2626#define BNCMAPWIN_H
    2727
     28#ifdef QT_WEBENGINE
     29  #include <QWebEngineView>
     30#else
     31  #include <QWebView>
     32#endif
     33#include <QLabel>
     34#include <QHBoxLayout>
     35#include <QWebFrame>
    2836#include <QByteArray>
    2937#include <QDialog>
     
    4048
    4149 signals:
    42   void mapClosed(); 
     50  void mapClosed();
    4351
    4452 public slots:
     
    5462  void loadHtmlPage();
    5563  void gotoLocation(double lat, double lon);
    56   QWebView*  _webView;
     64#ifdef QT_WEBENGINE
     65  QWebEngineView*  _webView;
     66#else
     67  QWebView*        _webView;
     68#endif
    5769  QLabel*    _statusLabel;
    5870  double     _currLat;
  • trunk/BNC/src/src.pri

    r8231 r8260  
    135135# Check QtWebKit Library Existence
    136136# --------------------------------
    137 win32 {
    138   exists("$$[QT_INSTALL_BINS]/QtWebKit4.dll") {
     137exists("$$[QT_INSTALL_LIBS]/*WebKit*") {
    139138    DEFINES += QT_WEBKIT
    140   }
     139    QT      += webkitwidgets
     140    message("Configured with QtWebKit")
    141141}
    142142
    143 unix {
    144   exists("$$[QT_INSTALL_LIBS]/libQtWebKit.so") {
    145     DEFINES += QT_WEBKIT
    146   }
     143exists("$$[QT_INSTALL_LIBS]/*WebEngineWidgets*") {
     144    DEFINES += QT_WEBENGINE
     145    QT      += webenginewidgets
     146    message("Configured with QtWebEngine")
    147147}
    148148
    149 macx {
    150   exists("$$[QT_INSTALL_LIBS]/QtWebKit.framework") {
    151     DEFINES += QT_WEBKIT
    152   }
    153 }
    154 
    155 contains(DEFINES, QT_WEBKIT) {
    156   message("Configured with QtWebKit")
    157   QT          += webkit
     149contains(DEFINES, QT_WEBENGINE) | contains(DEFINES, QT_WEBKIT) {
    158150  HEADERS     += map/bncmapwin.h
    159151  SOURCES     += map/bncmapwin.cpp
     
    161153}
    162154else {
    163   message("No QtWebKit")
     155  message("Neither QtWebEngine nor QtWebKit is available")
    164156}
Note: See TracChangeset for help on using the changeset viewer.