IHM_CreerReservationEquipement::IHM_CreerReservationEquipement(BDD * bdd,QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::IHM_CreerReservationEquipement)
{
    ui->setupUi(this);
    this->bdd=bdd;
    connect(ui->pushButtonRetour,SIGNAL(clicked()),this,SLOT(retour()));
    connect(ui->pushButtonChoisir,SIGNAL(clicked()),this,SLOT(choixEquip()));
}
CreerReservationSalle::CreerReservationSalle(BDD * bdd,QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::CreerReservationSalle)
{
    ui->setupUi(this);
    this->bdd=bdd;
    connect(ui->pushButtonRetour,SIGNAL(clicked()),this,SLOT(retour()));
    connect(ui->button_ok,SIGNAL(clicked()),this,SLOT(choixSalle()));
}
Exemplo n.º 3
0
DetailWidget::DetailWidget(QToolBox* toolbox, QWidget* parent):QWidget(parent),Ui::DetailForm()
{
	setupUi(this);	
	QObject::connect(btn_back,SIGNAL(clicked()),
			this,SLOT(retour()));
	QObject::connect(btnReserver,SIGNAL(clicked()),
			this,SLOT(toReserve()));
	setToolBox(toolbox);

}
Exemplo n.º 4
0
 string vectorToString ( vector<string> vec )
 {
     string retour ( "" );
     for ( vector<string>::iterator vecIter = vec.begin();vecIter != vec.end(); vecIter++ )
     {
         if ( vecIter == vec.begin() )
         {
             retour += ( *vecIter );
         }
         else
         {
             retour += "\t" + ( *vecIter );
         }
     }
     return retour;
 }
Exemplo n.º 5
0
void LevelUploader::checkRequest(bool error)
{
	QByteArray data(http->readAll());
	QString retour(data);
	buttonsend->disconnect();
	buttonsend->setText(tr("Fermer"));
	connect(buttonsend, SIGNAL(clicked()), this, SLOT(accept()));
	if (error)
	{
		QMessageBox::information(this, tr("Problème réseau"),
		tr("Le serveur %1 n'a pas pu être contacté.\r\nAssurez vous d'être correctement connecté à Internet.")
		.arg(host));
		return;
	}
	else if (retour!="OK")
	{
		if (retour=="ERREUR NIVEAU EXISTANT")
		{
			int retour = QMessageBox::question(this, tr("Jeu existant"), tr("Ce jeu existe déja sur le serveur, voulez vous l'écraser ?"),
			QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape);
			if (retour == QMessageBox::No)
				return;
			overwrite=true;
			sendfile();
			return;
		}
		if (retour=="ERREUR CLIENT")
		{
			QMessageBox::information(this, tr("Client erroné"),
			tr("Le client (%1) n'as pas été reconnu par le serveur."
			" Assurez vous d'avoir la dernière version de %1.").arg(NAME_APPLICATION).arg(NAME_APPLICATION));
			return;
		}
		if (retour=="ERREUR CLIENT VERSION")
		{
			QMessageBox::information(this, tr("Version du client incompatible"),
			tr("La version du client (%1) n'est plus supportée par le serveur. Téléchargez la dernière version de %2.").arg(NAME_APPLICATION).arg(NAME_APPLICATION));
			return;
		}
		if (retour=="ERREUR VERSION")
		{
			QMessageBox::information(this, tr("Version non prise en charge"),
			tr("La version actuelle de %1 n'est pas prise en charge par le serveur.\r\n"
			"Veuillez mettre à jour %2.").arg(NAME_APPLICATION).arg(NAME_APPLICATION));
			return;
		}
		if (retour=="ERREUR UPLOAD")
		{
			QMessageBox::information(this, tr("Mise en ligne impossible"),
			tr("La mise en ligne du file a échoué."));
			return;
		}
		if (retour=="ERREUR COPIE")
		{
			QMessageBox::information(this, tr("Problème de serveur"),
			tr("Le serveur a reçu le file mais n'as pas pu le stocker."));
			return;
		}
		if (retour=="ERREUR NIVEAU")
		{
			QMessageBox::information(this, tr("Jeu corrompu"),
			tr("Le jeu n'a pas été vérifié avec succès par le serveur. Verifiez votre version de %1 ou réessayez.").arg(NAME_APPLICATION));
			return;
		}
		if (retour=="ERREUR NIVEAU VERSION")
		{
			QMessageBox::information(this, tr("Jeu non géré"),
			tr("Ce jeu n'est plus géré par le serveur. Veuillez mettre à jour %1.").arg(NAME_APPLICATION));
			return;
		}
		std::cerr << retour.toLatin1().data();
		QMessageBox::information(this, tr("Error du serveur"),
		tr("Le serveur n'a pas répondu correctement à la requête.\r\n"
		"Assurez vous d'avoir la dernière version du programme et que le serveur soit opérationnel."));
		return;
	}
}
Exemplo n.º 6
0
/**
 * Post extraction smoothing with counting of extracted neighbours pixels
 */
Mat preciseSmoothing(Mat image, int nbrVoisin, int requis){

	/*Smoothed picture to be returned*/
	Mat retour(image.size(), image.type());
	int count, total;
	int colonnes = image.cols;
	int lignes = image.rows;
	int pas = image.step;
	int iMax, jMax, iMin, jMin;

	/*Examination of each pixel*/
	for(int x = 0; x < lignes; x++){
		for(int y = 0; y < colonnes; y++){
			retour.data[x*pas+y*3+0] = image.data[x*pas+y*3+0];
			retour.data[x*pas+y*3+1] = image.data[x*pas+y*3+1];
			retour.data[x*pas+y*3+2] = image.data[x*pas+y*3+2];
			
			/*If the pixel is not green, the algorithm look further into its neigbourhood*/
			if (!(image.data[x*pas+y*3+0] == BLUE 
		       && image.data[x*pas+y*3+1] == GREEN 
		       && image.data[x*pas+y*3+2] == RED))
			{
				count = 0;
				total = 0;

				/*Setting of the neighbourhood limits to look into*/
				iMax = x + nbrVoisin;
				iMin = x - nbrVoisin;
				jMax = y + nbrVoisin;
				jMin = y - nbrVoisin;

				/*Specials cases, to avoid edge effect*/
				if(iMin < 0)
					iMin = nbrVoisin - x - nbrVoisin;
				if(iMax >= lignes)
					iMax = lignes - x;
				if(jMin < 0)
					jMin = nbrVoisin - y - nbrVoisin;
				if(jMax >= colonnes)
					jMax = colonnes - y;

				/*Neigbours examination*/
				for(int i = iMin; i < iMax; i++){
					for(int j = jMin; j < jMax; j++){
						/*If neighbour not green, then add one to counter*/
						if (!(image.data[i*pas+j*3+0] == BLUE 
		                   && image.data[i*pas+j*3+1] == GREEN 
		                   && image.data[i*pas+j*3+2] == RED))
							count++;
						/*If the counter already has the number of required non-green pixels, exit the loop*/
						if(count > requis)
							break;
					}
					if(count > requis)
						break;
				}
				count--;
				/*If the counter is beneath the required number, the pixel is set to green*/
				if(count < requis){
					retour.data[x*pas+y*3+0] = BLUE;
					retour.data[x*pas+y*3+1] = GREEN;
					retour.data[x*pas+y*3+2] = RED;
				}
			}
		}
	}
	return retour;
}