MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / setSelectionDecorator

Method setSelectionDecorator

qcustomplot/qcustomplot.cpp:10860–10875  ·  view source on GitHub ↗

! 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. */

Source from the content-addressed store, hash-verified

10858 The currently set decorator can be accessed via \ref selectionDecorator.
10859*/
10860void 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.

Callers

nothing calls this directly

Calls 1

registerWithPlottableMethod · 0.80

Tested by

no test coverage detected