From 6e5f39fbcb5ca9b410324f9fe55ccb9f80fb2ca0 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 1 Dec 2010 12:01:36 +0100 Subject: [PATCH] Cosmetics. --- DrawingWindow.cpp | 13 ++++++------- DrawingWindow.h | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/DrawingWindow.cpp b/DrawingWindow.cpp index 554e7fb..6fad2c0 100644 --- a/DrawingWindow.cpp +++ b/DrawingWindow.cpp @@ -149,7 +149,7 @@ public: const int y; const char *text; const int flags; - DrawTextEvent(int x_, int y_, const char* text_, int flags_) + DrawTextEvent(int x_, int y_, const char *text_, int flags_) : QEvent(static_cast(DrawTextRequest)) , x(x_), y(y_), text(text_), flags(flags_) { } @@ -349,7 +349,7 @@ void DrawingWindow::setBgColor(float red, float green, float blue) /*! * \see QFont, setFont */ -const QFont& DrawingWindow::getFont() const +const QFont &DrawingWindow::getFont() const { return painter->font(); } @@ -358,7 +358,7 @@ const QFont& DrawingWindow::getFont() const /*! * \see QFont, getFont */ -void DrawingWindow::setFont(const QFont& font) +void DrawingWindow::setFont(const QFont &font) { painter->setFont(font); } @@ -576,7 +576,6 @@ void DrawingWindow::drawTextBg(int x, int y, const char *text, int flags) painter->setBackgroundMode(Qt::TransparentMode); } - //! Retourne la couleur d'un pixel. /*! * Retourne la couleur du pixel de coordonnées (x, y). La valeur @@ -727,7 +726,7 @@ void DrawingWindow::customEvent(QEvent *ev) close(); break; case DrawTextRequest: - DrawTextEvent* tev = dynamic_cast(ev); + DrawTextEvent *tev = dynamic_cast(ev); realDrawText(tev->x, tev->y, tev->text, tev->flags); break; } @@ -837,7 +836,7 @@ void DrawingWindow::initialize(DrawingWindow::ThreadFunction fun) * \param color couleur */ inline -void DrawingWindow::setColor(const QColor& color) +void DrawingWindow::setColor(const QColor &color) { QPen pen(painter->pen()); pen.setColor(color); @@ -849,7 +848,7 @@ void DrawingWindow::setColor(const QColor& color) * \param color couleur */ inline -void DrawingWindow::setBgColor(const QColor& color) +void DrawingWindow::setBgColor(const QColor &color) { painter->setBackground(color); } diff --git a/DrawingWindow.h b/DrawingWindow.h index f8e42bd..5bb8cb5 100644 --- a/DrawingWindow.h +++ b/DrawingWindow.h @@ -44,8 +44,8 @@ public: void setBgColor(const char *name); void setBgColor(float red, float green, float blue); - const QFont& getFont() const; - void setFont(const QFont& font); + const QFont &getFont() const; + void setFont(const QFont &font); void clearGraph(); @@ -108,8 +108,8 @@ private: void initialize(ThreadFunction fun); - void setColor(const QColor& color); - void setBgColor(const QColor& color); + void setColor(const QColor &color); + void setBgColor(const QColor &color); QColor getColor(); QColor getBgColor(); -- 2.20.1