! 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
| 10885 | \see setSelection, QCP::SelectionType |
| 10886 | */ |
| 10887 | void QCPAbstractPlottable::setSelectable(QCP::SelectionType selectable) |
| 10888 | { |
| 10889 | if (mSelectable != selectable) |
| 10890 | { |
| 10891 | mSelectable = selectable; |
| 10892 | QCPDataSelection oldSelection = mSelection; |
| 10893 | mSelection.enforceType(mSelectable); |
| 10894 | emit selectableChanged(mSelectable); |
| 10895 | if (mSelection != oldSelection) |
| 10896 | { |
| 10897 | emit selectionChanged(selected()); |
| 10898 | emit selectionChanged(mSelection); |
| 10899 | } |
| 10900 | } |
| 10901 | } |
| 10902 | |
| 10903 | |
| 10904 | /*! |
nothing calls this directly
no test coverage detected