MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / axisSelectableChanged

Method axisSelectableChanged

qcustomplot.cpp:19928–19946  ·  view source on GitHub ↗

! \internal This slot is connected to the selectableChanged signals of the four axes in the constructor. It synchronizes the selectability of the axes. */

Source from the content-addressed store, hash-verified

19926 synchronizes the selectability of the axes.
19927*/
19928void QCPColorScaleAxisRectPrivate::axisSelectableChanged(QCPAxis::SelectableParts selectableParts)
19929{
19930 // synchronize axis base selectability:
19931 QList<QCPAxis::AxisType> allAxisTypes = QList<QCPAxis::AxisType>() << QCPAxis::atBottom << QCPAxis::atTop << QCPAxis::atLeft << QCPAxis::atRight;
19932 foreach (QCPAxis::AxisType type, allAxisTypes)
19933 {
19934 if (QCPAxis *senderAxis = qobject_cast<QCPAxis*>(sender()))
19935 if (senderAxis->axisType() == type)
19936 continue;
19937
19938 if (axis(type)->selectableParts().testFlag(QCPAxis::spAxis))
19939 {
19940 if (selectableParts.testFlag(QCPAxis::spAxis))
19941 axis(type)->setSelectableParts(axis(type)->selectableParts() | QCPAxis::spAxis);
19942 else
19943 axis(type)->setSelectableParts(axis(type)->selectableParts() & ~QCPAxis::spAxis);
19944 }
19945 }
19946}
19947/* end of 'src/layoutelements/layoutelement-colorscale.cpp' */
19948
19949

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected