! Use this method to set an own QCPSelectionDecorator (subclass) instance. This allows you to customize the visual representation of selected data ranges further than by using the default QCPSelectionDecorator. The plottable takes ownership of the \a decorator. The currently set decorator can be accessed via \ref selectionDecorator. */
| 10858 | The currently set decorator can be accessed via \ref selectionDecorator. |
| 10859 | */ |
| 10860 | void QCPAbstractPlottable::setSelectionDecorator(QCPSelectionDecorator *decorator) |
| 10861 | { |
| 10862 | if (decorator) |
| 10863 | { |
| 10864 | if (decorator->registerWithPlottable(this)) |
| 10865 | { |
| 10866 | if (mSelectionDecorator) // delete old decorator if necessary |
| 10867 | delete mSelectionDecorator; |
| 10868 | mSelectionDecorator = decorator; |
| 10869 | } |
| 10870 | } else if (mSelectionDecorator) // just clear decorator |
| 10871 | { |
| 10872 | delete mSelectionDecorator; |
| 10873 | mSelectionDecorator = 0; |
| 10874 | } |
| 10875 | } |
| 10876 | |
| 10877 | /*! |
| 10878 | Sets whether and to which granularity this plottable can be selected. |
nothing calls this directly
no test coverage detected