pgLab/pglab/CodeEditor.h

32 lines
539 B
C
Raw Normal View History

#ifndef CODEEDITOR_H
#define CODEEDITOR_H
#include <QPlainTextEdit>
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