QCustomPlot 1.0.0-beta is ready for public testing!
These are the links for the packages:
QCustomPlot.tar.gz (Contains source, examples and documentation)
QCustomPlot-sharedlib.tar.gz (Contains shared library compilation/usage .pro files)
QCustomPlot-source.tar.gz (Contains source only)
In the beta phase, the public interface is not frozen, so suggestions for interface improvement are still very welcome for 1.0.0. After the beta phase, public interface changes that are backward-incompatible will only be introduced in the next major version (2.0.0)
I am especially interested in people using Qt 5.0.2 with MSVC, as I don’t have this combination available for testing at the moment.
For people who plan switching to QCustomPlot 1.0.0 once it’s final and have applications built on previous QCustomPlot versions, be aware that there are some source backward-incompatibilities. This was necessary because starting with the new versioning scheme, I wanted to get as many interface fixes/changes done before releasing 1.0.0. I have compiled a FAQ-Like list with questions that I believe might come up when porting from an old QCustomPlot version:
setPlotTitle is gone, how do I set a plot title now?
A plot title now is a layout element. You can add a title like this:
customPlot->plotLayout()->insertRow(0); // inserts an empty row above the default axis rect
customPlot->plotLayout()->addElement(0, 0, new QCPPlotTitle(customPlot, "Your Plot Title"));
where did setupFullAxesBox, setRangeDrag, setMargin etc. go?
Many functions related to the axis rect moved to the QCPAxisRect class. You can reach the default axis rect via
customPlot->axisRect(). From there, you can use the functions like you used to.
enable/disable range zoom and drag?
By default, the
Drag are now set to
Qt::Horizontal|Qt::Vertical. To enable range zooming/dragging, all you need to do now is set the corresponding interaction flag:
customPlot->setInteractions(QCP::iRangeZoom | QCP::iRangeDrag);
where did setSelected/setSelectable on QCPAxis and QCPLegend go?
they’re now called setSelectedParts/setSelectableParts reflecting the fact, that they don’t handle a bool but an enum with multiple possible parts.
What happened to scatter styles and colors, for example on QCPGraph and QCPCurve?
They’re now handled by QCPScatterStyle. When old code said
setScatterStyle(QCP::ssCircle), you now write
setScatterStyle(QCPScatterStyle::ssCircle). For more details what’s behind that and the new possibilities, see the documentation of QCPScatterStyle.
For detailed changes, have a look at the changenotes.txt. And of course, the documentation — which is in the first download package — is also up-to-date and thus can help you work with new and changed functionality.
If you have questions not adressed in the list, or feel that the list doesn’t explain an issue in enough detail, please contact me via E-Mail or post a comment.