View Full Version : QwtPlotSpectroCurve: how to use triangles, squares, etc. instead of dot?
Alekon
8th June 2014, 12:35
Hi,
this is my first message in this forum, and firstly - Uwe, great work (Qwt), many thanks!
And now the question - it is in the thread title. For instance, I want two QwtPlotSpectroCurve on a plot: first with dots and second with triangles to distinguish them.
Thanks
Maybe subclass QwtPlotSpectroCurve and overload drawDots()...
Alekon
10th June 2014, 07:43
Thanks for your interest.
drawPoints() can be used. After some preparation work, it calls QwtPainter::drawPoint() that may be replaced with something that draws what I need (triangle, rect, etc.).
After some preparation work, it calls QwtPainter::drawPoint() that may be replaced with something that draws what I need (triangle, rect, etc.).
QwtPainter::drawPoint() is a wrapper for QPainter::drawPoint().
QPainter::drawPoint() is non virtual.
QwtPlotSpectroCurve is a plot item for 3d points where the z value is mapped to color. As this is obviously not what you need consider to derive from its base class ( = displaying 3d points somehow ) instead.
In case of deriving from QwtPlotSpectroCurve you would have to overload QwtPlotSpectroCurve::drawDots() accepting that parts of the class API are left pointless.
Uwe
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.