! Sets whether and to which granularity this plottable can be selected. A selection can happen by clicking on the QCustomPlot surface (When \ref QCustomPlot::setInteractions contains \ref QCP::iSelectPlottables), by dragging a selection rect (When \ref QCustomPlot::setSelectionRectMode is \ref QCP::srmSelect), or programmatically by calling \ref setSelection. \see setSelection, QCP
| 11601 | \see setSelection, QCP::SelectionType |
| 11602 | */ |
| 11603 | void QCPAbstractPlottable::setSelectable(QCP::SelectionType selectable) |
| 11604 | { |
| 11605 | if (mSelectable != selectable) |
| 11606 | { |
| 11607 | mSelectable = selectable; |
| 11608 | QCPDataSelection oldSelection = mSelection; |
| 11609 | mSelection.enforceType(mSelectable); |
| 11610 | emit selectableChanged(mSelectable); |
| 11611 | if (mSelection != oldSelection) |
| 11612 | { |
| 11613 | emit selectionChanged(selected()); |
| 11614 | emit selectionChanged(mSelection); |
| 11615 | } |
| 11616 | } |
| 11617 | } |
| 11618 | |
| 11619 | |
| 11620 | /*! |
nothing calls this directly
no test coverage detected