SLOTs for changes triggered in LineWidget
| 129 | //******** SLOTs for changes triggered in LineWidget ********** |
| 130 | //************************************************************* |
| 131 | void LineWidget::typeChanged(int index) { |
| 132 | bool enabled = true; |
| 133 | if (m_line->histogramLineTypeAvailable()) { |
| 134 | const auto type = Histogram::LineType(index); |
| 135 | enabled = (type != Histogram::NoLine); |
| 136 | |
| 137 | if (!m_initializing) { |
| 138 | for (auto* line : m_lines) |
| 139 | line->setHistogramLineType(type); |
| 140 | } |
| 141 | } else if (m_prefix == QLatin1String("DropLine")) { |
| 142 | auto type = static_cast<XYCurve::DropLineType>(index); |
| 143 | enabled = (type != XYCurve::DropLineType::NoDropLine); |
| 144 | |
| 145 | if (!m_initializing) { |
| 146 | for (auto* line : m_lines) |
| 147 | line->setDropLineType(type); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | ui.cbStyle->setEnabled(enabled); |
| 152 | ui.kcbColor->setEnabled(enabled); |
| 153 | ui.sbWidth->setEnabled(enabled); |
| 154 | ui.sbOpacity->setEnabled(enabled); |
| 155 | } |
| 156 | |
| 157 | void LineWidget::styleChanged(int index) { |
| 158 | CONDITIONAL_LOCK_RETURN; |
nothing calls this directly
no test coverage detected