| 12345678910111213141516171819202122232425262728 |
- #ifndef WGTCODEEDITOR_H
- #define WGTCODEEDITOR_H
- #include <QPlainTextEdit>
- class WgtCodeEditor : public QPlainTextEdit
- {
- Q_OBJECT
- public:
- WgtCodeEditor(QWidget *parent = 0);
- void lineNumberAreaPaintEvent(QPaintEvent *event);
- int lineNumberAreaWidth();
- protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- private slots:
- void updateLineNumberAreaWidth(int newBlockCount);
- void highlightCurrentLine();
- void updateLineNumberArea(const QRect &, int);
- private:
- QWidget *lineNumberArea;
- };
- #endif // WGTCODEEDITOR_H
|