! Sets the \ref QCPSelectionRect instance that QCustomPlot will use if \a mode is not \ref QCP::srmNone and the user performs a click-and-drag interaction. QCustomPlot takes ownership of the passed \a selectionRect. It can be accessed later via \ref selectionRect. This method is useful if you wish to replace the default QCPSelectionRect instance with an instance of a QCPSelectionRect
| 13273 | \see setSelectionRectMode |
| 13274 | */ |
| 13275 | void QCustomPlot::setSelectionRect(QCPSelectionRect *selectionRect) |
| 13276 | { |
| 13277 | if (mSelectionRect) |
| 13278 | delete mSelectionRect; |
| 13279 | |
| 13280 | mSelectionRect = selectionRect; |
| 13281 | |
| 13282 | if (mSelectionRect) |
| 13283 | { |
| 13284 | // establish connections with new selection rect: |
| 13285 | if (mSelectionRectMode == QCP::srmSelect) |
| 13286 | connect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectSelection(QRect,QMouseEvent*))); |
| 13287 | else if (mSelectionRectMode == QCP::srmZoom) |
| 13288 | connect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectZoom(QRect,QMouseEvent*))); |
| 13289 | } |
| 13290 | } |
| 13291 | |
| 13292 | /*! |
| 13293 | \warning This is still an experimental feature and its performance depends on the system that it |
nothing calls this directly
no outgoing calls
no test coverage detected