MCPcopy Create free account
hub / github.com/cloose/CuteMarkEd / toggleHtmlView

Method toggleHtmlView

app/mainwindow.cpp:748–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748void MainWindow::toggleHtmlView()
749{
750 if (viewLabel->text() == tr("HTML preview")) {
751 ui->stackedWidget->setCurrentWidget(ui->htmlSourcePage);
752
753 ui->actionHtmlPreview->setText(tr("HTML preview"));
754 viewLabel->setText(tr("HTML source"));
755
756 // activate HTML highlighter
757 htmlHighlighter->setEnabled(true);
758 htmlHighlighter->rehighlight();
759 } else {
760 ui->stackedWidget->setCurrentWidget(ui->webViewPage);
761
762 ui->actionHtmlPreview->setText(tr("HTML source"));
763 viewLabel->setText(tr("HTML preview"));
764
765 // deactivate HTML highlighter
766 htmlHighlighter->setEnabled(false);
767
768 // update webView now since it was not updated while hidden
769 syncWebViewToHtmlSource();
770 }
771
772 updateSplitter();
773}
774
775void MainWindow::plainTextChanged()
776{

Callers

nothing calls this directly

Calls 2

trFunction · 0.85
setEnabledMethod · 0.80

Tested by

no test coverage detected