! \internal This slot is connected to the selectionChanged signals of the four axes in the constructor. It synchronizes the selection state of the axes. */
| 19901 | synchronizes the selection state of the axes. |
| 19902 | */ |
| 19903 | void QCPColorScaleAxisRectPrivate::axisSelectionChanged(QCPAxis::SelectableParts selectedParts) |
| 19904 | { |
| 19905 | // axis bases of four axes shall always (de-)selected synchronously: |
| 19906 | QList<QCPAxis::AxisType> allAxisTypes = QList<QCPAxis::AxisType>() << QCPAxis::atBottom << QCPAxis::atTop << QCPAxis::atLeft << QCPAxis::atRight; |
| 19907 | foreach (QCPAxis::AxisType type, allAxisTypes) |
| 19908 | { |
| 19909 | if (QCPAxis *senderAxis = qobject_cast<QCPAxis*>(sender())) |
| 19910 | if (senderAxis->axisType() == type) |
| 19911 | continue; |
| 19912 | |
| 19913 | if (axis(type)->selectableParts().testFlag(QCPAxis::spAxis)) |
| 19914 | { |
| 19915 | if (selectedParts.testFlag(QCPAxis::spAxis)) |
| 19916 | axis(type)->setSelectedParts(axis(type)->selectedParts() | QCPAxis::spAxis); |
| 19917 | else |
| 19918 | axis(type)->setSelectedParts(axis(type)->selectedParts() & ~QCPAxis::spAxis); |
| 19919 | } |
| 19920 | } |
| 19921 | } |
| 19922 | |
| 19923 | /*! \internal |
| 19924 |
nothing calls this directly
no outgoing calls
no test coverage detected