started AkkusativDativ test
This commit is contained in:
parent
1bbc6fcb30
commit
3c2ac70a1c
@ -43,6 +43,7 @@ target_link_libraries(${PROJECT_NAME}
|
||||
VerbEnd
|
||||
Plural
|
||||
Genus
|
||||
AkkusativDativ
|
||||
ResultWidget
|
||||
Qt5::Widgets
|
||||
)
|
||||
|
@ -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}
|
||||
|
@ -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));
|
||||
}
|
||||
|
27
source/SubTests/AkkusativDativ/AkkusativDativWidget.cpp
Normal file
27
source/SubTests/AkkusativDativ/AkkusativDativWidget.cpp
Normal file
@ -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);
|
||||
}
|
25
source/SubTests/AkkusativDativ/AkkusativDativWidget.h
Normal file
25
source/SubTests/AkkusativDativ/AkkusativDativWidget.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
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);
|
||||
};
|
27
source/SubTests/AkkusativDativ/AkkusativDativWidget.ui
Normal file
27
source/SubTests/AkkusativDativ/AkkusativDativWidget.ui
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AkkusativDativWidget</class>
|
||||
<widget class="QWidget" name="AkkusativDativWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableView" name="akkusativTableView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="dativTableView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
15
source/SubTests/AkkusativDativ/AkkusativModel.cpp
Normal file
15
source/SubTests/AkkusativDativ/AkkusativModel.cpp
Normal file
@ -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" } }
|
||||
};
|
||||
}
|
11
source/SubTests/AkkusativDativ/AkkusativModel.h
Normal file
11
source/SubTests/AkkusativDativ/AkkusativModel.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "CheckableTestModel.h"
|
||||
|
||||
class AkkusativModel : public CheckableTestModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AkkusativModel(QObject *parent);
|
||||
};
|
37
source/SubTests/AkkusativDativ/CMakeLists.txt
Normal file
37
source/SubTests/AkkusativDativ/CMakeLists.txt
Normal file
@ -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
|
||||
)
|
15
source/SubTests/AkkusativDativ/DativModel.cpp
Normal file
15
source/SubTests/AkkusativDativ/DativModel.cpp
Normal file
@ -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" } }
|
||||
};
|
||||
}
|
11
source/SubTests/AkkusativDativ/DativModel.h
Normal file
11
source/SubTests/AkkusativDativ/DativModel.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "CheckableTestModel.h"
|
||||
|
||||
class DativModel : public CheckableTestModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DativModel(QObject *parent);
|
||||
};
|
@ -3,3 +3,4 @@ cmake_minimum_required(VERSION 3.6)
|
||||
add_subdirectory(VerbEnd)
|
||||
add_subdirectory(Genus)
|
||||
add_subdirectory(Plural)
|
||||
add_subdirectory(AkkusativDativ)
|
||||
|
@ -50,6 +50,16 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="akkusativDativTab">
|
||||
<attribute name="title">
|
||||
<string>Subtest 4: Akkusativ und Dativ</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="AkkusativDativWidget" name="widget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="PluralTab">
|
||||
<attribute name="title">
|
||||
<string>Subtest 5: Plural</string>
|
||||
@ -122,7 +132,7 @@
|
||||
</widget>
|
||||
<action name="actionSave_as">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="mainwindow.qrc">
|
||||
<normaloff>:/images/document-save-as.png</normaloff>:/images/document-save-as.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -137,7 +147,7 @@
|
||||
</action>
|
||||
<action name="actionOpen">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="mainwindow.qrc">
|
||||
<normaloff>:/images/document-open.png</normaloff>:/images/document-open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -149,7 +159,7 @@
|
||||
</action>
|
||||
<action name="actionNew">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="mainwindow.qrc">
|
||||
<normaloff>:/images/document-new.png</normaloff>:/images/document-new.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -169,7 +179,7 @@
|
||||
</action>
|
||||
<action name="actionSave">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="mainwindow.qrc">
|
||||
<normaloff>:/images/document-save-as.png</normaloff>:/images/document-save-as.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -184,7 +194,7 @@
|
||||
<customwidget>
|
||||
<class>MetaDataWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>MetaData/MetaDataWidget.h</header>
|
||||
<header>MetaDataWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
@ -211,6 +221,12 @@
|
||||
<header>ResultWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>AkkusativDativWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>AkkusativDativWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="mainwindow.qrc"/>
|
||||
|
Reference in New Issue
Block a user