Made empty fields in V2Svk test uncheckable and uncountable, solves #3
This commit is contained in:
parent
56ca796df0
commit
a2c4b16eb4
@ -30,9 +30,10 @@ public:
|
||||
|
||||
unsigned int getPoints() const;
|
||||
|
||||
private:
|
||||
bool isValidIndex(const QModelIndex &index) const;
|
||||
protected:
|
||||
virtual bool isValidIndex(const QModelIndex &index) const;
|
||||
|
||||
private:
|
||||
CheckableItems &getItems(const QModelIndex &index);
|
||||
const CheckableItems &getItems(const QModelIndex &index) const;
|
||||
|
||||
|
@ -69,6 +69,24 @@ unsigned int V2SvkModel::getSvkPoints()
|
||||
return points;
|
||||
}
|
||||
|
||||
bool V2SvkModel::isValidIndex(const QModelIndex &index) const
|
||||
{
|
||||
switch (index.row())
|
||||
{
|
||||
case 1:
|
||||
return index.column() == 1 || index.column() == 7 || index.column() == 10;
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
return index.column() < 6;
|
||||
default:
|
||||
return CheckableTestModel::isValidIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
void V2SvkModel::writeProtoBuf(ESGRAF48::V2SvkModel &model) const
|
||||
{
|
||||
auto writeOneVal = [&](ESGRAF48::V2SvkModel::OneEach *modelData, int testIndex) {
|
||||
|
@ -15,4 +15,7 @@ public:
|
||||
|
||||
void writeProtoBuf(ESGRAF48::V2SvkModel &model) const;
|
||||
void readProtoBuf(const ESGRAF48::V2SvkModel &model);
|
||||
|
||||
protected:
|
||||
bool isValidIndex(const QModelIndex &index) const override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user