void Clave::on_botonResolver_clicked() { Juego nuevoJuego(N,C); Ficha *arreglo[N*N]; this->t.toArreglo(arreglo); nuevoJuego.resolverPuzzle(&t,arreglo); ui.botonCrear->setEnabled(true); ui.botonResolver->setEnabled(false); this->repaint(); }
void VentanaPrincipal::crearMenu() { menuBar = new QMenuBar; fileMenu = new QMenu(tr("&Archivo"), this); newAction = fileMenu->addAction(tr("&Nuevo")); exitAction = fileMenu->addAction(tr("E&xit")); fileScore = new QMenu(tr("&Score"), this); scoreAction = fileScore->addAction(tr("&Ver")); menuBar->addMenu(fileMenu); menuBar->addMenu(fileScore); connect(exitAction, SIGNAL(triggered()), this, SLOT(accept())); connect(newAction, SIGNAL(triggered()), this, SLOT(nuevoJuego())); connect(scoreAction, SIGNAL(triggered()), this, SLOT(verPuntajes())); }