From 205d4f05453df115257a59a4485ae5d3b09b806d Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Thu, 27 Sep 2012 15:43:55 +0000 Subject: [PATCH] Apply patch form G. Bosilca --- src/render/Render_opengl.hpp | 119 +++++++++++++++++------------------ 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/src/render/Render_opengl.hpp b/src/render/Render_opengl.hpp index 7793b317..279af5ba 100644 --- a/src/render/Render_opengl.hpp +++ b/src/render/Render_opengl.hpp @@ -6,13 +6,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -23,7 +23,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-A license and that you accept its terms. ** @@ -37,7 +37,7 @@ ** - MARCOUEILLE Jule ** - NOISETTE Pascal ** - REDONDY Arthur -** - VUCHENER Clément +** - VUCHENER Clément ** */ /*! @@ -50,6 +50,7 @@ /* For moc compilation */ #include <stack> #include <cmath> +#include <sstream> /* -- */ #include <QObject> #include <QGLWidget> @@ -128,18 +129,18 @@ struct Variable_text_{ class Render_opengl : /*public QGLWidget,*/ public Hook_event, public Render_template { Q_OBJECT - - + + private: - + bool _draw_container; bool _draw_state; bool _draw_ruler; bool _draw_arrow; bool _draw_event; - + protected: - + /*! * \brief The waiting screen display list. */ @@ -154,31 +155,31 @@ protected: * \brief The container GLu list. */ GLuint _list_containers; - + /*! * \brief The state GLu list. */ GLuint _list_states; - + /*! * \brief The counter GLu list. */ GLuint _list_counters; - - + + /*! * \brief The arrows GLu list. */ GLuint _list_arrows; - + /*! * \brief The wait GLu list. */ // GLuint _wait_list; float _red, _green, _blue; - + std::vector<Container_text_> _texts; std::map<long int, Variable_text_> _variable_texts; std::vector<Arrow_> _arrows; @@ -211,17 +212,17 @@ protected: */ int _wait_spf; - /*! - * \brief Offset of the vertical helper line - */ - Element_pos vertical_line; + /*! + * \brief Offset of the vertical helper line + */ + Element_pos vertical_line; /*! * \brief Timer to animate the wait. */ QTimer* _wait_timer; - + /*! * \brief QLabel to display minimap. */ @@ -278,7 +279,7 @@ public: void set_total_time(Times){} /*! - * \brief display the scale + * \brief display the scale */ void display_time_scale(){} @@ -289,30 +290,30 @@ public: * Default QGLWidget functions. * **********************************/ - + /*! * \brief Call by the system to initialize the OpenGL render area. */ void initializeGL(); - + /*! * \brief Call by the system when the render area was resized (occurs during a window resizement). * \param width : the new width of the render area. - * \param height : the new height of the render area. + * \param height : the new height of the render area. */ void resizeGL(int width, int height); - + /*! * \brief Call by the system each time the render area need to be updated. */ void paintGL(); - + //void paintEvent(QPaintEvent *event); /* void initializeOverlayGL(); void resizeOverlayGL(int width, int height); void paintOverlayGL();*/ - + /*********************************** * @@ -363,7 +364,7 @@ public: * \brief Closes the container display list. */ void end_draw_containers(); - + /*! * \brief Creates and opens the display list for stater draws. */ @@ -441,7 +442,7 @@ public: * \brief Creates and opens the display list for counter draws. */ void start_draw_counter(); - + /*! * \brief Draw a text with the value of a variable @@ -457,7 +458,7 @@ public: * Each time counter is increased, this function is called with the coordinates of the new point. */ void draw_counter(const Element_pos x, const Element_pos y); - + /*! * \brief Closes the counter display list. */ @@ -467,19 +468,19 @@ public: * \brief Called before ruler drawing. */ void start_ruler(); - + /*! * \brief Called after ruler drawing. */ void end_ruler(); - + /*! * \brief Do nothing (it is present for compatibility of the Render class). */ void end_draw(); - + /*********************************** * @@ -530,7 +531,7 @@ public: // void display_container(Element_count container_begin, Element_count container_end) =0; // /*! -// * \brief Display on screen states between timer_begin and time_end, +// * \brief Display on screen states between timer_begin and time_end, // * container_begin and container_end and with timer width between depth_begin and depth_end. // * \param time_begin floating point value : time of the first state. // * \param time_end floating point value : time of the last state. @@ -539,53 +540,53 @@ public: // * \param depth_begin floating point value : width of the narrowest state. // * \param depth_end floating point value : width of the widest state. // */ -// void display_state(Element_pos time_begin, Element_pos time_end, -// Element_count container_begin, Element_count container_end, +// void display_state(Element_pos time_begin, Element_pos time_end, +// Element_count container_begin, Element_count container_end, // Element_pos depth_begin, Element_pos depth_end) =0; // /*! -// * \brief Display on screen arrows between timer_begin and time_end, +// * \brief Display on screen arrows between timer_begin and time_end, // * container_begin and container_end and with timer width between depth_begin and depth_end. // * \param time_begin floating point value : time of the smallest arrow time value. // * \param time_end floating point value : time of the higher arrow time value. // * \param container_begin integer value : id of the first container. // * \param container_end integer value : id of the last container. -// * \param depth_begin floating point value : the narrowest difference between +// * \param depth_begin floating point value : the narrowest difference between // * the beginning time and the ending time of the arrow. // * \param depth_end floating point value : width of the widest difference between // * the beginning time and the ending time of the arrow. // */ -// virtual void display_arrow(Element_pos time_begin, Element_pos time_end, -// Element_count container_begin, Element_count container_end, +// virtual void display_arrow(Element_pos time_begin, Element_pos time_end, +// Element_count container_begin, Element_count container_end, // Element_pos depth_begin, Element_pos depth_end) =0; // /*! -// * \brief Display on screen events between timer_begin and time_end, +// * \brief Display on screen events between timer_begin and time_end, // * container_begin and container_end. // * \param time_begin floating point value : time of the first event. // * \param time_end floating point value : time of the last event. // * \param container_begin integer value : id of the first container. // * \param container_end integer value : id of the last container. // */ -// virtual void display_event(Element_pos time_begin, Element_pos time_end, -// Element_count container_begin, Element_count container_end) =0; +// virtual void display_event(Element_pos time_begin, Element_pos time_end, +// Element_count container_begin, Element_count container_end) =0; // /*! -// * \brief Display on screen counters between timer_begin and time_end, +// * \brief Display on screen counters between timer_begin and time_end, // * container_begin and container_end. // * \param time_begin floating point value : time of the smallest counter time value. // * \param time_end floating point value : time of the higher counter time value. // * \param container_begin integer value : id of the first container. // * \param container_end integer value : id of the last container. // */ -// virtual void display_counter(Element_pos time_begin, Element_pos time_end, -// Element_count container_begin, Element_count container_end) =0; - +// virtual void display_counter(Element_pos time_begin, Element_pos time_end, +// Element_count container_begin, Element_count container_end) =0; + /*! * \brief Set the color for the further drawings. * \param r the red value. Within [0 ; 1]. * \param g the green value. Within [0 ; 1]. - * \param b the blue value. Within [0 ; 1]. + * \param b the blue value. Within [0 ; 1]. */ void set_color(float r, float g, float b); @@ -617,7 +618,7 @@ public: */ void draw_triangle(Element_pos x, Element_pos y, Element_pos size, Element_pos r); - + /*! * \brief Draw a line. * \param x1 the horizontal position of the first point. @@ -653,25 +654,25 @@ public: void clear_arrow (); /*! Function that only delete the text of the screen */ void clear_text (); - - + + /*! * \brief returns the offset of the vertical helper line */ - Element_pos get_vertical_line(); - + Element_pos get_vertical_line(); + /*! * \brief set the vertical line offset * \param l the line offset. */ - void set_vertical_line(Element_pos l); - + void set_vertical_line(Element_pos l); + /*! * \brief draws the vertical helper line - */ + */ void draw_vertical_line(); - - + + public slots: /*! * \brief slot connected to the simple click event @@ -679,6 +680,4 @@ public: void update_vertical_line(); }; - - #endif -- GitLab