#include #include "tiempo.h" //#include "tablero.h" Tiempo::Tiempo(QObject *parent) // Constructor de Tiempo : QObject(parent), timer(new QTimer(this)) { connect(timer, SIGNAL(timeout()), this, SLOT(seg())); timer->start(1000); } void Tiempo::setTablero(Tablero * x){ // Relaciona un objeto Tiempo a un Tablero tablero=x; // Asigna el parametro "x" al atributo tablero } void Tiempo::seg(){ // Avanza en 1 segundo el tiempo tablero->UnSegundo(); // Llama a la funcion UnSegundo del atributo tablero }