Commit 94af4745 authored by Olivier Lagrasse's avatar Olivier Lagrasse

- Correction d'une imprecision de Info::Render::_x_min_visible et...

- Correction d'une imprecision de Info::Render::_x_min_visible et Info::Render::_x_max_visible dans render opengl.
- Refonte totale de la regle : utilisation des Display Lists + amelioration de la precision. (L'utilisation est la suivante : en haut a gauche, pour trouverez par exemple 10Xe-3, puis sur la regle vous 
lisez 40. Dans ce cas, remplacez le X par 40, et vous obtenez la position sur la regle : 1040 * 10^(-3))

parent 68d7bddd
This diff is collapsed.
......@@ -126,6 +126,7 @@ protected:
*/
Interface_console* _core;
/***********************************
*
* Render area state attributes.
......@@ -197,103 +198,22 @@ protected:
*/
static const int _ctrl_zoom_factor = 3;
/***********************************
*
* 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.
*/
void resizeGL(int width, int height);
/*!
* \brief Call by the system each time the render area need to be updated.
*/
void paintGL();
/*!
* \brief This functions receives all mouse press events.
* \param event The event triggered by mouse.
*/
void mousePressEvent(QMouseEvent * event);
/*!
* \brief If user press, this functions receives all mouse move events until user release mouse.
* \param event The event triggered by mouse.
*/
void mouseMoveEvent(QMouseEvent * event);
/*!
* \brief This functions receives all mouse release events.
* \param event The event triggered by mouse.
*/
void mouseReleaseEvent(QMouseEvent * event);
/*!
* \brief This functions receives all mouse wheel events.
* \param event The event triggered by the mouse wheel.
*/
void wheelEvent(QWheelEvent * event);
/*!
* \brief This functions receives all keyboard events.
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent * event);
/*!
* \brief This functions receives all keyboard release events.
* \param event The event triggered by a keyboard release.
*/
void keyReleaseEvent(QKeyEvent * event);
/***********************************
*
* The wait screen drawing.
*
**********************************/
/***********************************
* The wait list Attributes.
**********************************/
/*!
* \brief Used for draw counter.
*/
bool _line_already_begun;
/*!
* \brief The wait GLu list.
*/
GLuint _wait_list;
/*!
* \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 Rotation angle for the wait.
*/
......@@ -320,17 +240,6 @@ protected:
QTimer* _wait_timer;
/***********************************
* Drawing function for the wait screen.
**********************************/
/*!
* \brief Display a wait on the screen if there is no file opened.
* \return Asset value of the wait.
*/
GLuint draw_wait();
/***********************************
......@@ -345,9 +254,29 @@ protected:
**********************************/
/*!
* \brief The trace Glu list.
* \brief Used for draw counter.
*/
GLuint _drawing_list;
bool _line_already_begun;
/*!
* \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 ruler GLu list.
*/
GLuint _list_ruler;
/*!
* \brief The last x position of the point (for counter).
......@@ -489,10 +418,6 @@ protected:
*/
Element_pos _ruler_width;
/***********************************
* Trace Drawing functions and attributes.
**********************************/
/*!
* \brief The percentage taken by container display in the render area.
*/
......@@ -528,6 +453,109 @@ protected:
*/
Element_pos _y_scroll_pos;
/***********************************
*
* 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.
*/
void resizeGL(int width, int height);
/*!
* \brief Call by the system each time the render area need to be updated.
*/
void paintGL();
/*!
* \brief This functions receives all mouse press events.
* \param event The event triggered by mouse.
*/
void mousePressEvent(QMouseEvent * event);
/*!
* \brief If user press, this functions receives all mouse move events until user release mouse.
* \param event The event triggered by mouse.
*/
void mouseMoveEvent(QMouseEvent * event);
/*!
* \brief This functions receives all mouse release events.
* \param event The event triggered by mouse.
*/
void mouseReleaseEvent(QMouseEvent * event);
/*!
* \brief This functions receives all mouse wheel events.
* \param event The event triggered by the mouse wheel.
*/
void wheelEvent(QWheelEvent * event);
/*!
* \brief This functions receives all keyboard events.
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent * event);
/*!
* \brief This functions receives all keyboard release events.
* \param event The event triggered by a keyboard release.
*/
void keyReleaseEvent(QKeyEvent * event);
/***********************************
*
* Render OpenGL drawing functions.
*
**********************************/
/*!
* \brief Display a wait on the screen if there is no file opened.
* \return Asset value of the wait.
*/
GLuint draw_wait();
/*!
* \brief Create the ruler display list.
* \return Asset value of the ruler.
*/
GLuint draw_ruler();
/*!
* \brief Draw the ruler display list.
*/
void call_ruler();
/*!
* \brief Set Statistics and Informations about input trace
*/
void set_total_width(Element_pos);
/*!
* \brief Set Statistics and Informations about input trace
*/
void set_total_time(Times);
/*!
* \brief display the scale
*/
void display_time_scale();
public:
......@@ -632,6 +660,71 @@ public:
*/
void apply_zoom_box(Element_pos x_min, Element_pos x_max, Element_pos y_min, Element_pos y_max);
/***********************************
*
* Coordinate convert functions.
*
**********************************/
/*!
* \brief This function convert a X screen coordinate into render coordinate.
* \param e A X screen coordinate.
* \return A X render coordinate corresponding to e but in render area coordinate.
*/
Element_pos screen_to_render_x(Element_pos e);
/*!
* \brief This function convert a Y screen coordinate into render coordinate.
* \param e A Y screen coordinate.
* \return A Y render coordinate corresponding to e but in render area coordinate.
*/
Element_pos screen_to_render_y(Element_pos e);
/*!
* \brief This function convert a X render coordinate into trace coordinate.
* \param e A X render coordinate.
* \return A X trace coordinate corresponding to e but in trace coordinate.
*/
Element_pos render_to_trace_x(Element_pos e);
/*!
* \brief This function convert a Y render coordinate into trace coordinate.
* \param e A Y render coordinate.
* \return A Y trace coordinate corresponding to e but in trace coordinate.
*/
Element_pos render_to_trace_y(Element_pos e);
/*!
* \brief Dual of screen_to_render_x.
* \param e A X render coordinate.
* \return A X screen coordinate corresponding to e but in screen coordinate.
*/
Element_pos render_to_screen_x(Element_pos e);
/*!
* \brief Dual of screen_to_render_y.
* \param e A Y render coordinate.
* \return A Y screen coordinate corresponding to e but in screen coordinate.
*/
Element_pos render_to_screen_y(Element_pos e);
/*!
* \brief Dual of render_to_trace_x.
* \param e A X trace coordinate.
* \return A X render coordinate corresponding to e but in render area coordinate.
*/
Element_pos trace_to_render_x(Element_pos e);
/*!
* \brief Dual of render_to_trace_y.
* \param e A Y trace coordinate.
* \return A Y render coordinate corresponding to e but in render area coordinate.
*/
Element_pos trace_to_render_y(Element_pos e);
/***********************************
*
* Building functions.
......@@ -770,26 +863,6 @@ public:
* \brief Do nothing (it is present for compatibility of the Render class).
*/
void end_draw();
/*!
* \brief Create the ruler disaply list.
*/
void create_ruler();
/*!
* \brief Set Statistics and Informations about input trace
*/
void set_total_width(Element_pos w);
/*!
* \brief Set Statistics and Informations about input trace
*/
void set_total_time(Times t);
/*!
* \brief display the scale
*/
void display_time_scale();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment