implemented verb-end results
This commit is contained in:
parent
5bc7edabc6
commit
1bbc6fcb30
6 changed files with 66 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "PluralPR.h"
|
||||
#include "GenusPR.h"
|
||||
#include "VerbEndPR.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -136,3 +137,13 @@ void ResultModel::setGenusResult(unsigned int points)
|
|||
emit dataChanged(index(0, 4), index(4, 4));
|
||||
}
|
||||
}
|
||||
|
||||
void ResultModel::setVerbEndResult(unsigned int points)
|
||||
{
|
||||
if (m_results[2].points() != points)
|
||||
{
|
||||
m_results[2].setPoints(points);
|
||||
m_results[2].setPR(VerbEndPR().lookup(m_age, points));
|
||||
emit dataChanged(index(0, 2), index(4, 2));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,4 +65,5 @@ public:
|
|||
void setAge(const Age &age);
|
||||
void setPluralResult(unsigned int points);
|
||||
void setGenusResult(unsigned int points);
|
||||
void setVerbEndResult(unsigned int points);
|
||||
};
|
||||
|
|
45
source/ResultWidget/VerbEndPR.h
Normal file
45
source/ResultWidget/VerbEndPR.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#pragma once
|
||||
|
||||
#include "PRMap.h"
|
||||
|
||||
class VerbEndPR : public PRMap
|
||||
{
|
||||
public:
|
||||
VerbEndPR()
|
||||
{
|
||||
// clang-format off
|
||||
m_ages = {
|
||||
{ 4, 0 },
|
||||
{ 4, 6 },
|
||||
{ 5, 0 },
|
||||
{ 6, 0 },
|
||||
{ 9, 0 }
|
||||
};
|
||||
|
||||
m_PRs = {
|
||||
{ 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0 },
|
||||
{ 4, 1, 0, 0 },
|
||||
{ 7, 4, 0, 0 },
|
||||
{ 11, 4, 1, 0 },
|
||||
{ 12, 4, 1, 0 },
|
||||
{ 14, 4, 1, 0 },
|
||||
{ 14, 6, 2, 1 },
|
||||
{ 15, 8, 3, 1 },
|
||||
{ 17, 8, 5, 1 },
|
||||
{ 21, 11, 6, 2 },
|
||||
{ 26, 14, 9, 2 },
|
||||
{ 30, 18, 12, 3 },
|
||||
{ 36, 22, 15, 5 },
|
||||
{ 42, 29, 20, 10 },
|
||||
{ 58, 39, 28, 22 },
|
||||
{ 74, 51, 47, 38 },
|
||||
{ 85, 79, 74, 65 },
|
||||
{ 100, 100, 100, 100, 100 },
|
||||
};
|
||||
// clang-format on
|
||||
}
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue