Example #1
0
/**
    \fn configure
*/
bool rotateGl::configure( void) 
{
    
     
     diaElemInteger  tAngle(&(params.angle),QT_TRANSLATE_NOOP("glRotate","Angle (°):"),-190,190);
   
     
     diaElem *elems[]={&tAngle};
     
     if(diaFactoryRun(QT_TRANSLATE_NOOP("glRotate","glRotate"),sizeof(elems)/sizeof(diaElem *),elems))
     {
                ADM_info("New angle : %d \n",params.angle);
                _parentQGL->makeCurrent();
                genQuad();
                _parentQGL->doneCurrent();
                return 1;
     }
    
     return 0;
}
/**
    \fn configure
*/
bool rotateGl::configure( void) 
{
	if (widget == NULL)
	{
		GUI_Error_HIG("OpenGL", "Unable to initialise OpenGL");
		return false;
	}
     
     diaElemInteger  tAngle(&(params.angle),QT_TR_NOOP("Angle (°):"),-190,190);
   
     
     diaElem *elems[]={&tAngle};
     
     if(diaFactoryRun(QT_TR_NOOP("glRotate"),sizeof(elems)/sizeof(diaElem *),elems))
     {
                ADM_info("New angle : %d \n",params.angle);
                widget->makeCurrent();
                genQuad();
                widget->doneCurrent();
                return 1;
     }
    
     return 0;
}