From d13f6bb870cdda71257f665367be8ef9fca86255 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 17 May 2022 11:47:01 +0200 Subject: Apply clang-format. --- src/texteditor.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/texteditor.h') 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 -- cgit v1.3.1