| 92 | } |
| 93 | |
| 94 | void ReferenceLineDock::updateWidgetsOrientation(ReferenceLine::Orientation orientation) { |
| 95 | const auto* plot = static_cast<const CartesianPlot*>(m_line->plot()); |
| 96 | bool numeric; |
| 97 | if (orientation == ReferenceLine::Orientation::Horizontal) { |
| 98 | ui.lPosition->setText(QStringLiteral("y:")); |
| 99 | ui.lPositionDateTime->setText(QStringLiteral("y:")); |
| 100 | numeric = (plot->yRangeFormatDefault() == RangeT::Format::Numeric); |
| 101 | } else { |
| 102 | ui.lPosition->setText(QStringLiteral("x:")); |
| 103 | ui.lPositionDateTime->setText(QStringLiteral("x:")); |
| 104 | numeric = (plot->xRangeFormatDefault() == RangeT::Format::Numeric); |
| 105 | } |
| 106 | |
| 107 | ui.lPosition->setVisible(numeric); |
| 108 | ui.sbPosition->setVisible(numeric); |
| 109 | ui.lPositionDateTime->setVisible(!numeric); |
| 110 | ui.dtePosition->setVisible(!numeric); |
| 111 | } |
| 112 | |
| 113 | //********************************************************** |
| 114 | //*** SLOTs for changes triggered in ReferenceLineDock ***** |
nothing calls this directly
no test coverage detected