refs #303 Simulator table view

* Simulator component
* Name / variant pair object / view / model
This commit is contained in:
Klaus Basan
2014-08-02 22:15:15 +02:00
parent 42f89ebeca
commit 9afc9024ca
9 changed files with 159 additions and 12 deletions

View File

@@ -24,6 +24,29 @@ namespace BlackMisc
CSequence<CNameVariantPair>(other)
{ }
/*
* Name contained?
*/
bool CNameVariantPairList::containsName(const QString &name)
{
return this->contains(&CNameVariantPair::getName, name);
}
/*
* Name index
*/
int CNameVariantPairList::getNameRowIndex(const QString &name)
{
for (int i = 0; i < this->size(); i++)
{
if ((*this)[i].getName() == name)
{
return i;
}
}
return -1;
}
/*
* Register metadata
*/