From 41c30cdf376730a68fcda69b57b1139f143a5543 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 26 Dec 2018 19:53:20 +0100 Subject: Fix indentation and code-style. --- src/codeeditor.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/codeeditor.h') diff --git a/src/codeeditor.h b/src/codeeditor.h index 1f0274a..a470a52 100644 --- a/src/codeeditor.h +++ b/src/codeeditor.h @@ -39,9 +39,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - -#ifndef __CODEEDITOR_H__ -#define __CODEEDITOR_H__ +#pragma once #include #include @@ -53,11 +51,12 @@ class QWidget; class LineNumberArea; -class CodeEditor : public QPlainTextEdit +class CodeEditor + : public QPlainTextEdit { Q_OBJECT - public: +public: CodeEditor(QWidget *parent = 0); void lineNumberAreaPaintEvent(QPaintEvent *event); @@ -67,7 +66,7 @@ protected: void resizeEvent(QResizeEvent *event); public slots: - void runningLine(int lineno); + void runningLine(int lineno); private slots: void updateLineNumberAreaWidth(int newBlockCount); @@ -76,28 +75,29 @@ private slots: private: QWidget *lineNumberArea; - int lineNumber; + int lineNumber; }; - -class LineNumberArea : public QWidget +class LineNumberArea + : public QWidget { public: - LineNumberArea(CodeEditor *editor) : QWidget(editor) { + LineNumberArea(CodeEditor *editor) : QWidget(editor) + { codeEditor = editor; } - QSize sizeHint() const { + QSize sizeHint() const + { return QSize(codeEditor->lineNumberAreaWidth(), 0); } protected: - void paintEvent(QPaintEvent *event) { + void paintEvent(QPaintEvent *event) + { codeEditor->lineNumberAreaPaintEvent(event); } private: CodeEditor *codeEditor; }; - -#endif/*__CODEEDITOR_H__*/ -- cgit v1.2.3