Called when the combobox changes index
| 709 | |
| 710 | // Called when the combobox changes index |
| 711 | void 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 | |
| 726 | void LabelWidget::fontColorChanged(const QColor& color) { |
| 727 | CONDITIONAL_LOCK_RETURN; |
no test coverage detected