Qwt Porting Notes / Sept-Oct 2015
  Phil, edit: 10-3-2015

Qwt Version History

Discussion Threads

"Qwt 6 backwards compatibility with Qwt 5" [May 2010]
http://www.qtcentre.org/threads/51994-Qwt-6-backwards-compatibility-with-Qwt-5

      
QwtData / Qwt5:
  • virtual size_t size() const
  • virtual double x(size_t i) const;
  • virtual double y(size_t i) const ;
QwtSeriesData<QPointF> / Qwt6:
  • virtual size_t size() const;
  • virtual QPointF sample( size_t i ) const;

Documentation:

Qwt Users Guide, 6.1.2 ... local copy
http://qwt.sourceforge.net/
http://cadswes2.colorado.edu/~philw/2015/Qwt/Qwt612-Doc/html/

Qwt Users Guide, 5.2.3  (from our own development build)
http://cadswes2.colorado.edu/~philw/2015/Qwt/Qwt523-Doc/html/

Qwt 6.1.2 / RiverWare Experimental Compilation:

Qwt 6.1.2 source code was acquired and placed at C:/Riverware/tools/Qwt-612_Qt-485/ (on Phil's Windows 7 development machine having Visual Studio 2010) and built, using "nmake" according to the "MSVC" instructions in doc/html/qwtinstall.html ... also available here:
The rough RiverWare 6.8 development compile (mostly not usable code) with Qwt 6.1.2 was put aside here:
... Note that "nmake" is the only documented build method in this new version of Qwt. In the past, for Qwt 5.2.3, we had used a provided tool to create Visual Studio vcxproj (etc.) files to build in Visual Studio. That tool doesn't seem to be provided anymore. That's no problem. The "nmake" build works just fine.

Qwt 5.2 Classes Used by RiverWare which are No Longer Present:

  1. QwtPlotPrintFilter -- base class of ExportPlotFilter and PrintPlotFilter.

    Qwt6 printing/image export uses the new QwtPlotRender class, no longer just a Qt QPainter. Printing and Image Export will need to be recoded, at the low-level. See PlotDialog::paintPlots(). See also this forum post.

  1. QwtScaleTransformation -- base class of ProbScaleTransformation.

    This has Qwt class has been replaced with QwtTransform in Qwt 6.1. See What's new in Qwt 6.1. Trivial change.

  2. QwtLegendItem -- maybe sort of changed to QwtLegendLabel, but lacks:

    Lacks: setCurvePen()
    Lacks: setSymbol()
    Lacks: setIdentifierMode (int mode);
    Lacks: setIdentifierWidth (int);

    Lacks: QwtLegendLabel::ShowLine;
    Lacks: QwtLegendLabel::ShowSymbol;
    Lacks: QwtLegendLabel::ShowText;

    Qwt 6 has "a new system for plot legends" ... QwtLegend has been decoupled from QwtPlot and can be replaced by application specific implementations. Plot items and the legend exchange the information using QwtLegendData

    http://qwt.sourceforge.net/qwtchangelog.html#LEGEND

    The following examples demonstrate how to use the new system:

    • examples/legends ... shows how to use the new legend system
    • examples/stockchart ... implements a QTreeView with checkable items as legend

Uses of Qwt 5.2 Method Calls Needing Porting:

Other Missing or Changed Methods:

Basic Data Type Substitutions:

:1,$s/qwtMax/qMax/g
:1,$s/qwtMin/qMin/g
:1,$s/qwtAbs/qAbs/g
:1,$s/qwtRound/qRound/g
:1,$s/QwtArray/QVector/g
:1,$s/QwtValueList/QList<double>/g
:1,$s/QwtDoublePoint/QPointF/g
:1,$s/QwtDoubleSize/QSizeF/g
:1,$s/QwtDoubleRect/QRectF/g
:1,$s/QwtPolygon/QPolygon/g
:1,$s/QwtPolygonF/QPolygonF/g
:1,$s/QwtDoubleInterval/QwtInterval/g
:1,$s/QwtDoublePoint3D/QwtPoint3D/g:
:1,$s/QwtLegendItem/QwtLegendLabel/g

Header File Include Substitutions:

:1,$s/qwt_legend_item.h/qwt_legend_label.h/g

Additional Includes:

#include "qwt_global.h"
#include "qwt_interval.h"
#include "qwt_point_3d.h"

#include "qwt_legend.h"
#include "qwt_legend_label.h"
 
#include <QList>
#include <QVector>
#include <QPoint>
#include <QSize>
#include <QRect>
#include <QPolygon>

---