QMainWindow(parent),
ui(new Ui::MainWindow)
{
+ ui->setupUi(this);
+
bestScore=0;
readSettings();
- ui->setupUi(this);
statusLed = new QLed(ui->verticalLayoutWidget);
ui->horizontalLayout_4->insertWidget(0,statusLed);
connect(&tread,SIGNAL(exit(int)),this,SLOT(sbagliato(int)));
connect(&tread,SIGNAL(disableInterface()),this,SLOT(disableAll()));
connect(&tread,SIGNAL(enableInterface()),this,SLOT(enableAll()));
- connect(this,SIGNAL(cliccatoIlBottone(int)),&tread,SLOT(updateCaption(int)));
+ connect(this,SIGNAL(cliccatoIlBottone(int)),&tread,SLOT(addUserInput(int)));
connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(clickA()));
connect(ui->pushButton_2,SIGNAL(clicked()),this,SLOT(clickB()));
connect(ui->pushButton_3,SIGNAL(clicked()),this,SLOT(clickC()));
"padding-top: 15px;"
"}");
//showMaximized();
+ setWindowTitle(tr("QMemory"));
}
void MainWindow::sbagliato(int score){
sscore.append("\n Best score: ");
sscore.append(QString::number(bestScore));
QMessageBox::warning(this, tr("End Game"),sscore,QMessageBox::Escape);
- //tread.genera();
- exit(0);
+ bestScore=0;
+ readSettings();
+ tread.genera();
+
+ //exit(0);
}
void MainWindow::disableAll(){