Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 1 Dec 2010 11:01:36 +0000 (12:01 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 1 Dec 2010 11:01:36 +0000 (12:01 +0100)
DrawingWindow.cpp
DrawingWindow.h

index 554e7fb..6fad2c0 100644 (file)
@@ -149,7 +149,7 @@ public:
     const int y;
     const char *text;
     const int flags;
-    DrawTextEvent(int x_, int y_, const chartext_, int flags_)
+    DrawTextEvent(int x_, int y_, const char *text_, int flags_)
         : QEvent(static_cast<QEvent::Type>(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 QFontDrawingWindow::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 QFontfont)
+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:
-        DrawTextEventtev = dynamic_cast<DrawTextEvent *>(ev);
+        DrawTextEvent *tev = dynamic_cast<DrawTextEvent *>(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 QColorcolor)
+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 QColorcolor)
+void DrawingWindow::setBgColor(const QColor &color)
 {
     painter->setBackground(color);
 }
index f8e42bd..5bb8cb5 100644 (file)
@@ -44,8 +44,8 @@ public:
     void setBgColor(const char *name);
     void setBgColor(float red, float green, float blue);
 
-    const QFontgetFont() const;
-    void setFont(const QFontfont);
+    const QFont &getFont() const;
+    void setFont(const QFont &font);
 
     void clearGraph();
 
@@ -108,8 +108,8 @@ private:
 
     void initialize(ThreadFunction fun);
 
-    void setColor(const QColorcolor);
-    void setBgColor(const QColorcolor);
+    void setColor(const QColor &color);
+    void setBgColor(const QColor &color);
     QColor getColor();
     QColor getBgColor();