#include "thani.h"
 
thani::thani()
{
	type_ani = 2;
}

void thani::run()
{
	if ( type_ani == 0 )
	{
		hdlfra->setGeometry((scr_width - wlwidth)/2,y,wlwidth,wlheight);
		if (y < 150 )
		{
			y=y+10;
			QTimer::singleShot(4, this, SLOT(boucle()));
		}
	}
	else
	{
		if ( type_ani == 1 )
		{
			hdlfra->setGeometry(25,y,wlwidth,wlheight);
			if (y >= scr_height - 80 )
			{
				y=y-4;
				QTimer::singleShot(4, this, SLOT(boucle()));
			}
		}
		else
		{
			hdlfra->setGeometry(25,y,wlwidth,wlheight);
			if (y <= scr_height + 10 )
			{
				y=y+4;
				QTimer::singleShot(4, this, SLOT(boucle()));
			}
			else
			{
				emit hidecomplex();
			}
		}
	}
	//exec();
}

void thani::boucle()
{
	run();
}

