#include "boucle.h" #include Boucle::Boucle(QObject* obj, const char* name) : QObject(obj, name) { /*Constructeur, ici vide*/ } void Boucle::setIterations(int n) { for (int i = 0; i < n ; i++) { std::cout << "Emitting iteration " << i << std::endl; emit newIteration(i); // Emission d'un signal } emit sendToken("end"); } DisplayInt::DisplayInt(QObject* obj, const char* name) : QObject(obj, name) {} void DisplayInt::display(int i) { std::cout << "Recieved integer " << i << std::endl; }