Commit 386a295b authored by Olivier Lagrasse's avatar Olivier Lagrasse

Premiere implementation de la regle (unite : seconde, precision : 10^-4 au maximum).

Reduction taille des ronds pour les events.
Agrandissement taille de la fenetre principale.
parent 03aa3e00
......@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>888</width>
<height>605</height>
<width>1170</width>
<height>683</height>
</rect>
</property>
<property name="sizePolicy" >
......@@ -26,14 +26,6 @@
<normaloff>:/icon/icon/vite.png</normaloff>:/icon/icon/vite.png</iconset>
</property>
<widget class="QWidget" name="centralwidget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>64</y>
<width>888</width>
<height>541</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<layout class="QVBoxLayout" name="render_area_layout" />
......@@ -132,11 +124,14 @@
<number>1</number>
</property>
<property name="maximum" >
<number>100000</number>
<number>1000</number>
</property>
<property name="pageStep" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
......@@ -151,7 +146,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>888</width>
<width>1170</width>
<height>26</height>
</rect>
</property>
......@@ -194,14 +189,6 @@
<addaction name="menuHelp" />
</widget>
<widget class="QToolBar" name="toolBar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>26</y>
<width>888</width>
<height>38</height>
</rect>
</property>
<property name="windowTitle" >
<string>toolBar</string>
</property>
......
This diff is collapsed.
......@@ -294,6 +294,11 @@ class Render_area : public QGLWidget, public Render
*/
Element_pos _state_y_min;
/*!
* \brief z position for the rule.
*/
Element_pos _z_rule;
/*!
* \brief z position for containers.
*/
......@@ -324,6 +329,21 @@ class Render_area : public QGLWidget, public Render
*/
Element_pos _default_entity_x_translate;
/*!
* Distance between to rule measures.
*/
Element_pos _rule_distance;
/*!
* Height of the rule.
*/
Element_pos _rule_height;
/*!
* highness of the rule.
*/
Element_pos _rule_y;
/***********************************
* Trace Drawing functions and attributes.
**********************************/
......@@ -336,12 +356,12 @@ class Render_area : public QGLWidget, public Render
/*!
* \brief the scale of state drawing.
*/
int _state_scale;/* temporary */
Element_pos _state_scale;/* temporary */
/*!
* \brief The x position of camera view for state drawing area.
*/
int _state_translate;/* temporary */
Element_pos _state_translate;/* temporary */
public:
......@@ -514,6 +534,11 @@ class Render_area : public QGLWidget, public Render
* \brief Do nothing (it is present for compatibility of the Render class).
*/
void end_draw();
/*!
* \brief Create the rule disaply list.
*/
void create_rule();
};
......@@ -691,7 +716,7 @@ inline void Render_area::draw_stored_arrows(std::vector<Arrow_> &arrows){
/* Manage the event drawing size from state size and render area dimensions */
Element_pos arrow_scale_x = _state_scale*(_render_width/_state_x_max);
Element_pos arrow_scale_y = _render_height/_container_y_max;
Element_pos arrow_scale_y = (_render_height-_rule_height)/_container_y_max;
Element_pos angle;
......@@ -771,7 +796,7 @@ inline void Render_area::draw_stored_events(std::vector<Event_> &events){
/* Manage the event drawing size from state size and render area dimensions */
Element_pos event_scale_x = _state_scale*(_render_width/_state_x_max);
Element_pos event_scale_y = _render_height/_container_y_max;
Element_pos event_scale_y = (_render_height-_rule_height)/_container_y_max;
Element_pos radius;/* the circle radius */
Element_pos angle;
......@@ -795,7 +820,7 @@ inline void Render_area::draw_stored_events(std::vector<Event_> &events){
/* draw a circle */
radius = 1.0f;
radius = 0.3f;
angle = PI/2.0f;
step = 20;/* 20 polygons for the circle */
......@@ -859,6 +884,7 @@ inline void Render_area::draw_counter(const Element_pos x, const Element_pos y){
}else{
glColor3d(1.0, 1.0, 1.0);glVertex2d(x, _counter_last_y);
glColor3d(1.0, 1.0, 1.0);glVertex2d(x, y);
_counter_last_x = x;
......
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