[zygrib] 09/22: WIP on qwt patch
Alastair McKinstry
mckinstry at moszumanska.debian.org
Mon Nov 21 12:59:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to tag debian/8.0.1-1
in repository zygrib.
commit 6584fd6b5cb44e7a248c08ea565539a3f12cab78
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Wed Sep 23 07:15:18 2015 +0100
WIP on qwt patch
---
debian/patches/qt5.patch | 118 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 114 insertions(+), 4 deletions(-)
diff --git a/debian/patches/qt5.patch b/debian/patches/qt5.patch
index 63c8337..9d2f381 100644
--- a/debian/patches/qt5.patch
+++ b/debian/patches/qt5.patch
@@ -13,6 +13,44 @@ Index: zygrib-7.0.0/Makefile
INSTALLDIR=$(HOME)/zyGrib
+@@ -6,14 +6,12 @@ MACQTBIN=/opt/local/bin
+
+ all: zyGrib
+
+-SRC= src/*.h src/*.cpp src/*/*.h src/*/*.cpp \
+- src/qwt*/src/*.cpp src/qwt*/src/*.h
++SRC= src/*.h src/*.cpp src/*/*.h src/*/*.cpp
+
+ mac: $(SRC)
+ rm -f ./zyGrib
+ rm -fr ./zyGrib.app
+ rm -f src/Makefile
+- cd src/qwt-6.0.1/src; $(MACQTBIN)/qmake; make -j5
+ cd src; $(MACQTBIN)/qmake; make -j5
+
+ macclean:
+@@ -21,7 +19,6 @@ macclean:
+ rm -fr zyGrib.app
+ rm -f src/zyGrib
+ rm -f src/release/zyGrib.exe
+- cd src/qwt-6.0.1/src; $(MACQTBIN)/qmake; make clean
+ cd src; $(MACQTBIN)/qmake; make clean
+
+ clean:
+@@ -29,13 +26,11 @@ clean:
+ rm -fr zyGrib.app
+ rm -f src/zyGrib
+ rm -f src/release/zyGrib.exe
+- cd src/qwt-6.0.1/src; $(QMAKE); make clean
+ cd src; $(QMAKE); make clean
+
+ zyGrib: $(SRC)
+ @ echo
+ rm -f ./zyGrib
+- cd src/qwt-6.0.1/src; $(QMAKE); make -j5
+ cd src; $(QMAKE); make -j5 LFLAGS=" -Wl,--as-needed"
+ @ echo "-----------------------------------"
+ @ echo "#!/bin/bash" >> ./zyGrib
Index: zygrib-7.0.0/src/zyGrib.pro
===================================================================
--- zygrib-7.0.0.orig/src/zyGrib.pro
@@ -22,7 +60,7 @@ Index: zygrib-7.0.0/src/zyGrib.pro
# ----------------------------------------------------
win32 {
- INCLUDEPATH += C:/libs/include/
-+ INCLUDEPATH += C:/libs/include/ ..
++ INCLUDEPATH += C:/libs/include/ .. /usr/include/qwt
LIBS += -LC:/libs/lib/ -lbz2 -lz -lproj -lnova -lqwt
DESTDIR = release
RC_FILE += resource.rc
@@ -98,7 +136,7 @@ Index: zygrib-7.0.0/src/curvedrawer/CurveDrawer.h
#include "GriddedPlotter.h"
#include "DataDefines.h"
-@@ -24,14 +24,14 @@
+@@ -24,14 +24,17 @@
#include "CustomQwtClasses.h"
//#include "Polar.h"
@@ -112,7 +150,10 @@ Index: zygrib-7.0.0/src/curvedrawer/CurveDrawer.h
+#include <qwt/qwt_scale_engine.h>
+#include <qwt/qwt_plot_picker.h>
+#include <qwt/qwt_picker_machine.h>
-+#include <qwt/qwt_legend_item.h>
++#include <qwt/qwt_legend.h>
++#include <qwt/qwt_legend_label.h>
++#include <qwt/qwt_legend_data.h>
++#include <qwt/qwt_plot_canvas.h>
+#include <qwt/qwt_plot_marker.h>
-#include "qwt_plot.h"
@@ -124,7 +165,7 @@ Index: zygrib-7.0.0/src/curvedrawer/CustomQwtClasses.h
===================================================================
--- zygrib-7.0.0.orig/src/curvedrawer/CustomQwtClasses.h
+++ zygrib-7.0.0/src/curvedrawer/CustomQwtClasses.h
-@@ -10,10 +10,10 @@
+@@ -10,10 +10,11 @@
#ifndef CUSTOMQWTCLASSES_H
#define CUSTOMQWTCLASSES_H
@@ -135,10 +176,20 @@ Index: zygrib-7.0.0/src/curvedrawer/CustomQwtClasses.h
+#include <qwt/qwt_scale_draw.h>
+#include <qwt/qwt_plot_picker.h>
+#include <qwt/qwt_picker_machine.h>
++#include <qwt/qwt_plot_canvas.h>
+#include <qwt/qwt_plot_curve.h>
#include <QPainter>
#include <QVector>
#include <QDateTime>
+@@ -43,7 +44,7 @@ class CustomQwtPicker:
+ public QwtPlotPicker
+ {
+ public:
+- CustomQwtPicker( int, int, RubberBand, QwtPickerMachine*, DisplayMode, QwtPlotCanvas*, const QDateTime&, QwtPlotCurve* );
++ CustomQwtPicker( int, int, RubberBand, QwtPickerMachine*, DisplayMode, QWidget*, const QDateTime&, QwtPlotCurve* );
+
+ protected:
+ virtual QwtText trackerTextF( const QPointF& ) const;
Index: zygrib-7.0.0/src/main.cpp
===================================================================
--- zygrib-7.0.0.orig/src/main.cpp
@@ -157,3 +208,62 @@ Index: zygrib-7.0.0/src/main.cpp
#ifdef Q_OS_MACX
if ( QSysInfo::MacintoshVersion > QSysInfo::MV_10_8 )
+Index: zygrib-7.0.0/src/curvedrawer/CurveDrawer.cpp
+===================================================================
+--- zygrib-7.0.0.orig/src/curvedrawer/CurveDrawer.cpp
++++ zygrib-7.0.0/src/curvedrawer/CurveDrawer.cpp
+@@ -399,7 +399,7 @@ void CurveDrawer::initDataPlot( const in
+ QwtPlotPicker::CrossRubberBand,
+ new QwtPickerClickRectMachine,
+ QwtPicker::ActiveOnly,
+- qwtDataPlot->canvas(), dt,
++ qobject_cast<QwtPlotCanvas*>(qwtDataPlot->canvas()) , dt,
+ qwtCurve[0]);
+ // connect signals
+ // connect(qwtPicker, SIGNAL(selected(const QwtDoublePoint &)), qwtPicker, SLOT(selected(const QwtDoublePoint &)));
+@@ -407,7 +407,7 @@ void CurveDrawer::initDataPlot( const in
+ //------------------------------------------------------------------
+ // set up legend, activate curves
+ //
+- qwtLegend->setItemMode( QwtLegend::CheckableItem );
++ qwtLegend->setDefaultItemMode( QwtLegendData::Checkable );
+ qwtLegend->setLineWidth(10);
+ qwtDataPlot->insertLegend( qwtLegend, QwtPlot::BottomLegend );
+ activateLegend( qwtCurve[0], true );
+@@ -612,9 +612,11 @@ void CurveDrawer::activateLegend( QwtPlo
+ pItem->setVisible( on );
+ }
+ // check legend button
+- QWidget *qWid = qwtDataPlot->legend()->find( pItem );
+- if( qWid && qWid->inherits( "QwtLegendItem" ) )
+- ((QwtLegendItem *)qWid)->setChecked( on );
++ // QwtLegend* leg = qobject_cast<QwtLegend*>(qwtDataPlot->legend());
++ // leg->checkBox->setCheckState( on );
++ // QWidget *qWid = qwtDataPlot->legend()->find( pItem );
++ // QWidget *qWid = leg->find(pItem);;
++ // if( qWid && qWid->inherits( "QwtLegend" ) )
+
+ }
+ //-------------------------------------------------------------------------------
+Index: zygrib-7.0.0/src/curvedrawer/CustomQwtClasses.cpp
+===================================================================
+--- zygrib-7.0.0.orig/src/curvedrawer/CustomQwtClasses.cpp
++++ zygrib-7.0.0/src/curvedrawer/CustomQwtClasses.cpp
+@@ -7,7 +7,7 @@
+ */
+ #include "CustomQwtClasses.h"
+ #include "Util.h"
+-
++#include <qwt/qwt_point_data.h>
+ /*
+ *=========================================================================================
+ * Custom Scale Draw Class
+@@ -52,7 +52,7 @@ QwtText CustomQwtScale::label( double va
+ // Constructor for custom picker class with current date and picker machine
+ //-------------------------------------------------------------------------------
+ CustomQwtPicker::CustomQwtPicker( int xAxis, int yAxis, RubberBand rubberBand, QwtPickerMachine *pickerMachine, DisplayMode trackerMode,
+- QwtPlotCanvas *canvas, const QDateTime &dtCurrent, QwtPlotCurve *qwtCurve )
++ QWidget *canvas, const QDateTime &dtCurrent, QwtPlotCurve *qwtCurve )
+ : QwtPlotPicker( xAxis, yAxis, rubberBand, trackerMode, canvas )
+ {
+ dtCurPos = dtCurrent;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/zygrib.git
More information about the debian-science-commits
mailing list