STAMINA/STORM 0.1
Infinite state-space truncator which generates a probability within a window
CodeEditor.h
1/*
2 * Code editor with line numbers--extends QTextEdit ~~KDE's KTextEdit~~
3 * */
4
5#ifndef STAMINA_CODE_EDITOR_H
6#define STAMINA_CODE_EDITOR_H
7
8#include "ktextedit.h"
9#include <cstdint>
10#include <QTextEdit>
11#include <QPlainTextEdit>
12#include <QPainter>
13
14#include "highlighter/Highlighter.h"
15
16namespace stamina {
17 namespace gui {
18 namespace addons {
19 class CodeEditor : public QPlainTextEdit {
20 Q_OBJECT
21 public:
22 CodeEditor(QWidget * parent = nullptr);
23
24 void lineNumberAreaPaintEvent(QPaintEvent * event);
25 uint16_t lineNumberAreaWidth();
26 protected:
27 void resizeEvent(QResizeEvent * event) override;
28 private slots:
29 void updateLineNumberAreaWidth(uint16_t newBlockCount);
30 void highlightCurrentLine();
31 void updateLineNumberArea(const QRect & rect, int16_t dy);
32
33 private:
34 QWidget * lineNumberArea;
36 };
37 }
38 }
39}
40#endif // STAMINA_CODE_EDITOR_H
Definition: CodeEditor.h:19
Definition: ExplicitTruncatedModelBuilder.cpp:40