MCPcopy Create free account
hub / github.com/Qucs/qucs / highlightCurrentLine

Method highlightCurrentLine

qucs/textdoc.cpp:580–597  ·  view source on GitHub ↗

! * \brief TextDoc::highlightCurrentLine mark the current line */

Source from the content-addressed store, hash-verified

578 * \brief TextDoc::highlightCurrentLine mark the current line
579 */
580void TextDoc::highlightCurrentLine()
581{
582 QList<QTextEdit::ExtraSelection> extraSelections;
583
584 if (!isReadOnly()) {
585 QTextEdit::ExtraSelection selection;
586
587 QColor lineColor = QColor(Qt::blue).lighter(195);
588
589 selection.format.setBackground(lineColor);
590 selection.format.setProperty(QTextFormat::FullWidthSelection, true);
591 selection.cursor = textCursor();
592 selection.cursor.clearSelection();
593 extraSelections.append(selection);
594 }
595
596 setExtraSelections(extraSelections);
597}
598
599void TextDoc::refreshLanguage()
600{

Callers

nothing calls this directly

Calls 2

QColorClass · 0.85
setPropertyMethod · 0.45

Tested by

no test coverage detected