diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index d7525a5..c6de361 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -43,7 +43,8 @@ target_link_libraries(${PROJECT_NAME} VerbEnd Plural Genus - ResultWidget + AkkusativDativ + ResultWidget Qt5::Widgets ) diff --git a/source/MetaData/CMakeLists.txt b/source/MetaData/CMakeLists.txt index 4fdb651..01aa53f 100644 --- a/source/MetaData/CMakeLists.txt +++ b/source/MetaData/CMakeLists.txt @@ -23,6 +23,8 @@ set_target_properties(${PROJECT_NAME} target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR} ) target_link_libraries(${PROJECT_NAME} diff --git a/source/ResultWidget/ResultModel.cpp b/source/ResultWidget/ResultModel.cpp index 6198c59..a46e265 100644 --- a/source/ResultWidget/ResultModel.cpp +++ b/source/ResultWidget/ResultModel.cpp @@ -113,7 +113,6 @@ QVariant ResultModel::headerData( void ResultModel::setAge(const Age &age) { - qDebug() << "Age:" << age.years() << "years" << age.months() << "months"; m_age = age; emit dataChanged(index(1, 0), index(4, 8)); } diff --git a/source/SubTests/AkkusativDativ/AkkusativDativWidget.cpp b/source/SubTests/AkkusativDativ/AkkusativDativWidget.cpp new file mode 100644 index 0000000..4ba36b9 --- /dev/null +++ b/source/SubTests/AkkusativDativ/AkkusativDativWidget.cpp @@ -0,0 +1,27 @@ +#include "AkkusativDativWidget.h" +#include "ui_AkkusativDativWidget.h" + +#include "AkkusativModel.h" +#include "DativModel.h" + +AkkusativDativWidget::AkkusativDativWidget(QWidget *parent) + : QWidget(parent) + , ui(new Ui::AkkusativDativWidget) +{ + ui->setupUi(this); +} + +AkkusativDativWidget::~AkkusativDativWidget() +{ + delete ui; +} + +void AkkusativDativWidget::setAkkusativModel(AkkusativModel *model) +{ + ui->akkusativTableView->setModel(model); +} + +void AkkusativDativWidget::setDativModel(DativModel *model) +{ + ui->dativTableView->setModel(model); +} diff --git a/source/SubTests/AkkusativDativ/AkkusativDativWidget.h b/source/SubTests/AkkusativDativ/AkkusativDativWidget.h new file mode 100644 index 0000000..da7f7e9 --- /dev/null +++ b/source/SubTests/AkkusativDativ/AkkusativDativWidget.h @@ -0,0 +1,25 @@ +#pragma once + +#include + +class AkkusativModel; +class DativModel; + +namespace Ui { +class AkkusativDativWidget; +}; + +class AkkusativDativWidget : public QWidget +{ + Q_OBJECT + +private: + Ui::AkkusativDativWidget *ui; + +public: + AkkusativDativWidget(QWidget *parent = nullptr); + ~AkkusativDativWidget(); + + void setAkkusativModel(AkkusativModel *model); + void setDativModel(DativModel *model); +}; diff --git a/source/SubTests/AkkusativDativ/AkkusativDativWidget.ui b/source/SubTests/AkkusativDativ/AkkusativDativWidget.ui new file mode 100644 index 0000000..6eae9c3 --- /dev/null +++ b/source/SubTests/AkkusativDativ/AkkusativDativWidget.ui @@ -0,0 +1,27 @@ + + + AkkusativDativWidget + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + + + + + + diff --git a/source/SubTests/AkkusativDativ/AkkusativModel.cpp b/source/SubTests/AkkusativDativ/AkkusativModel.cpp new file mode 100644 index 0000000..93493ec --- /dev/null +++ b/source/SubTests/AkkusativDativ/AkkusativModel.cpp @@ -0,0 +1,15 @@ +#include "AkkusativModel.h" + +AkkusativModel::AkkusativModel(QObject *parent) + : CheckableTestModel(parent) +{ + m_tests = { + { "Akkusativ Nominalphrase", { "Tiger", "Katze", "Affe", "Gans", "Bär", + "Pferd", "Hund", "Elefant" } }, + { "Präpositionalphrase (Verstecke)", + { "Vorhang", "Kiste", "Holz", "Kiste", "Baum", "Vorhang", "Holz", + "Baum" } }, + { "Nominalphrase (Futter)", { "Salat", "Fleisch", "Knochen", "Banane", + "Apfel", "Möhre", "Honig", "Zucker" } } + }; +} diff --git a/source/SubTests/AkkusativDativ/AkkusativModel.h b/source/SubTests/AkkusativDativ/AkkusativModel.h new file mode 100644 index 0000000..9ec74fd --- /dev/null +++ b/source/SubTests/AkkusativDativ/AkkusativModel.h @@ -0,0 +1,11 @@ +#pragma once + +#include "CheckableTestModel.h" + +class AkkusativModel : public CheckableTestModel +{ + Q_OBJECT + +public: + AkkusativModel(QObject *parent); +}; diff --git a/source/SubTests/AkkusativDativ/CMakeLists.txt b/source/SubTests/AkkusativDativ/CMakeLists.txt new file mode 100644 index 0000000..05deb13 --- /dev/null +++ b/source/SubTests/AkkusativDativ/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.6) + +project(AkkusativDativ LANGUAGES CXX) + +find_package(Qt5Widgets REQUIRED) + +set(CMAKE_AUTOMOC ON) + +qt5_wrap_ui(UI_HEADERS + AkkusativDativWidget.ui +) + +add_library(${PROJECT_NAME} + AkkusativDativWidget.cpp + AkkusativModel.cpp + DativModel.cpp + ${UI_HEADERS} +) + +set_target_properties(${PROJECT_NAME} + PROPERTIES CXX_STANDARD 14 +) + +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(${PROJECT_NAME} + PRIVATE + CheckableItem + CheckableTest + CheckableTestModel + Qt5::Widgets +) diff --git a/source/SubTests/AkkusativDativ/DativModel.cpp b/source/SubTests/AkkusativDativ/DativModel.cpp new file mode 100644 index 0000000..1856817 --- /dev/null +++ b/source/SubTests/AkkusativDativ/DativModel.cpp @@ -0,0 +1,15 @@ +#include "DativModel.h" + +DativModel::DativModel(QObject *parent) + : CheckableTestModel(parent) +{ + m_tests = { + { "Dativ Nominalphrase", { "Tiger", "Katze", "Affe", "Gans", "Bär", + "Pferd", "Hund", "Elefant" } }, + { "Präpositionalphrase (Verstecke)", + { "Vorhang", "Kiste", "Holz", "Kiste", "Baum", "Vorhang", "Holz", + "Baum" } }, + { "Nominalphrase (Tiere)", { "Salat", "Fleisch", "Knochen", "Banane", + "Apfel", "Möhre", "Honig", "Zucker" } } + }; +} diff --git a/source/SubTests/AkkusativDativ/DativModel.h b/source/SubTests/AkkusativDativ/DativModel.h new file mode 100644 index 0000000..306c8ce --- /dev/null +++ b/source/SubTests/AkkusativDativ/DativModel.h @@ -0,0 +1,11 @@ +#pragma once + +#include "CheckableTestModel.h" + +class DativModel : public CheckableTestModel +{ + Q_OBJECT + +public: + DativModel(QObject *parent); +}; diff --git a/source/SubTests/CMakeLists.txt b/source/SubTests/CMakeLists.txt index ad4883e..5eabd7e 100644 --- a/source/SubTests/CMakeLists.txt +++ b/source/SubTests/CMakeLists.txt @@ -3,3 +3,4 @@ cmake_minimum_required(VERSION 3.6) add_subdirectory(VerbEnd) add_subdirectory(Genus) add_subdirectory(Plural) +add_subdirectory(AkkusativDativ) diff --git a/source/mainwindow.ui b/source/mainwindow.ui index 2c6aed1..8a20f59 100644 --- a/source/mainwindow.ui +++ b/source/mainwindow.ui @@ -50,6 +50,16 @@ + + + Subtest 4: Akkusativ und Dativ + + + + + + + Subtest 5: Plural @@ -122,7 +132,7 @@ - + :/images/document-save-as.png:/images/document-save-as.png @@ -137,7 +147,7 @@ - + :/images/document-open.png:/images/document-open.png @@ -149,7 +159,7 @@ - + :/images/document-new.png:/images/document-new.png @@ -169,7 +179,7 @@ - + :/images/document-save-as.png:/images/document-save-as.png @@ -184,7 +194,7 @@ MetaDataWidget QWidget -
MetaData/MetaDataWidget.h
+
MetaDataWidget.h
1
@@ -211,6 +221,12 @@
ResultWidget.h
1
+ + AkkusativDativWidget + QWidget +
AkkusativDativWidget.h
+ 1 +