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

Method modeChanged

src/frontend/widgets/LabelWidget.cpp:711–724  ·  view source on GitHub ↗

Called when the combobox changes index

Source from the content-addressed store, hash-verified

709
710// Called when the combobox changes index
711void LabelWidget::modeChanged(int index) {
712 const auto mode = static_cast<TextLabel::Mode>(index);
713 const bool plain = (mode != TextLabel::Mode::Text);
714
715 labelModeChanged(mode);
716
717 CONDITIONAL_RETURN_NO_LOCK; // No lock, because multiple things are set by the feedback
718
719 QString text = plain ? ui.teLabel->toPlainText() : ui.teLabel->toHtml();
720 TextLabel::TextWrapper wrapper(text, mode, !plain);
721 DEBUG(Q_FUNC_INFO << ", text = " << STDSTRING(wrapper.text))
722 for (auto* label : m_labelsList)
723 label->setText(wrapper);
724}
725
726void LabelWidget::fontColorChanged(const QColor& color) {
727 CONDITIONAL_LOCK_RETURN;

Callers 1

loadConfigMethod · 0.95

Calls 2

toHtmlMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected