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

Method borderStyleChanged

src/frontend/widgets/SymbolWidget.cpp:203–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void SymbolWidget::borderStyleChanged(int index) {
204 if (index == -1)
205 return;
206
207 const auto penStyle = Qt::PenStyle(index);
208 if (penStyle == Qt::NoPen) {
209 ui.kcbBorderColor->setEnabled(false);
210 ui.sbBorderWidth->setEnabled(false);
211 } else {
212 ui.kcbBorderColor->setEnabled(true);
213 ui.sbBorderWidth->setEnabled(true);
214 }
215
216 CONDITIONAL_LOCK_RETURN;
217
218 QPen pen;
219 for (auto* symbol : m_symbols) {
220 pen = symbol->pen();
221 pen.setStyle(penStyle);
222 symbol->setPen(pen);
223 }
224}
225
226void SymbolWidget::borderColorChanged(const QColor& color) {
227 CONDITIONAL_LOCK_RETURN;

Callers

nothing calls this directly

Calls 3

setPenMethod · 0.80
setEnabledMethod · 0.45
setStyleMethod · 0.45

Tested by

no test coverage detected