MCPcopy Create free account
hub / github.com/KDE/labplot / typeChanged

Method typeChanged

src/frontend/widgets/LineWidget.cpp:131–155  ·  view source on GitHub ↗

SLOTs for changes triggered in LineWidget

Source from the content-addressed store, hash-verified

129//******** SLOTs for changes triggered in LineWidget **********
130//*************************************************************
131void 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
157void LineWidget::styleChanged(int index) {
158 CONDITIONAL_LOCK_RETURN;

Callers

nothing calls this directly

Calls 4

setHistogramLineTypeMethod · 0.80
setDropLineTypeMethod · 0.80
LineTypeEnum · 0.50
setEnabledMethod · 0.45

Tested by

no test coverage detected