From cc20d46a7676c8d2d6775b87de7e192d934eed4a Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Wed, 12 Dec 2018 21:40:26 +0100 Subject: [PATCH] Print causal sentence points --- source/SubTests/VerbEnd/VerbEndModel.cpp | 22 ++++++++++++++++++++++ source/SubTests/VerbEnd/VerbEndModel.h | 1 + 2 files changed, 23 insertions(+) diff --git a/source/SubTests/VerbEnd/VerbEndModel.cpp b/source/SubTests/VerbEnd/VerbEndModel.cpp index 87a17fc..6fdd889 100644 --- a/source/SubTests/VerbEnd/VerbEndModel.cpp +++ b/source/SubTests/VerbEnd/VerbEndModel.cpp @@ -129,3 +129,25 @@ std::string VerbEndModel::getName() const return "Subtest 2: Verbendstellungsregel (VE)"; }; +void VerbEndModel::printSummaryTo(QTextCursor &cursor) const +{ + QTextTableFormat tableFormat; + tableFormat.setCellPadding(2); + tableFormat.setCellSpacing(0); + + tableFormat.setColumnWidthConstraints({QTextLength(QTextLength::PercentageLength, 46), + QTextLength(QTextLength::PercentageLength, 25), + QTextLength(QTextLength::PercentageLength, 1), + QTextLength(QTextLength::PercentageLength, 3), + QTextLength(QTextLength::PercentageLength, 1), + QTextLength(QTextLength::PercentageLength, 20), + QTextLength(QTextLength::PercentageLength, 1), + QTextLength(QTextLength::PercentageLength, 3)}); + + QTextTable *table = cursor.insertTable(1, 8, tableFormat); + + setCellText(*table, 0, 1, "Rohwertpunkte Kausalsätze:"); + setCellNumber(*table, 0, 3, getCausalPoints()); + setCellText(*table, 0, 5, "Rohwertpunkte Total:"); + setCellNumber(*table, 0, 7, getPoints()); +} diff --git a/source/SubTests/VerbEnd/VerbEndModel.h b/source/SubTests/VerbEnd/VerbEndModel.h index 411d455..44a3897 100644 --- a/source/SubTests/VerbEnd/VerbEndModel.h +++ b/source/SubTests/VerbEnd/VerbEndModel.h @@ -19,6 +19,7 @@ public: protected: std::string getName() const override; + void printSummaryTo(QTextCursor &cursor) const override; private slots: void modelChanged();