Print akkusativ and dativ model

This commit is contained in:
mandlm 2019-02-05 22:06:43 +01:00
parent 1695174303
commit 57fe4256e2
6 changed files with 20 additions and 9 deletions

View File

@ -128,6 +128,8 @@ void DataModel::printTo(QPrinter &printer) const
printer.newPage(); printer.newPage();
painter.resetTransform(); painter.resetTransform();
m_akkusativ.printTo(painter);
m_dativ.printTo(painter);
m_plural.printTo(painter); m_plural.printTo(painter);
painter.end(); painter.end();

View File

@ -1,7 +1,7 @@
#include "AkkusativModel.h" #include "AkkusativModel.h"
AkkusativModel::AkkusativModel(QObject *parent) AkkusativModel::AkkusativModel(QObject *parent)
: CheckableTestModel(parent) : PrintableModel(parent)
{ {
m_tests = {{"Akkusativ Nominalphrase", m_tests = {{"Akkusativ Nominalphrase",
{"Tiger", "Katze", "Affe", "Gans", "Bär", "Pferd", "Hund", "Elefant"}}, {"Tiger", "Katze", "Affe", "Gans", "Bär", "Pferd", "Hund", "Elefant"}},
@ -105,3 +105,8 @@ void AkkusativModel::write(ESGRAF48::AkkusativModel &model) const
futterModel->set_zucker(testItems[7].isChecked()); futterModel->set_zucker(testItems[7].isChecked());
} }
} }
void AkkusativModel::printHeader(QPainter &painter) const
{
drawHeader2(painter, "Subtest 4: Akkusativ und Dativ");
}

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "CheckableTestModel.h" #include "PrintableModel.h"
#include "AkkusativModel.pb.h" #include "AkkusativModel.pb.h"
class AkkusativModel : public CheckableTestModel class AkkusativModel : public PrintableModel
{ {
Q_OBJECT Q_OBJECT
@ -12,4 +12,7 @@ public:
void read(const ESGRAF48::AkkusativModel &model); void read(const ESGRAF48::AkkusativModel &model);
void write(ESGRAF48::AkkusativModel &model) const; void write(ESGRAF48::AkkusativModel &model) const;
protected:
void printHeader(QPainter &painter) const override;
}; };

View File

@ -43,9 +43,7 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
PRIVATE PRIVATE
CheckableItem PrintableModel
CheckableTest
CheckableTestModel
Qt5::Widgets Qt5::Widgets
${Protobuf_LIBRARIES} ${Protobuf_LIBRARIES}
) )

View File

@ -1,7 +1,7 @@
#include "DativModel.h" #include "DativModel.h"
DativModel::DativModel(QObject *parent) DativModel::DativModel(QObject *parent)
: CheckableTestModel(parent) : PrintableModel(parent)
{ {
m_tests = {{"Dativ Nominalphrase", m_tests = {{"Dativ Nominalphrase",
{"Affe", "Gans", "Tiger", "Hund", "Elefant", "Pferd", "Bär", "Katze"}}, {"Affe", "Gans", "Tiger", "Hund", "Elefant", "Pferd", "Bär", "Katze"}},

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "CheckableTestModel.h" #include "PrintableModel.h"
#include "DativModel.pb.h" #include "DativModel.pb.h"
class DativModel : public CheckableTestModel class DativModel : public PrintableModel
{ {
Q_OBJECT Q_OBJECT
@ -12,4 +12,7 @@ public:
void read(const ESGRAF48::DativModel &model); void read(const ESGRAF48::DativModel &model);
void write(ESGRAF48::DativModel &model) const; void write(ESGRAF48::DativModel &model) const;
protected:
void printHeader(QPainter &) const override {};
}; };