diff --git a/TODO b/TODO index 3cf4fe30897ee51c554769e0fc20d6c9e2c3c5de..6ee66b29b48fafb84688fc1cb43ec661b29487c8 100644 --- a/TODO +++ b/TODO @@ -12,8 +12,9 @@ ============================================================================ ====== BUGS AND ISSUES =============================================== -- melody tip may display result text for every attempt -- remove some console debug messages +- temp note disappears when its control is going to be edited +- exam summary dialog - check does it displays all melody mistakes +- remove some console debug messages, audio TscoreStaff - clean tartini unused code MINOR: diff --git a/changes b/changes index 5a2905c3d5622602e95c9ae8d4a1fef1cfd52453..1183a1d17872c9749591876a3ddd98019a5c3d15 100644 --- a/changes +++ b/changes @@ -3,7 +3,9 @@ - updated on-line help - unlocked help button(s) to opening related help sites BUGS FIXES - - checking intonation properly respects level accuracy setting + - fixed melody chart tip - correctly displays every attempt summary + - fixed and improved animations of accidentals from note to key signature + - intonation checking respects properly setting of accuracy level - fixed determining mistake types for melodies - fixed chart issues when melodies are analyzing diff --git a/src/exam/texamexecutor.cpp b/src/exam/texamexecutor.cpp index 77fac9d9df43b200f9cdbe8ffbaae679af3923d8..d45256dad29dd90998d3dd7e2e0cc9146834d063 100755 --- a/src/exam/texamexecutor.cpp +++ b/src/exam/texamexecutor.cpp @@ -611,14 +611,14 @@ void TexamExecutor::checkAnswer(bool showResults) { } if (goodAllready == curQ->melody()->length()) { // all required notes are correct curQ->setMistake(TQAunit::e_correct); // even if user put them more and effect. is poor - qDebug() << "Melody is correct"; +// qDebug() << "Melody is correct"; } else if (goodAllready + notBadAlready == curQ->melody()->length()) { // add committed mistakes of last attempt - curQ->setMistake(curQ->lastAttempt()->summary() - (curQ->lastAttempt()->summary() & 64 ? 64 : 0)); // or 'not bad' + curQ->setMistake(curQ->lastAttempt()->summary()); // or 'not bad' // qDebug() << "Melody is not bad" << curQ->mistake(); } else if (goodAllready + notBadAlready >= curQ->melody()->length() * 0.7) { // at least 70% notes answered properly // qDebug() << "Melody has little notes"; - if (curQ->lastAttempt()->effectiveness() > 50.0) { // and effectiveness is sufficient - curQ->setMistake(curQ->lastAttempt()->summary() - (curQ->lastAttempt()->summary() & 64 ? 64 : 0)); + if (curQ->lastAttempt()->effectiveness() >= 50.0) { // and effectiveness is sufficient + curQ->setMistake(curQ->lastAttempt()->summary()); curQ->setMistake(TQAunit::e_littleNotes); // but less notes than required // qDebug() << "... and sufficient effectiveness"; } else { // or effectiveness is too poor diff --git a/src/libs/core/exam/tattempt.cpp b/src/libs/core/exam/tattempt.cpp index e9c74d94f2d8744a899580f288b3df3531ab7238..a398456881c71363d69fc15f91d9e76e89e2a9d4 100644 --- a/src/libs/core/exam/tattempt.cpp +++ b/src/libs/core/exam/tattempt.cpp @@ -37,8 +37,7 @@ void Tattempt::add(quint32 mistake) { Tattempt::~Tattempt() -{ -} +{} void Tattempt::updateEffectiveness() { @@ -55,6 +54,12 @@ void Tattempt::updateEffectiveness() { m_effectiveness = effSum / (qreal)mistakes.size(); } else m_effectiveness = 0.0; + if (effectiveness() >= 50.0) { + if (m_sum & TQAunit::e_wrongNote) { // subtract e_wrongNote if summary has sufficient effectiveness + m_sum = m_sum - TQAunit::e_wrongNote; // attempt was successful + m_sum |= TQAunit::e_littleNotes; // but has little valid notes + } + } } diff --git a/src/libs/core/exam/tresulttext.cpp b/src/libs/core/exam/tresulttext.cpp index e3832f8a6bc217fb8143a43b256b7506798234be..3f49ec6183be74b0515bb512b2322d4cfa12be43 100644 --- a/src/libs/core/exam/tresulttext.cpp +++ b/src/libs/core/exam/tresulttext.cpp @@ -50,7 +50,7 @@ QString wasAnswerOKtext(TQAunit* answer, const QColor& textColor, int fontSize, else curQ.setMistake(answer->mistake()); if (curQ.isCorrect()) { - txt += QApplication::translate("AnswerText", "Good answer!", "or 'Good!' or 'Correct!' would be somewhat more specific than merely 'It was good!' (previous version) 'It' in this case certainly does refer to a specific thing, which is in this case the answer, but it might be momentarily confused with some other specific thing, such as a shoe or a crocodile, or the wind on one's back. I know that's probably confusing, but the implied subject of 'Correct! is in a certain sense much more specific than a mere 'It' and is more certain to refer to the answer."); + txt += QApplication::translate("AnswerText", "Good answer!", "or 'Good!' or 'Correct!' would be somewhat more specific than merely 'It was good!' (previous version) 'It' in this case certainly does refer to a specific thing, which is in this case the answer, but it might be momentarily confused with some other specific thing, such as a shoe or a crocodile, or the wind on one's back. I know that's probably confusing, but the implied subject of 'Correct! is in a certain sense much more specific than a mere 'It' and is more certain to refer to the answer."); } else if (curQ.wrongNote() || curQ.wrongPos() || curQ.veryPoor()) txt += QApplication::translate("AnswerText", "Wrong answer!"); @@ -59,7 +59,7 @@ QString wasAnswerOKtext(TQAunit* answer, const QColor& textColor, int fontSize, QString misMes = ""; // Message with mistakes if (curQ.wrongString()) misMes = QApplication::translate("AnswerText", "wrong string"); - if (curQ.melody() && curQ.littleNotes()) + if (answer->melody() && curQ.littleNotes()) misMes = QApplication::translate("AnswerText", "little valid notes", "the amount of correct notes in an answer is little"); if (curQ.poorEffect()) { addSpaceToNotEmpty(misMes); diff --git a/src/plugins/charts/ttipmelody.cpp b/src/plugins/charts/ttipmelody.cpp index c0e2662aac02b68768beeba47ab5988fa12cec5d..19c947af2ad0fdecabcd46d8dd41b2dcbf165f77 100644 --- a/src/plugins/charts/ttipmelody.cpp +++ b/src/plugins/charts/ttipmelody.cpp @@ -53,12 +53,13 @@ TtipMelody::TtipMelody(TquestionPoint *point) : m_score->setFixedHeight(qApp->desktop()->availableGeometry().height() / 12); QSpinBox *spinAtt = new QSpinBox(m_w); spinAtt->setRange(0, qa()->question()->attemptsCount()); -// spinAtt->setSpecialValueText(" " + tr("bare melody") + " "); spinAtt->setPrefix(TexTrans::attemptTxt() + " "); spinAtt->setSuffix(" " + tr("of", "It will give text: 'Attempt x of y'") + QString(" %1").arg(qa()->question()->attemptsCount())); m_attemptLabel = new QLabel(m_w); - txt = wasAnswerOKtext(point->question(), point->color()).replace("<br>", " ") + "<br>"; - txt += tr("Melody was played <b>%n</b> times", "", qa()->question()->totalPlayBacks()) + "<br>"; + m_resultLabel = new QLabel(wasAnswerOKtext(point->question(), point->color()).replace("<br>", " "), m_w); + m_resultLabel->setAlignment(Qt::AlignCenter); +// txt = wasAnswerOKtext(point->question(), point->color()).replace("<br>", " ") + "<br>"; + txt = tr("Melody was played <b>%n</b> times", "", qa()->question()->totalPlayBacks()) + "<br>"; txt += TexTrans::effectTxt() + QString(": <big><b>%1%</b></big>, ").arg(point->question()->effectiveness(), 0, 'f', 1, '0'); txt += TexTrans::reactTimeTxt() + QString("<big><b> %1</b></big>").arg(Texam::formatReactTime(point->question()->time, true)); QLabel *sumLab = new QLabel(txt, m_w); @@ -73,6 +74,7 @@ TtipMelody::TtipMelody(TquestionPoint *point) : attLay->addStretch(); lay->addLayout(attLay); lay->addWidget(m_attemptLabel); + lay->addWidget(m_resultLabel); lay->addWidget(sumLab); m_w->setLayout(lay); @@ -109,6 +111,19 @@ void TtipMelody::attemptChanged(int attNr) { m_score->clearMistakes(); m_attemptLabel->setText(""); } + if (qa()->question()->attemptsCount() > 1) { + if (attNr && attNr < qa()->question()->attemptsCount()) { + QColor attemptColor = TquestionPoint::goodColor(); + if (qa()->question()->attempt(attNr - 1)->summary()) { + if (qa()->question()->attempt(attNr - 1)->summary() & TQAunit::e_wrongNote) + attemptColor = TquestionPoint::wrongColor(); + else + attemptColor = TquestionPoint::notBadColor(); + } + m_resultLabel->setText(wasAnswerOKtext(qa()->question(), attemptColor, -1, attNr).replace("<br>", " ")); + } else + m_resultLabel->setText(wasAnswerOKtext(qa()->question(), qa()->color()).replace("<br>", " ")); + } } diff --git a/src/plugins/charts/ttipmelody.h b/src/plugins/charts/ttipmelody.h index 76597a5712c53f3e8ef3b9c8c0068d69b09cbf84..844d7095f4e781c3cca5be6ade85f8746eeb11b9 100644 --- a/src/plugins/charts/ttipmelody.h +++ b/src/plugins/charts/ttipmelody.h @@ -47,7 +47,7 @@ protected slots: private: QGraphicsWidget *m_widget; TmelodyView *m_score; - QLabel *m_attemptLabel; + QLabel *m_attemptLabel, *m_resultLabel; QWidget *m_w; /** content widget inside QGraphicsWidget */ };