mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 07:37:21 -08:00
Compare commits
No commits in common. "7be7b15e8d00455a26273ef8eb92a558d27abd8b" and "32e05489f4e85a2cf9bb990a79509c6ada1c6bc3" have entirely different histories.
7be7b15e8d
...
32e05489f4
3 changed files with 41 additions and 76 deletions
|
@ -31,7 +31,6 @@ flashExam::flashExam(QWidget *parent)
|
|||
ui->didNotKnowBtn->setIcon(QIcon(":/resources/close.png"));
|
||||
ui->nextBtn->setIcon(QIcon(":/resources/check.png"));
|
||||
ui->nonRedundantRandomizationCheckBox->setDisabled(true);
|
||||
ui->saveCardsNotKnownToFileCheckBox->setDisabled(true);
|
||||
ui->randomizeCheckBox->click();
|
||||
ui->randomizeCheckBox->setDisabled(true);
|
||||
|
||||
|
@ -86,7 +85,6 @@ void flashExam::initCardsList(QString cardsList, QString answersList) {
|
|||
answersStringList = readFile(answersList).split(QRegExp("(\\r\\n)|(\\n\\r)|\\r|\\n"), QString::SkipEmptyParts);
|
||||
randomize = ui->randomizeCheckBox->isChecked();
|
||||
nonRedundantRandomization = ui->nonRedundantRandomizationCheckBox->isChecked();
|
||||
saveCardsNotKnownToFile = ui->saveCardsNotKnownToFileCheckBox->isChecked();
|
||||
cardsAlreadyShown.clear();
|
||||
cardsNotKnown.clear();
|
||||
ui->nonRedundantRandomizationCheckBox->setChecked(false);
|
||||
|
@ -97,14 +95,6 @@ void flashExam::initCardsList(QString cardsList, QString answersList) {
|
|||
|
||||
void flashExam::on_backBtn_clicked()
|
||||
{
|
||||
if(nonRedundantRandomization && cardsNotKnown.count() > 0 && saveCardsNotKnownToFile) {
|
||||
QString cardsNotKnownQstring;
|
||||
for(int i = 0; i < cardsNotKnown.count(); i++) {
|
||||
cardsNotKnownQstring.append(cardsStringList.at(cardsNotKnown.at(i)) + "\n");
|
||||
}
|
||||
log("Writing cardsNotKnownQstring to file", className);
|
||||
writeFile("/mnt/onboard/onboard/flashexam-cards-not-known_" + QDateTime::currentDateTime().toString("dd.MM.yyyy-hh.mm.ss"), cardsNotKnownQstring);
|
||||
}
|
||||
this->setDisabled(false);
|
||||
setupCardsList();
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
|
@ -231,14 +221,3 @@ void flashExam::on_didNotKnowBtn_clicked()
|
|||
on_nextBtn_clicked();
|
||||
}
|
||||
|
||||
void flashExam::on_nonRedundantRandomizationCheckBox_toggled(bool checked)
|
||||
{
|
||||
if(checked) {
|
||||
ui->saveCardsNotKnownToFileCheckBox->setDisabled(false);
|
||||
}
|
||||
else {
|
||||
ui->saveCardsNotKnownToFileCheckBox->setDisabled(true);
|
||||
ui->saveCardsNotKnownToFileCheckBox->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ private:
|
|||
QString listName;
|
||||
bool randomize;
|
||||
bool nonRedundantRandomization;
|
||||
bool saveCardsNotKnownToFile;
|
||||
QList<int> cardsAlreadyShown;
|
||||
QList<int> cardsNotKnown;
|
||||
bool answerShown = false;
|
||||
|
@ -46,7 +45,6 @@ private slots:
|
|||
void on_nextBtn_clicked();
|
||||
void on_randomizeCheckBox_toggled(bool checked);
|
||||
void on_didNotKnowBtn_clicked();
|
||||
void on_nonRedundantRandomizationCheckBox_toggled(bool checked);
|
||||
};
|
||||
|
||||
#endif // FLASHEXAM_H
|
||||
|
|
|
@ -35,6 +35,46 @@
|
|||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="Line" name="line">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="randomizeCheckBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>U001</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Randomized mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QPushButton" name="startBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="bottomMargin">
|
||||
|
@ -102,7 +142,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Plain</enum>
|
||||
|
@ -112,19 +152,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="Line" name="line">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="nonRedundantRandomizationCheckBox">
|
||||
<property name="font">
|
||||
|
@ -137,45 +164,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="randomizeCheckBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>U001</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Randomized mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QPushButton" name="startBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="saveCardsNotKnownToFileCheckBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>U001</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save forgotten cards list to file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Reference in a new issue