Commit 6534377b authored by Olivier Lagrasse's avatar Olivier Lagrasse
Browse files

add macro to activate the spinning logo

parent e599ecd8
......@@ -87,9 +87,15 @@ Render_opengl::Render_opengl(Core* core, QWidget *parent, const QGLFormat& forma
/* init the wait animation */
_wait_list = 0;
_wait_angle = 0.0f; /* begin with 0 rad angle */
_wait_angle_y = 0.0f; /* begin with 0 rad angle */
_wait_timer = NULL;
_wait_spf = DRAWING_TIMER_DEFAULT;/* DRAWING_TIMER_DEFAULT milliseconds per frame */
_wait_timer = NULL;
#ifdef SPINNING_LOGO
_wait_timer = new QTimer(this);
connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
_wait_timer->start(_wait_spf);
#endif // SPINNING_LOGO
setAutoFillBackground(false);
......@@ -175,8 +181,9 @@ void Render_opengl::paintGL(){
glScalef(15, 15, 0);
#ifdef SPINNING_LOGO
glRotatef(-_wait_angle,0, 1, 0);
glRotatef(_wait_angle_y, 1, 0, 0);
#endif // SPINNING_LOGO
glCallList(_wait_list);
......@@ -399,11 +406,13 @@ bool Render_opengl::build(){
_x_scroll_pos = 0;/* horizontal bar placed on 0 */
_y_scroll_pos = 0;/* vertical bar placed on 0 */
/* if (_wait_timer != NULL){
#ifdef SPINNING_LOGO
if (_wait_timer != NULL){
_wait_timer->stop();
delete(_wait_timer);
_wait_timer = NULL;
}*/
}
#endif // SPINNING_LOGO
if (NULL == _render_instance)
......@@ -443,7 +452,6 @@ bool Render_opengl::unbuild(){
_state = DRAWING_STATE_WAITING;/* change the drawing state */
_wait_angle=0.0f;/* begin with 0 rad angle */
_wait_angle_y=0.0f;/* begin with 0 rad angle */
/* init measurement attributes */
Info::Container::x_max = 0;
......@@ -480,14 +488,15 @@ bool Render_opengl::unbuild(){
return true;
/* Now, timer is set */
#ifdef SPINNING_LOGO
if (_wait_timer == NULL){
_wait_angle = 0.0f;
/* _wait_timer = new QTimer(this);
_wait_timer = new QTimer(this);
connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
_wait_timer->start(_wait_spf);*/
_wait_timer->start(_wait_spf);
}
#endif // SPINNING_LOGO
return true;//_render_instance->display_unbuild();
}
......
......@@ -160,11 +160,6 @@ protected:
*/
float _wait_angle;
/*!
* \brief Y rotation angle for the wait.
*/
float _wait_angle_y;
/*!
* \brief Time in ms between two frames for the waiting screen.
*/
......
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