12 #include <QPlainTextEdit>
35 bool loadFile(
const QString &fileName);
38 bool saveFile(
const QString &fileName);
54 void updateLineNumberAreaWidth(
int newBlockCount);
55 void highlightCurrentLine();
56 void updateLineNumberArea(
const QRect &,
int);
57 void documentWasModified();
58 void startAllHighlighting();
61 void updateUsingSettings();
68 void setCurrentFile(
const QString &fileName);
69 QString strippedName(
const QString &fullFileName);
70 void createPairedCharsSelection(
int pos);
71 int getSelectedLineCount();
74 bool m_isUntitled{
true};
75 QWidget *m_lineNumberArea{
nullptr};
85 m_codeEditor = editor;
CodeEditor(EditorSettings *settings, QWidget *parent=nullptr)
bool loadFile(const QString &fileName)
bool saveFile(const QString &fileName)
QString userFriendlyCurrentFile()
void lineNumberAreaPaintEvent(QPaintEvent *event)
void closeEvent(QCloseEvent *event) override
void resizeEvent(QResizeEvent *event) override
void keyPressEvent(QKeyEvent *e) override
QString currentFile() const
bool eventFilter(QObject *target, QEvent *event) override
int lineNumberAreaWidth()
void paintEvent(QPaintEvent *event) override
QSize sizeHint() const override
LineNumberArea(CodeEditor *editor)