I have some code where I draw a symbol and attach it to a plot. Now I want to find out whether there is a bounding rectangle automatically created with the symbol so that I can write some code to select the symbol so that users can edit it - select it in order to delete it for example.
I have seen a boundingRect() method in qwt_plot_marker.h, how would I use this to determine whether there is a rectangle created when the following code is implemented?
void DataPointMarker::draw(QPainter *p,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRect &) const
{
const int posX = xMap.transform(m_positionX);
const int posY = yMap.transform(m_positionY);
p->save();
symbol().draw(p, posX, posY);
p->restore();
The symbol is defined elsewhere. Thanks in advance.