| 613 | } |
| 614 | |
| 615 | void ProcessBehaviorChart::setLabelsFont(const QFont& font) { |
| 616 | QDEBUG(Q_FUNC_INFO << ", FONT = " << font) |
| 617 | Q_D(ProcessBehaviorChart); |
| 618 | auto textWrapper = d->centerLabel->text(); |
| 619 | QTextEdit te(textWrapper.text); |
| 620 | te.selectAll(); |
| 621 | if (font != te.font()) { |
| 622 | beginMacro(i18n("%1: set labels font", name())); |
| 623 | te.setFontFamily(font.family()); |
| 624 | te.setFontPointSize(font.pointSize()); |
| 625 | te.setFont(font); |
| 626 | textWrapper.text = te.toHtml(); |
| 627 | d->centerLabel->setText(textWrapper); |
| 628 | |
| 629 | textWrapper = d->upperLimitLabel->text(); |
| 630 | te.setText(textWrapper.text); |
| 631 | te.selectAll(); |
| 632 | te.setFontFamily(font.family()); |
| 633 | te.setFontPointSize(font.pointSize()); |
| 634 | te.setFont(font); |
| 635 | textWrapper.text = te.toHtml(); |
| 636 | d->upperLimitLabel->setText(textWrapper); |
| 637 | |
| 638 | textWrapper = d->lowerLimitLabel->text(); |
| 639 | te.setText(textWrapper.text); |
| 640 | te.selectAll(); |
| 641 | te.setFontFamily(font.family()); |
| 642 | te.setFontPointSize(font.pointSize()); |
| 643 | te.setFont(font); |
| 644 | textWrapper.text = te.toHtml(); |
| 645 | d->lowerLimitLabel->setText(textWrapper); |
| 646 | endMacro(); |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | void ProcessBehaviorChart::setLabelsFontColor(const QColor& color) { |
| 651 | Q_D(ProcessBehaviorChart); |