Greetings,
I am using QwtPlotPicker to track the mouse and get selection events... but how do i translate that to actually selecting a marker ?
The brute force way (below) in the select signal...doesnt really work because the Markers return a bounding rect that has a 0 width/height...
Whats the best way to do this ?
void PitchSightPlot::cursorSelected(const QwtDoublePoint &Point)
{
List = itemList();
Iter = List.begin();
while(Iter != List.end())
{
if(pItem->boundingRect().contains(Point))
qDebug()<< "MATCH" << Point;
Iter++;
}
}
void PitchSightPlot::cursorSelected(const QwtDoublePoint &Point)
{
List = itemList();
Iter = List.begin();
while(Iter != List.end())
{
QwtPlotItem *pItem = (QwtPlotItem *)(*Iter);
if(pItem->rtti() == QwtPlotItem::Rtti_PlotMarker)
if(pItem->boundingRect().contains(Point))
qDebug()<< "MATCH" << Point;
Iter++;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks