mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -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->didNotKnowBtn->setIcon(QIcon(":/resources/close.png"));
|
||||||
ui->nextBtn->setIcon(QIcon(":/resources/check.png"));
|
ui->nextBtn->setIcon(QIcon(":/resources/check.png"));
|
||||||
ui->nonRedundantRandomizationCheckBox->setDisabled(true);
|
ui->nonRedundantRandomizationCheckBox->setDisabled(true);
|
||||||
ui->saveCardsNotKnownToFileCheckBox->setDisabled(true);
|
|
||||||
ui->randomizeCheckBox->click();
|
ui->randomizeCheckBox->click();
|
||||||
ui->randomizeCheckBox->setDisabled(true);
|
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);
|
answersStringList = readFile(answersList).split(QRegExp("(\\r\\n)|(\\n\\r)|\\r|\\n"), QString::SkipEmptyParts);
|
||||||
randomize = ui->randomizeCheckBox->isChecked();
|
randomize = ui->randomizeCheckBox->isChecked();
|
||||||
nonRedundantRandomization = ui->nonRedundantRandomizationCheckBox->isChecked();
|
nonRedundantRandomization = ui->nonRedundantRandomizationCheckBox->isChecked();
|
||||||
saveCardsNotKnownToFile = ui->saveCardsNotKnownToFileCheckBox->isChecked();
|
|
||||||
cardsAlreadyShown.clear();
|
cardsAlreadyShown.clear();
|
||||||
cardsNotKnown.clear();
|
cardsNotKnown.clear();
|
||||||
ui->nonRedundantRandomizationCheckBox->setChecked(false);
|
ui->nonRedundantRandomizationCheckBox->setChecked(false);
|
||||||
|
@ -97,14 +95,6 @@ void flashExam::initCardsList(QString cardsList, QString answersList) {
|
||||||
|
|
||||||
void flashExam::on_backBtn_clicked()
|
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);
|
this->setDisabled(false);
|
||||||
setupCardsList();
|
setupCardsList();
|
||||||
ui->stackedWidget->setCurrentIndex(0);
|
ui->stackedWidget->setCurrentIndex(0);
|
||||||
|
@ -231,14 +221,3 @@ void flashExam::on_didNotKnowBtn_clicked()
|
||||||
on_nextBtn_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;
|
QString listName;
|
||||||
bool randomize;
|
bool randomize;
|
||||||
bool nonRedundantRandomization;
|
bool nonRedundantRandomization;
|
||||||
bool saveCardsNotKnownToFile;
|
|
||||||
QList<int> cardsAlreadyShown;
|
QList<int> cardsAlreadyShown;
|
||||||
QList<int> cardsNotKnown;
|
QList<int> cardsNotKnown;
|
||||||
bool answerShown = false;
|
bool answerShown = false;
|
||||||
|
@ -46,7 +45,6 @@ private slots:
|
||||||
void on_nextBtn_clicked();
|
void on_nextBtn_clicked();
|
||||||
void on_randomizeCheckBox_toggled(bool checked);
|
void on_randomizeCheckBox_toggled(bool checked);
|
||||||
void on_didNotKnowBtn_clicked();
|
void on_didNotKnowBtn_clicked();
|
||||||
void on_nonRedundantRandomizationCheckBox_toggled(bool checked);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FLASHEXAM_H
|
#endif // FLASHEXAM_H
|
||||||
|
|
|
@ -35,6 +35,46 @@
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<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">
|
<item row="1" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
|
@ -102,7 +142,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="Line" name="line_2">
|
<widget class="Line" name="line_2">
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Shadow::Plain</enum>
|
<enum>QFrame::Shadow::Plain</enum>
|
||||||
|
@ -112,19 +152,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="5" column="0">
|
||||||
<widget class="QCheckBox" name="nonRedundantRandomizationCheckBox">
|
<widget class="QCheckBox" name="nonRedundantRandomizationCheckBox">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
|
@ -137,45 +164,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
Loading…
Reference in a new issue