I have to set QwtPlotMarker value.
I have some lines(Marker) on the the plot, but due to zoom they get hidden behind the widget, so I just want to set it within the widget in that event.
And Yes I have tried to connect with SIGNAL(zoomed),
{
public:
PlotZoomer
(int xAxis,
int yAxis,
QWidget *canvas
): {
//setTrackerMode(QwtPicker::ActiveOnly);
// RightButton: zoom out by 1
// Ctrl+RightButton: zoom out to full size
setMousePattern
(QwtEventPattern::MouseSelect2,Qt
::LeftButton, Qt
::ControlModifier);
//setZoomBase(true);
}
};
class PlotZoomer: public QwtPlotZoomer
{
public:
PlotZoomer(int xAxis, int yAxis, QWidget *canvas):
QwtPlotZoomer(xAxis, yAxis, canvas)
{
//setTrackerMode(QwtPicker::ActiveOnly);
setRubberBand(QwtPicker::RectRubberBand);
// RightButton: zoom out by 1
// Ctrl+RightButton: zoom out to full size
setMousePattern(QwtEventPattern::MouseSelect2,Qt::LeftButton, Qt::ControlModifier);
setMousePattern(QwtEventPattern::MouseSelect3,Qt::RightButton);
//setZoomBase(true);
}
};
To copy to clipboard, switch view to plain text mode
m_zoomP
(new PlotZoomer
(QwtPlot::xBottom,
QwtPlot::yLeft, m_plot
->canvas
()))
m_zoomP(new PlotZoomer(QwtPlot::xBottom, QwtPlot::yLeft, m_plot->canvas()))
To copy to clipboard, switch view to plain text mode
connect(m_zoomP,
SIGNAL(zoomed
(const QRectF &rect
)),
SLOT(zoomed
(const QRectF &rect
)));
connect(m_zoomP, SIGNAL(zoomed(const QRectF &rect)), SLOT(zoomed(const QRectF &rect)));
To copy to clipboard, switch view to plain text mode
But unable to connect, got error like below,
err_method_notfound(2304)[13984]: QObject::connect: No such signal QwtPlotZoomer::zoomed(const QRectF &rect)
Bookmarks