From bf08d0c5e46a922c8ade890abbf8edacf7776f12 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Wed, 28 Nov 2018 22:39:51 +0100 Subject: [PATCH] Print formatting --- source/DataModel.cpp | 2 ++ source/SubTests/V2Svk/V2SvkModel.cpp | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/source/DataModel.cpp b/source/DataModel.cpp index a8fd476..05bf9d2 100644 --- a/source/DataModel.cpp +++ b/source/DataModel.cpp @@ -65,8 +65,10 @@ void DataModel::printTo(QTextCursor &cursor) const QTextCharFormat titleFormat; titleFormat.setFontPointSize(18); cursor.insertText("ESGRAF 4-8 Auswertungsbogen", titleFormat); + cursor.insertText("\n", titleFormat); m_metaData.printTo(cursor); + cursor.insertText("\n", titleFormat); m_v2Svk.printTo(cursor); } diff --git a/source/SubTests/V2Svk/V2SvkModel.cpp b/source/SubTests/V2Svk/V2SvkModel.cpp index 0362db4..cdf7596 100644 --- a/source/SubTests/V2Svk/V2SvkModel.cpp +++ b/source/SubTests/V2Svk/V2SvkModel.cpp @@ -206,7 +206,15 @@ void V2SvkModel::printTo(QTextCursor &cursor) const QTextCharFormat headerFormat; headerFormat.setFontPointSize(12); - cursor.insertText("Subtest 1: Verbzweitstellungsregel (V2) und Subjekt-Verb-Kontrollregel (SVK)", headerFormat); + cursor.insertText( + "Subtest 1: Verbzweitstellungsregel (V2) und Subjekt-Verb-Kontrollregel (SVK)", + headerFormat); + + QTextTableFormat tableFormat; + tableFormat.setCellPadding(2); + tableFormat.setCellSpacing(0); + + QTextTable *table = cursor.insertTable(1, 1, tableFormat); cursor.movePosition(QTextCursor::NextBlock); }