diff --git a/Code/Mantid/MantidPlot/src/Graph.cpp b/Code/Mantid/MantidPlot/src/Graph.cpp index af1b3b6012e4..8780997cf7ca 100644 --- a/Code/Mantid/MantidPlot/src/Graph.cpp +++ b/Code/Mantid/MantidPlot/src/Graph.cpp @@ -157,9 +157,9 @@ Graph::Graph(int x, int y, int width, int height, QWidget* parent, Qt::WFlags f) setAttribute(Qt::WA_DeleteOnClose, false); d_plot = new Plot(width, height, this); - connect (d_plot,SIGNAL(dragMousePress(QPoint)), this, SIGNAL(dragMousePress(QPoint))); - connect (d_plot,SIGNAL(dragMouseRelease(QPoint)), this, SIGNAL(dragMouseRelease(QPoint))); - connect (d_plot,SIGNAL(dragMouseMove(QPoint)), this, SIGNAL(dragMouseMove(QPoint))); + connect (d_plot,SIGNAL(dragMousePress(QPoint)), this, SLOT(slotDragMousePress(QPoint))); + connect (d_plot,SIGNAL(dragMouseRelease(QPoint)), this, SLOT(slotDragMouseRelease(QPoint))); + connect (d_plot,SIGNAL(dragMouseMove(QPoint)), this, SLOT(slotDragMouseMove(QPoint))); cp = new CanvasPicker(this); @@ -6115,3 +6115,34 @@ void Graph::checkValuesInAxisRange(MantidMatrixCurve* mc) d_plot->setAxisScale(QwtPlot::Axis(QwtPlot::xBottom), xMin, xMax); } } + +/** + * Process dragMousePress signal from d_plot. + * @param pos :: Mouse position. + */ +void Graph::slotDragMousePress(QPoint pos) +{ + if ( hasActiveTool() ) return; + emit dragMousePress(pos); +} + +/** + * Process dragMouseRelease signal from d_plot. + * @param pos :: Mouse position. + */ +void Graph::slotDragMouseRelease(QPoint pos) +{ + if ( hasActiveTool() ) return; + emit dragMouseRelease(pos); +} + +/** + * Process dragMouseMove signal from d_plot. + * @param pos :: Mouse position. + */ +void Graph::slotDragMouseMove(QPoint pos) +{ + if ( hasActiveTool() ) return; + emit dragMouseMove(pos); +} + diff --git a/Code/Mantid/MantidPlot/src/Graph.h b/Code/Mantid/MantidPlot/src/Graph.h index 26032a4a6546..7ea336593f21 100644 --- a/Code/Mantid/MantidPlot/src/Graph.h +++ b/Code/Mantid/MantidPlot/src/Graph.h @@ -809,6 +809,10 @@ public slots: private slots: + void slotDragMousePress(QPoint); + void slotDragMouseRelease(QPoint); + void slotDragMouseMove(QPoint); + private: //! Finds bounding interval of the plot data. QwtDoubleInterval axisBoundingInterval(int axis);