implemented V2/SVK test
This commit is contained in:
parent
5f9356a7f7
commit
b8c869ff39
16 changed files with 432 additions and 29 deletions
|
@ -5,6 +5,8 @@
|
|||
#include "VerbEndPR.h"
|
||||
#include "AkkusativPR.h"
|
||||
#include "DativPR.h"
|
||||
#include "V2PR.h"
|
||||
#include "SvkPR.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -166,3 +168,23 @@ void ResultModel::setDativResult(unsigned int points)
|
|||
emit dataChanged(index(0, 6), index(4, 6));
|
||||
}
|
||||
}
|
||||
|
||||
void ResultModel::setV2Result(unsigned int points)
|
||||
{
|
||||
if (m_results[0].points() != points)
|
||||
{
|
||||
m_results[0].setPoints(points);
|
||||
m_results[0].setPR(V2PR().lookup(m_age, points));
|
||||
emit dataChanged(index(0, 0), index(4, 0));
|
||||
}
|
||||
}
|
||||
|
||||
void ResultModel::setSvkResult(unsigned int points)
|
||||
{
|
||||
if (m_results[1].points() != points)
|
||||
{
|
||||
m_results[1].setPoints(points);
|
||||
m_results[1].setPR(SvkPR().lookup(m_age, points));
|
||||
emit dataChanged(index(0, 1), index(4, 1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,4 +68,6 @@ public:
|
|||
void setVerbEndResult(unsigned int points);
|
||||
void setAkkusativResult(unsigned int points);
|
||||
void setDativResult(unsigned int points);
|
||||
void setV2Result(unsigned int points);
|
||||
void setSvkResult(unsigned int points);
|
||||
};
|
||||
|
|
65
source/ResultWidget/SvkPR.h
Normal file
65
source/ResultWidget/SvkPR.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#pragma once
|
||||
|
||||
#include "PRMap.h"
|
||||
|
||||
class SvkPR : public PRMap
|
||||
{
|
||||
public:
|
||||
SvkPR()
|
||||
{
|
||||
// clang-format off
|
||||
m_ages = {
|
||||
{ 4, 0 },
|
||||
{ 5, 0 },
|
||||
{ 6, 0 },
|
||||
{ 9, 0 }
|
||||
};
|
||||
|
||||
m_PRs = {
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 1, 0 },
|
||||
{ 3, 1, 0 },
|
||||
{ 4, 1, 1 },
|
||||
{ 4, 1, 1 },
|
||||
{ 7, 2, 1 },
|
||||
{ 8, 3, 3 },
|
||||
{ 8, 5, 3 },
|
||||
{ 9, 5, 3 },
|
||||
{ 12, 6, 4 },
|
||||
{ 17, 6, 4 },
|
||||
{ 18, 7, 5 },
|
||||
{ 21, 7, 6 },
|
||||
{ 21, 8, 7 },
|
||||
{ 24, 10, 7 },
|
||||
{ 28, 11, 7 },
|
||||
{ 32, 12, 9 },
|
||||
{ 34, 14, 9 },
|
||||
{ 37, 19, 11 },
|
||||
{ 42, 25, 13 },
|
||||
{ 51, 28, 16 },
|
||||
{ 53, 31, 19 },
|
||||
{ 59, 38, 25 },
|
||||
{ 71, 50, 36 },
|
||||
{ 100, 100, 100 }
|
||||
};
|
||||
// clang-format on
|
||||
}
|
||||
};
|
68
source/ResultWidget/V2PR.h
Normal file
68
source/ResultWidget/V2PR.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
#pragma once
|
||||
|
||||
#include "PRMap.h"
|
||||
|
||||
class V2PR : public PRMap
|
||||
{
|
||||
public:
|
||||
V2PR()
|
||||
{
|
||||
// clang-format off
|
||||
m_ages = {
|
||||
{ 4, 0 },
|
||||
{ 5, 0 },
|
||||
{ 6, 0 },
|
||||
{ 9, 0 }
|
||||
};
|
||||
|
||||
m_PRs = {
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 0, 0 },
|
||||
{ 2, 1, 0 },
|
||||
{ 2, 1, 0 },
|
||||
{ 2, 1, 0 },
|
||||
{ 2, 1, 0 },
|
||||
{ 3, 1, 0 },
|
||||
{ 3, 1, 0 },
|
||||
{ 3, 1, 1 },
|
||||
{ 3, 1, 1 },
|
||||
{ 3, 1, 1 },
|
||||
{ 4, 1, 1 },
|
||||
{ 5, 2, 1 },
|
||||
{ 7, 2, 1 },
|
||||
{ 8, 2, 1 },
|
||||
{ 9, 3, 2 },
|
||||
{ 14, 5, 4 },
|
||||
{ 17, 6, 4 },
|
||||
{ 18, 7, 5 },
|
||||
{ 21, 9, 5 },
|
||||
{ 21, 10, 6 },
|
||||
{ 22, 10, 6 },
|
||||
{ 24, 11, 7 },
|
||||
{ 25, 11, 8 },
|
||||
{ 27, 14, 9 },
|
||||
{ 29, 14, 10 },
|
||||
{ 32, 16, 10 },
|
||||
{ 37, 19, 12 },
|
||||
{ 42, 22, 13 },
|
||||
{ 47, 26, 15 },
|
||||
{ 52, 29, 19 },
|
||||
{ 55, 32, 21 },
|
||||
{ 60, 41, 27 },
|
||||
{ 69, 52, 37 },
|
||||
{ 100, 100, 100 }
|
||||
};
|
||||
// clang-format on
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue