head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.16 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.14 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.12 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.10 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.8 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.6 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.4 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.2 pkgsrc-2024Q2-base:1.1; locks; strict; comment @# @; 1.1 date 2024.05.11.20.54.12; author adam; state Exp; branches; next ; commitid oRGyGyzvgzneLC9F; desc @@ 1.1 log @py-qwt-qt5: fix builds against qwt-qt5 6.1.6 and newer @ text @$NetBSD$ Builds against qwt-qt5 6.1.6 https://github.com/GauiStori/PyQt-Qwt/pull/22 --- sip/qwt_curve_fitter.sip.orig 2024-05-11 19:49:47.706766690 +0000 +++ sip/qwt_curve_fitter.sip @@@@ -17,6 +17,25 @@@@ class QwtCurveFitter public: virtual ~QwtCurveFitter(); + enum Mode + { + /*! + The fitting algorithm creates a polygon - the implementation + of fitCurvePath() simply wraps the polygon into a path. + + \sa QwtWeedingCurveFitter + */ + Polygon, + + /*! + The fitting algorithm creates a painter path - the implementation + of fitCurve() extracts a polygon from the path. + + \sa QwtSplineCurveFitter + */ + Path + }; + /*! Find a curve which has the best fit to a series of data points @@@@ -24,9 +43,10 @@@@ public: \return Curve points */ virtual QPolygonF fitCurve( const QPolygonF &polygon ) const = 0; + virtual QPainterPath fitCurvePath( const QPolygonF& polygon ) const = 0; protected: - QwtCurveFitter(); + explicit QwtCurveFitter( Mode mode ); private: QwtCurveFitter( const QwtCurveFitter & ); @@@@ -39,49 +59,20 @@@@ private: class QwtSplineCurveFitter: public QwtCurveFitter { %TypeHeaderCode -#include +#include %End public: - /*! - Spline type - The default setting is Auto - \sa setFitMode(), FitMode() - */ - enum FitMode - { - /*! - Use the default spline algorithm for polygons with - increasing x values ( p[i-1] < p[i] ), otherwise use - a parametric spline algorithm. - */ - Auto, - - //! Use a default spline algorithm - Spline, - - //! Use a parametric spline algorithm - ParametricSpline - }; - QwtSplineCurveFitter(); virtual ~QwtSplineCurveFitter(); - void setFitMode( FitMode ); - FitMode fitMode() const; - - void setSpline( const QwtSpline& ); - //const QwtSpline &spline() const; FIXME. - QwtSpline &spline(); - - void setSplineSize( int size ); - int splineSize() const; + void setSpline( QwtSpline* ); + //const QwtSpline* spline() const; + QwtSpline* spline(); virtual QPolygonF fitCurve( const QPolygonF & ) const; + virtual QPainterPath fitCurvePath( const QPolygonF& ) const; -private: - QPolygonF fitSpline( const QPolygonF & ) const; - QPolygonF fitParametric( const QPolygonF & ) const; //class PrivateData; //PrivateData *d_data; @@@@ -113,7 +104,7 @@@@ private: class QwtWeedingCurveFitter: public QwtCurveFitter { %TypeHeaderCode -#include +#include %End public: @