if(slotSelectTypeQuestion() == false) return; if(sTypeQuestion == tr("One answer")) setOneAnswerType(); if(sTypeQuestion == tr("Many answers")) setManyAnswerType(); if(sTypeQuestion == tr("Installation sequence")) setInstallSequenceType(); if(sTypeQuestion == tr("Enter number")) setEnterNumberType(); if(sTypeQuestion == tr("Enter word (sentence)")) setEnterWordType(); slQuestionType << sTypeQuestion; SaveState = false;
sTypeQuestion == tr("One answer")
C++ (Qt) QFile file("/tmp/shelk-test-0.4.1/Stat.html"); QDataStream sfile(&file); if(!file.exists()) { file.open(QIODevice::WriteOnly); strStat.clear(); strStat.append("<HTML>\n" " <BODY>\n" " <TABLE border=\"3\">\n" " <TR>\n" " <TD> " + tr("User name") + " </TD>\n" " <TD> " + tr("Name test") + " </TD>\n" " <TD> " + tr("Total questions") + " </TD>\n" " <TD> " + tr("Correct answers") + " </TD>\n" " <TD> " + tr("Wrong answers") + " </TD>\n" " <TD> % </TD>\n" " <TD> " + tr("Total points:") + " </TD>\n" " <TD> " + tr("Date") + " </TD>\n" " <TD> " + tr("Time end") + " </TD>\n" " </TR>\n" " <TR>\n" " <TD>" + UserName + "</TD>\n" " <TD>" + StatNameTest + "</TD>\n" " <TD>" + sTotalQuestions + "</TD>\n" " <TD>" + sCorrectAnswer + "</TD>\n" " <TD>" + sWrongAnswer + "</TD>\n" " <TD>" + strPercent + "</TD>\n" " <TD>" + sAllPoint + "</TD>\n" " <TD>" + strDate + "</TD>\n" " <TD>" + strTime + "</TD>\n" " </TR>\n" " </TABLE>\n" " </BODY>\n" "</HTML>\n"); sfile << strStat; file.close(); FormStat.StatLabel->setText(strStat); }