MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / CodeEditor

Method CodeEditor

src/ui/widgets/CodeEditor.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56#include <QTextBlock>
57
58CodeEditor::CodeEditor(QWidget *parent) :
59 QPlainTextEdit(parent),
60 m_lineNumberArea(new LineNumberArea(this))
61{
62 connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::onBlockCountChanged);
63 connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea);
64 connect(this, &CodeEditor::cursorPositionChanged, this, &CodeEditor::highlightCurrentLine);
65
66 onBlockCountChanged(0);
67 highlightCurrentLine();
68}
69
70int CodeEditor::getLineNumberAreaWidth() const
71{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected