Commit aa944f4a authored by Olivier Lagrasse's avatar Olivier Lagrasse

- Ajout d'une option dans le menu pour ne pas afficher les fleches et

les evenements (utile pour les traces contenant un grand nombre de ces 
elements car ils ralentissent tres fortement le FPS)
parent 3488bc7f
......@@ -14,3 +14,5 @@ bool Info::Render::_key_alt = false;
bool Info::Render::_key_ctrl = false;
Element_pos Info::Render::_x_min_visible = 0;;
Element_pos Info::Render::_x_max_visible = 0.;
bool Info::Render::_no_arrows_and_events = false;
......@@ -84,6 +84,12 @@ public:
*/
static bool _key_ctrl;
/*!
* \brief Prevent arrows and events to be displayed (used with Display List since it should highly decreased performance).
*/
static bool _no_arrows_and_events;
/*!
* \brief Contains the trace minimum visible time.
*/
......
......@@ -27,7 +27,7 @@ Interface_graphic::Interface_graphic(Interface_console* core, QWidget *parent):Q
_core = core;
_is_rendering_trace = false;
_no_warning = false;/* display warnings */
_on_manual_change = false;
_on_manual_change = false;
_x_factor_virtual_to_real = 0.1;
_y_factor_virtual_to_real = 0.1;
......@@ -502,6 +502,10 @@ void Interface_graphic::on_no_warning_triggered(){
_no_warning = !_no_warning;
}
void Interface_graphic::on_no_arrows_and_events_triggered(){
Info::Render::_no_arrows_and_events = !Info::Render::_no_arrows_and_events;
}
void Interface_graphic::on_zoom_in_triggered(){
Element_pos t = 1;
......
......@@ -410,6 +410,12 @@ protected slots:
*/
void on_no_warning_triggered();
/*!
*\brief A slot called when 'no_arrows_and_events' in the menu is clicked.
*/
void on_no_arrows_and_events_triggered();
/*!
*\brief A slot called when 'zoom_in' in the menu is clicked.
*/
......@@ -460,6 +466,7 @@ protected slots:
*/
void on_scale_container_state_valueChanged(int new_value);/* temporary slot */
};
......
......@@ -440,6 +440,9 @@
</property>
</action>
<action name="no_arrows_and_events">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>No arrows and events</string>
</property>
......
......@@ -370,10 +370,13 @@ void Render_opengl::paintGL(){
glPopMatrix();
draw_stored_arrows(_arrows);/* draw arrows without display lists */
draw_stored_events(_events);/* draw events without display lists */
if (false == Info::Render::_no_arrows_and_events){/* display arrows and events */
draw_stored_arrows(_arrows);/* draw arrows without display lists */
draw_stored_events(_events);/* draw events without display lists */
}
......
......@@ -196,9 +196,7 @@ protected:
* \brief Define the scrolling factor when CTRL key is pressed.
*/
static const int _ctrl_zoom_factor = 3;
/***********************************
*
......
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