| 56 | |
| 57 | |
| 58 | class BasicEditor : public QPlainTextEdit |
| 59 | { |
| 60 | Q_OBJECT |
| 61 | |
| 62 | public: |
| 63 | BasicEditor(QWidget *parent = nullptr); |
| 64 | |
| 65 | void updateDarkMode(); |
| 66 | void lineNumberAreaPaintEvent(QPaintEvent *event); |
| 67 | int lineNumberAreaWidth(); |
| 68 | void toggleHighlight(); |
| 69 | |
| 70 | protected: |
| 71 | void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; |
| 72 | |
| 73 | private slots: |
| 74 | void updateLineNumberAreaWidth(int newBlockCount); |
| 75 | void updateLineNumberArea(const QRect &, int); |
| 76 | |
| 77 | private: |
| 78 | QWidget *lineNumberArea; |
| 79 | BasicHighlighter *highlighter; |
| 80 | }; |
| 81 | |
| 82 | class LineNumberArea : public QWidget |
| 83 | { |
nothing calls this directly
no outgoing calls
no test coverage detected