diff --git a/src/apps/flashexam.cpp b/src/apps/flashexam.cpp index fc7d776..ac9abd9 100644 --- a/src/apps/flashexam.cpp +++ b/src/apps/flashexam.cpp @@ -112,6 +112,7 @@ void flashExam::on_revealBtn_clicked() ui->textBrowser->setText("" + answerText + ""); answerShown = true; ui->revealBtn->setText("Hide answer"); + ui->continueWidget->show(); } } @@ -126,12 +127,7 @@ void flashExam::displayCard(bool existingCardNumber) { float cardsTotalFloat = cardsTotal * 1.0; float cardsAlreadyShownNumber = cardsAlreadyShown.count() * 1.0; float cardsNotKnownNumber = cardsNotKnown.count() * 1.0; - if(answerShown) { - ui->cardNumberLabel->setText(QString::number((cardsAlreadyShownNumber - 1) / cardsTotalFloat * 100, 'f', 1) + "% done, " + QString::number(cardsNotKnownNumber / cardsTotalFloat * 100, 'f', 1) + "% forgotten"); - } - else { - ui->cardNumberLabel->setText(QString::number(cardsAlreadyShownNumber / cardsTotalFloat * 100, 'f', 1) + "% done, " + QString::number(cardsNotKnownNumber / cardsTotalFloat * 100, 'f', 1) + "% forgotten"); - } + ui->cardNumberLabel->setText(QString::number(cardsAlreadyShownNumber / cardsTotalFloat * 100, 'f', 1) + "% done, " + QString::number(cardsNotKnownNumber / cardsTotalFloat * 100, 'f', 1) + "% forgotten"); } else { ui->cardNumberLabel->hide(); @@ -171,6 +167,7 @@ void flashExam::displayCard(bool existingCardNumber) { ui->revealBtn->setText("Show answer"); answerShown = false; + ui->continueWidget->hide(); } QString flashExam::displayImage(QString cardText) { diff --git a/src/apps/flashexam.ui b/src/apps/flashexam.ui index 8ad8740..9c0a541 100644 --- a/src/apps/flashexam.ui +++ b/src/apps/flashexam.ui @@ -184,13 +184,102 @@ - - - - QFrame::Shadow::Plain + + + + 0 - - Qt::Orientation::Horizontal + + + + + + + 0 + 0 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + true + + + + + + + + + + + + + QFrame::Shadow::Plain + + + Qt::Orientation::Horizontal + + + + + + + + + + + + + + + true + + + + Show answer + + + + + + + + 0 + 0 + @@ -233,20 +322,8 @@ - - - - - true - - - - Show answer - - - - - + + QFrame::Shadow::Plain @@ -258,51 +335,8 @@ - - - - - 0 - 0 - - - - - - - - 0 - - - - - - - 0 - - - - - - - - - - - - - true - - - - - - - - - - - + + QFrame::Shadow::Plain