Removed html output

This commit is contained in:
mandlm 2018-11-28 22:43:32 +01:00
parent bf08d0c5e4
commit bcd0b17caa
5 changed files with 0 additions and 52 deletions

View File

@ -72,29 +72,6 @@ void DataModel::printTo(QTextCursor &cursor) const
m_v2Svk.printTo(cursor);
}
std::string DataModel::toHtml() const
{
std::stringstream out;
out << "<html>" << std::endl;
out << "<head>" << std::endl;
out << "<style>" << std::endl;
out << "body {" << std::endl;
out << "font-family:sans-serif;" << std::endl;
out << "}" << std::endl;
out << "</style>" << std::endl;
out << "</head>" << std::endl;
out << "<body>" << std::endl;
out << "<h2>ESGRAF 4-8 Auswertungsbogen</h2>" << std::endl;
out << "<p>" << std::endl;
out << m_metaData.toHtml();
out << "</p>" << std::endl;
out << "</body>" << std::endl;
out << "</html>" << std::endl;
return out.str();
}
void DataModel::pluralModelChanged()
{
m_results.setPluralResult(m_plural.getPoints());

View File

@ -36,7 +36,6 @@ public:
DataModel(QObject *parent);
void printTo(QTextCursor &cursor) const;
std::string toHtml() const;
void write(std::ostream &outStream) const;
void read(std::istream &inStream);

View File

@ -178,27 +178,3 @@ void MetaDataModel::printTo(QTextCursor &cursor) const
cursor.movePosition(QTextCursor::NextBlock);
}
std::string MetaDataModel::toHtml() const
{
std::ostringstream out;
out << "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" frame=\"box\" rules=\"all\">" << std::endl;
out << "<tr>" << std::endl;
out << "<td colspan=\"2\">Bemerkungen</td>" << std::endl;
out << "</tr>" << std::endl;
out << "<tr>" << std::endl;
out << "<td>Untersuchungsdatum</td>" << std::endl;
out << "<td>" << m_dateOfTest.toString("dd.MM.yyyy").toHtmlEscaped().toStdString() << "</td>"
<< std::endl;
out << "<td colspan=\"2\" rowspan=\"2\">"
<< m_remarks.trimmed().toHtmlEscaped().replace("\n", "<br>").toStdString() << "</td>"
<< std::endl;
out << "</tr>" << std::endl;
out << "<tr>" << std::endl;
out << "<td>Alter am Testtag</td>" << std::endl;
out << "<td>" << getAge().toString() << "</td>" << std::endl;
out << "</tr>" << std::endl;
out << "</table>" << std::endl;
return out.str();
}

View File

@ -35,7 +35,6 @@ public:
void write(ESGRAF48::MetaDataModel &model) const;
void printTo(QTextCursor &cursor) const;
std::string toHtml() const;
Age getAge() const
{

View File

@ -132,9 +132,6 @@ void MainWindow::closeFile()
void MainWindow::print() const
{
//std::ofstream htmlfile("print.html");
//htmlfile << m_dataModel->toHtml();
QPrinter printer;
QPrintDialog dialog(&printer);