summaryrefslogtreecommitdiff
path: root/src/texteditor.h
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2023-07-09 17:36:03 +0200
committerGitHub <noreply@github.com>2023-07-09 17:36:03 +0200
commitef94aee28464039672b277243a0181ae93550d6c (patch)
tree0575a68af5f154e9d6d0738edbaefb16a11d6f5c /src/texteditor.h
parent7d6cb8528d20e36a4cee822263865ee2f7f32481 (diff)
parent3de050e9c03e553f7ae3f780f6bd080a30ae123e (diff)
Merge pull request #1839 from Holt59/ci/initial-gh-action-for-build
Clang-Format + Github Workflow
Diffstat (limited to 'src/texteditor.h')
-rw-r--r--src/texteditor.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/texteditor.h b/src/texteditor.h
index dc53f1c4..7f6adcdb 100644
--- a/src/texteditor.h
+++ b/src/texteditor.h
@@ -24,7 +24,6 @@ private:
void onLoaded(const QString& s);
};
-
// mostly from https://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html
//
class TextEditorLineNumbers : public QFrame
@@ -46,17 +45,16 @@ public:
void setBackgroundColor(const QColor& c);
protected:
- void paintEvent(QPaintEvent *event) override;
+ void paintEvent(QPaintEvent* event) override;
private:
TextEditor& m_editor;
QColor m_background, m_text;
void updateAreaWidth();
- void updateArea(const QRect &rect, int dy);
+ void updateArea(const QRect& rect, int dy);
};
-
class TextEditorHighlighter : public QSyntaxHighlighter
{
Q_OBJECT;
@@ -79,18 +77,18 @@ private:
void changed();
};
-
class TextEditor : public QPlainTextEdit
{
Q_OBJECT;
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor);
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor);
- Q_PROPERTY(QColor highlightBackgroundColor READ highlightBackgroundColor WRITE setHighlightBackgroundColor);
+ Q_PROPERTY(QColor highlightBackgroundColor READ highlightBackgroundColor WRITE
+ setHighlightBackgroundColor);
friend class TextEditorLineNumbers;
public:
- TextEditor(QWidget* parent=nullptr);
+ TextEditor(QWidget* parent = nullptr);
void setupToolbar();
@@ -145,7 +143,6 @@ private:
void paintLineNumbers(QPaintEvent* e, const QColor& textColor);
};
-
class HTMLEditor : public QTextEdit
{
Q_OBJECT;
@@ -162,4 +159,4 @@ protected:
private:
};
-#endif // MO_TEXTEDITOR_H
+#endif // MO_TEXTEDITOR_H