#include "thmenu.h"
 
thmenu::thmenu()
{
	wy = 0;
}

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

void thmenu::run()
{
	if ( sens == "O" )
	{
		if ( wy <= 240 )
		{
			w1->setGeometry(w1->geometry().x(),w1->geometry().y(),w1->width(),wy);
			w2->setGeometry(w2->geometry().x(),w1->geometry().y()+w1->height()+10,w2->width(),w2->height());
			wy=wy+5;
			QTimer::singleShot(5, this, SLOT(boucle()));
		}
	}
	else
	{
		if ( wy >= 0 )
		{
			w1->setGeometry(w1->geometry().x(),w1->geometry().y(),w1->width(),wy);
			w2->setGeometry(w2->geometry().x(),w1->geometry().y()+w1->height()+10,w2->width(),w2->height());
			wy=wy-5;
			QTimer::singleShot(5, this, SLOT(boucle()));
		}
	}
}

