#ifndef CODEEDITOR_H #define CODEEDITOR_H #include class CodeEditor : public QPlainTextEdit { Q_OBJECT public: explicit CodeEditor(QWidget *parent = nullptr); void gutterAreaPaintEvent(QPaintEvent *event); int gutterAreaWidth(); protected: void resizeEvent(QResizeEvent *event) override; signals: public slots: private slots: void updateGutterAreaWidth(int newBlockCount); void highlightCurrentLine(); void updateGutterArea(const QRect &, int); private: QWidget *gutterArea; }; #endif // CODEEDITOR_H