MCPcopy Create free account
hub / github.com/LUX-Core/lux / QCPAbstractPlottable

Method QCPAbstractPlottable

src/qt/qcustomplot.cpp:10690–10709  ·  view source on GitHub ↗

! Constructs an abstract plottable which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and have perpendicular orientations. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. Since

Source from the content-addressed store, hash-verified

10688 You probably want one of the subclasses like \ref QCPGraph or \ref QCPCurve instead.
10689*/
10690QCPAbstractPlottable::QCPAbstractPlottable(QCPAxis *keyAxis, QCPAxis *valueAxis) :
10691 QCPLayerable(keyAxis->parentPlot(), QString(), keyAxis->axisRect()),
10692 mName(),
10693 mAntialiasedFill(true),
10694 mAntialiasedScatters(true),
10695 mPen(Qt::black),
10696 mBrush(Qt::NoBrush),
10697 mKeyAxis(keyAxis),
10698 mValueAxis(valueAxis),
10699 mSelectable(QCP::stWhole),
10700 mSelectionDecorator(0)
10701{
10702 if (keyAxis->parentPlot() != valueAxis->parentPlot())
10703 qDebug() << Q_FUNC_INFO << "Parent plot of keyAxis is not the same as that of valueAxis.";
10704 if (keyAxis->orientation() == valueAxis->orientation())
10705 qDebug() << Q_FUNC_INFO << "keyAxis and valueAxis must be orthogonal to each other.";
10706
10707 mParentPlot->registerPlottable(this);
10708 setSelectionDecorator(new QCPSelectionDecorator);
10709}
10710
10711QCPAbstractPlottable::~QCPAbstractPlottable()
10712{

Callers

nothing calls this directly

Calls 2

axisRectMethod · 0.80
registerPlottableMethod · 0.80

Tested by

no test coverage detected