diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/texteditor.h | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/texteditor.h')
| -rw-r--r-- | src/texteditor.h | 15 |
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 |
