Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #4425 from nyalldawson/qwt
Remove old code for handling QWT < 6.1
  • Loading branch information
nyalldawson committed Apr 27, 2017
2 parents f1d4ac3 + 348b65b commit 0674361
Show file tree
Hide file tree
Showing 75 changed files with 30 additions and 15,753 deletions.
2 changes: 1 addition & 1 deletion cmake/FindQwt.cmake
Expand Up @@ -34,7 +34,7 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
PATH_SUFFIXES qwt-qt5 qwt qwt5 qwt6
PATH_SUFFIXES qwt-qt5 qwt qwt6
)

IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
Expand Down
117 changes: 29 additions & 88 deletions src/app/CMakeLists.txt
Expand Up @@ -372,94 +372,35 @@ IF (WITH_QWTPOLAR)
SET (WITH_INTERNAL_QWTPOLAR DEFAULT_WITH_INTERNAL_QWTPOLAR CACHE BOOL "Use internal build of QwtPolar")

IF(WITH_INTERNAL_QWTPOLAR)
IF(QWT_VERSION_STR VERSION_LESS "6.0.0")
SET(QGIS_APP_SRCS
${QGIS_APP_SRCS}
gps/qwtpolar-0.1/qwt_polar_canvas.cpp
gps/qwtpolar-0.1/qwt_polar_curve.cpp
gps/qwtpolar-0.1/qwt_polar_fitter.cpp
gps/qwtpolar-0.1/qwt_polar_grid.cpp
gps/qwtpolar-0.1/qwt_polar_itemdict.cpp
gps/qwtpolar-0.1/qwt_polar_item.cpp
gps/qwtpolar-0.1/qwt_polar_layout.cpp
gps/qwtpolar-0.1/qwt_polar_magnifier.cpp
gps/qwtpolar-0.1/qwt_polar_marker.cpp
gps/qwtpolar-0.1/qwt_polar_panner.cpp
gps/qwtpolar-0.1/qwt_polar_plot.cpp
gps/qwtpolar-0.1/qwt_polar_point.cpp
gps/qwtpolar-0.1/qwt_polar_spectrogram.cpp
)

SET (QGIS_APP_MOC_HDRS
${QGIS_APP_MOC_HDRS}
gps/qwtpolar-0.1/qwt_polar_canvas.h
gps/qwtpolar-0.1/qwt_polar_magnifier.h
gps/qwtpolar-0.1/qwt_polar_panner.h
gps/qwtpolar-0.1/qwt_polar_plot.h
)

SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-0.1)
ELSEIF(QWT_VERSION_STR VERSION_LESS "6.1.0")
SET(QGIS_APP_SRCS
${QGIS_APP_SRCS}
gps/qwtpolar-1.0/qwt_polar_canvas.cpp
gps/qwtpolar-1.0/qwt_polar_curve.cpp
gps/qwtpolar-1.0/qwt_polar_fitter.cpp
gps/qwtpolar-1.0/qwt_polar_grid.cpp
gps/qwtpolar-1.0/qwt_polar_item.cpp
gps/qwtpolar-1.0/qwt_polar_itemdict.cpp
gps/qwtpolar-1.0/qwt_polar_layout.cpp
gps/qwtpolar-1.0/qwt_polar_magnifier.cpp
gps/qwtpolar-1.0/qwt_polar_marker.cpp
gps/qwtpolar-1.0/qwt_polar_panner.cpp
gps/qwtpolar-1.0/qwt_polar_picker.cpp
gps/qwtpolar-1.0/qwt_polar_plot.cpp
gps/qwtpolar-1.0/qwt_polar_renderer.cpp
gps/qwtpolar-1.0/qwt_polar_spectrogram.cpp
)

SET (QGIS_APP_MOC_HDRS
${QGIS_APP_MOC_HDRS}
gps/qwtpolar-1.0/qwt_polar_canvas.h
gps/qwtpolar-1.0/qwt_polar_magnifier.h
gps/qwtpolar-1.0/qwt_polar_panner.h
gps/qwtpolar-1.0/qwt_polar_picker.h
gps/qwtpolar-1.0/qwt_polar_plot.h
gps/qwtpolar-1.0/qwt_polar_renderer.h
)

SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-1.0)
ELSE(QWT_VERSION_STR VERSION_LESS "6.1.0")
SET(QGIS_APP_SRCS
${QGIS_APP_SRCS}
gps/qwtpolar-1.1.1/qwt_polar_canvas.cpp
gps/qwtpolar-1.1.1/qwt_polar_curve.cpp
gps/qwtpolar-1.1.1/qwt_polar_fitter.cpp
gps/qwtpolar-1.1.1/qwt_polar_grid.cpp
gps/qwtpolar-1.1.1/qwt_polar_item.cpp
gps/qwtpolar-1.1.1/qwt_polar_itemdict.cpp
gps/qwtpolar-1.1.1/qwt_polar_layout.cpp
gps/qwtpolar-1.1.1/qwt_polar_magnifier.cpp
gps/qwtpolar-1.1.1/qwt_polar_marker.cpp
gps/qwtpolar-1.1.1/qwt_polar_panner.cpp
gps/qwtpolar-1.1.1/qwt_polar_picker.cpp
gps/qwtpolar-1.1.1/qwt_polar_plot.cpp
gps/qwtpolar-1.1.1/qwt_polar_renderer.cpp
gps/qwtpolar-1.1.1/qwt_polar_spectrogram.cpp
)

SET (QGIS_APP_MOC_HDRS
${QGIS_APP_MOC_HDRS}
gps/qwtpolar-1.1.1/qwt_polar_canvas.h
gps/qwtpolar-1.1.1/qwt_polar_magnifier.h
gps/qwtpolar-1.1.1/qwt_polar_panner.h
gps/qwtpolar-1.1.1/qwt_polar_picker.h
gps/qwtpolar-1.1.1/qwt_polar_plot.h
gps/qwtpolar-1.1.1/qwt_polar_renderer.h
)

SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-1.1.1)
ENDIF(QWT_VERSION_STR VERSION_LESS "6.0.0")
SET(QGIS_APP_SRCS
${QGIS_APP_SRCS}
gps/qwtpolar-1.1.1/qwt_polar_canvas.cpp
gps/qwtpolar-1.1.1/qwt_polar_curve.cpp
gps/qwtpolar-1.1.1/qwt_polar_fitter.cpp
gps/qwtpolar-1.1.1/qwt_polar_grid.cpp
gps/qwtpolar-1.1.1/qwt_polar_item.cpp
gps/qwtpolar-1.1.1/qwt_polar_itemdict.cpp
gps/qwtpolar-1.1.1/qwt_polar_layout.cpp
gps/qwtpolar-1.1.1/qwt_polar_magnifier.cpp
gps/qwtpolar-1.1.1/qwt_polar_marker.cpp
gps/qwtpolar-1.1.1/qwt_polar_panner.cpp
gps/qwtpolar-1.1.1/qwt_polar_picker.cpp
gps/qwtpolar-1.1.1/qwt_polar_plot.cpp
gps/qwtpolar-1.1.1/qwt_polar_renderer.cpp
gps/qwtpolar-1.1.1/qwt_polar_spectrogram.cpp
)

SET (QGIS_APP_MOC_HDRS
${QGIS_APP_MOC_HDRS}
gps/qwtpolar-1.1.1/qwt_polar_canvas.h
gps/qwtpolar-1.1.1/qwt_polar_magnifier.h
gps/qwtpolar-1.1.1/qwt_polar_panner.h
gps/qwtpolar-1.1.1/qwt_polar_picker.h
gps/qwtpolar-1.1.1/qwt_polar_plot.h
gps/qwtpolar-1.1.1/qwt_polar_renderer.h
)

SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-1.1.1)

SET(QWTPOLAR_LIBRARY "")
ENDIF(WITH_INTERNAL_QWTPOLAR)
Expand Down
24 changes: 0 additions & 24 deletions src/app/gps/qgsgpsinformationwidget.cpp
Expand Up @@ -40,10 +40,6 @@
// QWT Charting widget

#include <qwt_global.h>
#if (QWT_VERSION<0x060000)
#include <qwt_array.h>
#include <qwt_data.h>
#endif
#include <qwt_legend.h>
#include <qwt_plot.h>
#include <qwt_plot_grid.h>
Expand Down Expand Up @@ -502,12 +498,7 @@ void QgsGPSInformationWidget::disconnectGps()

void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation &info )
{
#if QWT_VERSION<0x060000
QwtArray<double> myXData;//qwtarray is just a wrapped qvector
QwtArray<double> mySignalData;//qwtarray is just a wrapped qvector
#else
QVector<QPointF> data;
#endif

// set validity flag and status from GPS data
// based on GGA, GSA and RMC sentences - the logic does not require all
Expand Down Expand Up @@ -563,21 +554,10 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation &in

if ( mStackedWidget->currentIndex() == 1 && info.satInfoComplete ) //signal
{
#if QWT_VERSION<0x060000
myXData.append( i );
mySignalData.append( 0 );
myXData.append( i );
mySignalData.append( currentInfo.signal );
myXData.append( i + 1 );
mySignalData.append( currentInfo.signal );
myXData.append( i + 1 );
mySignalData.append( 0 );
#else
data << QPointF( i, 0 );
data << QPointF( i, currentInfo.signal );
data << QPointF( i + 1, currentInfo.signal );
data << QPointF( i + 1, 0 );
#endif
} //signal

if ( mStackedWidget->currentIndex() == 2 && info.satInfoComplete ) //satellites
Expand Down Expand Up @@ -631,11 +611,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation &in

if ( mStackedWidget->currentIndex() == 1 && info.satInfoComplete ) //signal
{
#if (QWT_VERSION<0x060000)
mpCurve->setData( myXData, mySignalData );
#else
mpCurve->setSamples( data );
#endif
mpPlot->replot();
} //signal
#ifdef WITH_QWTPOLAR
Expand Down
70 changes: 0 additions & 70 deletions src/app/gps/qwtpolar-0.1/qwt_polar.h

This file was deleted.

0 comments on commit 0674361

Please sign in to comment.